Skip to content

A lightweight, asynchronous BitTorrent client implemented in Python. This project demonstrates the core functionality of the BitTorrent protocol, including peer communication, piece management, and file downloading.

License

Notifications You must be signed in to change notification settings

dhruvv1402/BitTorrent-Client-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BitTorrent Client in Python (basic idea)

Just a small BitTorrent client made in Python. It connects to peers, downloads pieces, checks them, and puts the file back together. Mainly built to get a feel for how torrents actually work under the hood.

its JOB

  • Talks to trackers and finds peers
  • Downloads file pieces using asyncio
  • Checks pieces with SHA-1 before saving
  • Works for single or multi-file torrents
  • Shows basic progress while downloading

to use (ik you know alr)

git clone https://github.com/yourusername/bittorrent-client.git
cd bittorrent-client
pip install -r requirements.txt
python main.py yourfile.torrent

file structure

bittorrent-client/
├── client/
│   ├── torrent.py
│   ├── tracker.py
│   ├── peer.py
│   ├── piece_manager.py
└── main.py

Get these first

bencodepy requests rich async-timeout

License

MIT, do whatever basically.

About

A lightweight, asynchronous BitTorrent client implemented in Python. This project demonstrates the core functionality of the BitTorrent protocol, including peer communication, piece management, and file downloading.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages