The ultimate Python API wrapper for 1337x.
Table of Contents
Installation
Install via PyPi:
pip install 1337x
Or install from the source:
pip install git+https://github.com/hemantapkh/1337x
Examples
⚠️ Note: Due to a recent change on the 1337x website, using the
.search()method without acategorymay return empty results. Specifying a category is temporarily recommended to ensure functionality.
Searching Torrents
import py1337x
torrents = py1337x.Py1337x()
# Basic search
results = torrents.search(
'ubuntu',
page=1,
category=py1337x.category.APPS
)
for result in results.items:
print(f"Title={result.name} Seeders={result.seeders}")
# Search with sorting by seeders
results = torrents.search('vlc', sort_by=py1337x.sort.SEEDERS, category=py1337x.category.APPS)
print(results)
# Get today's trending torrents
results = torrents.trending()
print(results)
Getting Torrent Information
To get magnetlink and other information of the torrent.
# Getting info the the first result of the above search
torrent_id = results.items[0].torrent_id
info = torrents.info(torrent_id=torrent_id)
print(info)
# Convert the result to dictionary
info_dict = info.to_dict()
print(info_dict)
Asynchronous Usage
For asynchronous usage, all functionalities are the same; use AsyncPy1337x instead of Py1337x:
import asyncio
from py1337x import AsyncPy1337x
async def main():
torrents = AsyncPy1337x()
results = await torrents.search('vlc media player')
print(results)
asyncio.run(main())
Documentation
The detailled documentation of the project is available here.
Contributing
Any contributions you make are greatly appreciated.
Thanks to every contributors who have contributed in this project.
License
Distributed under the MIT License. See LICENSE for more information.
Author/Maintainer: Hemanta Pokharel
Metadata
Release files for 1337x 2.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| 1337x-2.1.1.tar.gz | 9.0 kB | With provenance | Details for 1337x-2.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| 1337x-2.1.1-py3-none-any.whl | Python 3 | none | any | Details for 1337x-2.1.1-py3-none-any.whl |
Total release size: 19.0 kB
Release files / 1337x-2.1.1.tar.gz
| Download URL | 1337x-2.1.1.tar.gz |
|---|---|
| Size | 9.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a3659536f6139c19c253ae0373efe2f9ebd98bab577c51a6b79913290baa16cc
|
|
BLAKE2b-256 checksum How to use checksums |
d8432007840a5d119a3f72d6c2765fd3a533baa20f0168fba5dacfee167d8f3d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 21, 2025.
Transparency logRelease files / 1337x-2.1.1-py3-none-any.whl
| Download URL | 1337x-2.1.1-py3-none-any.whl |
|---|---|
| Size | 10.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c33363b8cc66a1c762dc67c4557f75e904cf21f7d4cf5e16d339bdcad1dd1dec
|
|
BLAKE2b-256 checksum How to use checksums |
07eba014407685802f81d15b1527cadc3c179a8c1da9dc8775b241cc872f24a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 21, 2025.
Transparency logSecurity for 1337x 2.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for 1337x-2.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 21, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.