William pointed out the Cython interface to GMP-ECM. However this does not
completely answer your question, since it will only find *some* factors of
N, but does not guarantee to find *all* factors less than 2^30.
What you want is a deterministic ECM method, i.e., a set of ECM curves
(with Stage 1 and 2 bounds) which guarantees to find all divisors less than
2^30. This is a nice research problem, but to my best knowledge, no solution
is known so far.
Paul Zimmermann