I created a library with many, many functions (see the README), but it's most important is that it includes Alpertons ECM library so you can factor with Alperton's Engine (Even under Termux under Android) from ipython3:
https://github.com/oppressionslayer/primalitytest/
Just watch the video at the beginning of the README and see how easy it is to get it working with Alperton's C library.
to use it, just use from sfactorint import p2ecm from the primality directory. To get access to Alperton's ECM, follow these steps:
cd calculators
make
cd ..
And that's it, sfactorint then uses Alpertons ECM SIQS for factorization. I plan to make a pip install that does the make step automatically, so keep watching if you interested in it.
Here's a sample 60 digit number factor from it, i do the same one on an Android in the video at about the same speed:
In [22]: import time
...: start = time.time()
...: print(p2ecm(632459103267572196107100983820469021721602147490918660274601))
...: end = time.time()
...: print(end-start)
...:
[650655447295098801102272374367, 972033825117160941379425504503]
5.197108030319214