Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 12 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
# torrent-models

[![docs](https://readthedocs.org/projects/torrent-models/badge/)](https://torrent-models.readthedocs.io/en/latest/)

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

~ alpha software primarily intended for use with [sciop](https://codeberg.org/Safeguarding/sciop) ~
While there are [many](#other-projects) other torrent packages, this one:

## Initial development
- 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) ~

- [x] Parsing
- [x] v1
- [x] v2
- [x] Generation
- [x] v1
- [x] v2
- [ ] hybrid

## See also

Expand All @@ -27,15 +30,6 @@ These are also good projects, and probably more battle tested
- [`PyBitTorrent`](https://github.com/gaffner/PyBitTorrent)
- [`torrent_parser`](https://github.com/7sDream/torrent_parser)

The reason this package exists is that none of them are a pure, complete
parser and generator of torrent files that...
- can handle v1, v2, hybrid, and all other .torrent-related BEPs
- is focused on library usage
- is simple and focused
- has few dependencies
- is performant
- uses modern python typing

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,
Expand Down
5 changes: 5 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ While there are [many](#other-projects) other torrent packages, this one:
- Is performant! (and asyncio compatible when hashing!)
- Uses python typing and is mypy friendly

this package was created for, and used by [sciop <3](https://sciop.net/)

## Examples

### Read a torrent
Expand Down Expand Up @@ -169,13 +171,15 @@ The reasons we did not use these other tools and wrote this one:

```{toctree}
:caption: Usage:
:hidden:
usage/torrent
usage/cli
```

```{toctree}
:caption: API:
:hidden:
api/create
api/hashing
Expand All @@ -188,6 +192,7 @@ api/types
```{toctree}
:maxdepth: 2
:caption: Reference:
:hidden:
beps
references
Expand Down
Loading