Table of Contents
This is a CLI tool that downloads files from the BitTorrent network.
I wanted to make a straightforward program to learn how does BitTorrent protocol works.
It is written with python 3.8, only the pubsub library was used to create events when a new peer is connected, or when data is received from a peer. You first need to wait for the program to connect to some peers first, then it starts downloading.
With this torrent client, you can :
Python
- Python
- Knowledge of TCP/UDP protocols
- Asynchronous programming
- Peer to Peer networks
You can run the following command to install the dependencies using pip
pip3 install -r requirements.txt
Note:This is not applicable on Windows
If you want to specify a torrent file, you need to edit it manually in the main.py file:
self.torrent = Torrent.Torrent("path_to_your_torrent")
Then simply run:
python3 main.py
The files will be downloaded in the same path as your main.py script.
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/Torrent-Client
) - Commit your Changes (
git commit -m 'Add some features'
) - Push to the Branch (
git push origin feature/Torrent-Client
) - Open a Pull Request
1.http://allenkim67.github.io/programming/2016/05/04/how-to-make-your-own-bittorrent-client.html
2.http://www.kristenwidman.com/blog/33/how-to-write-a-bittorrent-client-part-1/
3.https://github.com/lita/bittorrent
4.https://wiki.theory.org/BitTorrentSpecification