Name | torrent-models JSON |
Version |
0.1.1
JSON |
| download |
home_page | None |
Summary | .torrent file parsing and creation with pydantic |
upload_time | 2025-07-26 06:25:30 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.11 |
license | EUPL-1.2 |
keywords |
bittorrent
torrent
pydantic
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# torrent-models
[](https://torrent-models.readthedocs.io/en/latest/)
.torrent file parsing and creation with pydantic
(and models for other bittorrent things too)
While there are [many](#other-projects) other torrent packages, this one:
- Is simple and focused
- Can create and parse v1, v2, hybrid, and [other BEPs](./beps.md)
- Is focused on library usage (but does [cli things too](./usage/cli.md))
- 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](https://codeberg.org/Safeguarding/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):
- [`torrentfile`](https://alexpdev.github.io/torrentfile/)
- [`dottorrent`](https://dottorrent.readthedocs.io)
- [`torf`](https://github.com/rndusr/torf)
- [`torrenttool`](https://github.com/idlesign/torrentool)
- [`PyBitTorrent`](https://github.com/gaffner/PyBitTorrent)
- [`torrent_parser`](https://github.com/7sDream/torrent_parser)
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](https://github.com/alexpdev/torrentfile/blob/d50d942dc72c93f052c63b443aaec38c592a14df/torrentfile/edit.py#L65)
and [rebuilding requires the files to be present](https://github.com/alexpdev/torrentfile/blob/d50d942dc72c93f052c63b443aaec38c592a14df/torrentfile/rebuild.py)
- `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
Raw data
{
"_id": null,
"home_page": null,
"name": "torrent-models",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "bittorrent, torrent, pydantic",
"author": null,
"author_email": "sneakers-the-rat <sneakers-the-rat@protonmail.com>",
"download_url": "https://files.pythonhosted.org/packages/5f/67/0cb940c7475337fe246009c64e7858a6765187dfa4386d8dd604464b8430/torrent_models-0.1.1.tar.gz",
"platform": null,
"description": "# torrent-models\n\n[](https://torrent-models.readthedocs.io/en/latest/)\n\n.torrent file parsing and creation with pydantic\n(and models for other bittorrent things too)\n\nWhile there are [many](#other-projects) other torrent packages, this one:\n\n- Is simple and focused\n- Can create and parse v1, v2, hybrid, and [other BEPs](./beps.md)\n- Is focused on library usage (but does [cli things too](./usage/cli.md))\n- Validates torrent files (e.g. when accepting them as user input!)\n- Treats .torrent files as an *extensible* rather than fixed format\n- Is performant! (and asyncio compatible when hashing!)\n- Uses python typing and is mypy friendly\n\n~ alpha software primarily intended for use with [sciop](https://codeberg.org/Safeguarding/sciop) ~\n\n\n## See also\n\nThese are also good projects, and probably more battle tested\n(but we don't know them well and can't vouch for their use):\n\n- [`torrentfile`](https://alexpdev.github.io/torrentfile/)\n- [`dottorrent`](https://dottorrent.readthedocs.io)\n- [`torf`](https://github.com/rndusr/torf)\n- [`torrenttool`](https://github.com/idlesign/torrentool)\n- [`PyBitTorrent`](https://github.com/gaffner/PyBitTorrent)\n- [`torrent_parser`](https://github.com/7sDream/torrent_parser)\n\nSpecifically\n- `torf` has some notable performance problems, and doesn't support v2\n- `torrentfile` is focused on the cli and doesn't appear to be able to validate torrent files, \n and there is no dedicated method for parsing them, \n e.g. editing [directly manipulates the bencoded dict](https://github.com/alexpdev/torrentfile/blob/d50d942dc72c93f052c63b443aaec38c592a14df/torrentfile/edit.py#L65)\n and [rebuilding requires the files to be present](https://github.com/alexpdev/torrentfile/blob/d50d942dc72c93f052c63b443aaec38c592a14df/torrentfile/rebuild.py)\n- `dottorrent` can only write, not parse torrent files.\n- `torrenttool` doesn't validate torrents\n- `PyBitTorrent` doesn't validate torrents\n- `torrent_parser` doesn't validate torrents and doesn't have a torrent file class",
"bugtrack_url": null,
"license": "EUPL-1.2",
"summary": ".torrent file parsing and creation with pydantic",
"version": "0.1.1",
"project_urls": {
"repository": "https://github.com/p2p-ld/torrent-models"
},
"split_keywords": [
"bittorrent",
" torrent",
" pydantic"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "62819c1da0e2bd3badd2ef6d3ef2c2c8e080b3bae4c8367169df6ce0ce95504c",
"md5": "a0832e8b69a6e874a058b4caa969b269",
"sha256": "8393d883091f3beff70893db30d7facbe8c279a6aca37c2c486bf8032eb94b17"
},
"downloads": -1,
"filename": "torrent_models-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a0832e8b69a6e874a058b4caa969b269",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 46227,
"upload_time": "2025-07-26T06:25:22",
"upload_time_iso_8601": "2025-07-26T06:25:22.452193Z",
"url": "https://files.pythonhosted.org/packages/62/81/9c1da0e2bd3badd2ef6d3ef2c2c8e080b3bae4c8367169df6ce0ce95504c/torrent_models-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5f670cb940c7475337fe246009c64e7858a6765187dfa4386d8dd604464b8430",
"md5": "0b7d8a001cdb422b6792244af960865b",
"sha256": "f1fba95f1a445aae2714ed8f190004cae2dae3de6aaeb25da6b4581c40654d46"
},
"downloads": -1,
"filename": "torrent_models-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "0b7d8a001cdb422b6792244af960865b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 3094713,
"upload_time": "2025-07-26T06:25:30",
"upload_time_iso_8601": "2025-07-26T06:25:30.055424Z",
"url": "https://files.pythonhosted.org/packages/5f/67/0cb940c7475337fe246009c64e7858a6765187dfa4386d8dd604464b8430/torrent_models-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-26 06:25:30",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "p2p-ld",
"github_project": "torrent-models",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "torrent-models"
}