Skip to main content

torrent-models

docs PyPI - Version PyPI - Python Version PyPI - License

.torrent file parsing and creation with pydantic (and models for other bittorrent things too)

While there are many other torrent packages, this one:

  • Is simple and focused
  • Can create and parse v1, v2, hybrid, and other BEPs
  • Is focused on library usage (but does cli things too)
  • Validates torrent files (e.g. when accepting them as user input!)
  • Treats .torrent files as an extensible rather than fixed format
  • Is performant! (and asyncio compatible when hashing!)
  • Uses python typing and is mypy friendly

~ alpha software primarily intended for use with sciop ~

See also

These are also good projects, and probably more battle tested (but we don't know them well and can't vouch for their use):

Specifically

  • torf has some notable performance problems, and doesn't support v2
  • torrentfile is focused on the cli and doesn't appear to be able to validate torrent files, and there is no dedicated method for parsing them, e.g. editing directly manipulates the bencoded dict and rebuilding requires the files to be present
  • dottorrent can only write, not parse torrent files.
  • torrenttool doesn't validate torrents
  • PyBitTorrent doesn't validate torrents
  • torrent_parser doesn't validate torrents and doesn't have a torrent file class

Release files for torrent-models 0.3.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for torrent-models 0.3.4
File Size Uploaded
torrent_models-0.3.4.tar.gz 3.1 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for torrent-models 0.3.4
File Interpreter ABI Platform
torrent_models-0.3.4-py3-none-any.whl Python 3 none any Details

Total release size: 3.1 MB

Release files / torrent_models-0.3.4.tar.gz

Download URL torrent_models-0.3.4.tar.gz
Size 3.1 MB
Tags Source
SHA-256 checksum
How to use checksums
3e9a5d5c6907e308ecd6864a8e0261c732aedd7f766c0d9bb88ef3fe4e10a07f
BLAKE2b-256 checksum
How to use checksums
6ef6cf5141e22c7cf176d7392d74af28061b18feb35d0165466a7bdb893282f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.25.9 CPython/3.13.1 Darwin/23.3.0

Release files / torrent_models-0.3.4-py3-none-any.whl

Download URL torrent_models-0.3.4-py3-none-any.whl
Size 50.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ee6069e1167b1eb486b97e48a3f9041e63117e728b0036f71fcd7fd9362b887d
BLAKE2b-256 checksum
How to use checksums
a69641d7fdb4f1aaecb549e13305f7c36a6215d4d4347f73e8bb134cff0dcb2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.25.9 CPython/3.13.1 Darwin/23.3.0

Release history Release notifications | RSS feed

This release

0.3.4 This release

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page