Unofficial API of 1337x.to
Project description
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
Searching Torrents
import py1337x
torrents = py1337x.Py1337x()
# Basic search
results = torrents.search('ubuntu', page=1)
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file 1337x-2.1.0.tar.gz
.
File metadata
- Download URL: 1337x-2.1.0.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
c0f473224bae51ec01d30ddb2a9dccc65ecdd5407746e721891615200ccbf7c1
|
|
MD5 |
fd30797737858e965867815ab816fbf5
|
|
BLAKE2b-256 |
459c941e97184021993ba30a584531d81ed67f1683962783795091dc6f10d45d
|
Provenance
The following attestation bundles were made for 1337x-2.1.0.tar.gz
:
Publisher:
publish.yml
on hemantapkh/1337x
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
1337x-2.1.0.tar.gz
-
Subject digest:
c0f473224bae51ec01d30ddb2a9dccc65ecdd5407746e721891615200ccbf7c1
- Sigstore transparency entry: 232410400
- Sigstore integration time:
-
Permalink:
hemantapkh/1337x@c3c817a626e160e1fce2276ae4958b8a6eef0c73
-
Branch / Tag:
refs/tags/v2.1.0
- Owner: https://github.com/hemantapkh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
publish.yml@c3c817a626e160e1fce2276ae4958b8a6eef0c73
-
Trigger Event:
release
-
Statement type:
File details
Details for the file 1337x-2.1.0-py3-none-any.whl
.
File metadata
- Download URL: 1337x-2.1.0-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
063c6990445d3ff285cc76fb79f1a2e9a2ffdef6eb3408564f41a72392ee3cf7
|
|
MD5 |
9686b4fc9f958bf75e88d27593e69f8e
|
|
BLAKE2b-256 |
5c75cce284bf32e21dae6865fb5b72666fcb1159cb6cf24eb2b9914909724048
|
Provenance
The following attestation bundles were made for 1337x-2.1.0-py3-none-any.whl
:
Publisher:
publish.yml
on hemantapkh/1337x
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
1337x-2.1.0-py3-none-any.whl
-
Subject digest:
063c6990445d3ff285cc76fb79f1a2e9a2ffdef6eb3408564f41a72392ee3cf7
- Sigstore transparency entry: 232410402
- Sigstore integration time:
-
Permalink:
hemantapkh/1337x@c3c817a626e160e1fce2276ae4958b8a6eef0c73
-
Branch / Tag:
refs/tags/v2.1.0
- Owner: https://github.com/hemantapkh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
publish.yml@c3c817a626e160e1fce2276ae4958b8a6eef0c73
-
Trigger Event:
release
-
Statement type: