libtorrent-rasterbar

C++ BitTorrent library with Python bindings for torrent applications

brewmacoslinux
Try with needOr install directly
Source

About

C++ bittorrent library with Python bindings

Commands

libtorrent-rasterbar

Examples

Import and create a session in Python to manage torrents$ python3 -c "import libtorrent as lt; ses = lt.session(); print('Session created')"
Add a torrent file and start downloading in Python$ python3 -c "import libtorrent as lt; ses = lt.session(); info = lt.torrent_info('file.torrent'); h = ses.add_torrent({'ti': info, 'save_path': '.'}); print('Torrent added')"
Check torrent status and statistics in Python$ python3 -c "import libtorrent as lt; ses = lt.session(); h = ses.add_torrent({'url': 'magnet:...', 'save_path': '.'}); s = h.status(); print(f'Progress: {s.progress*100:.1f}%')"