Skip to content

p2p-ld/torrent-models

Repository files navigation

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

Packages

No packages published

Contributors 2

  •  
  •  

Languages