Skip to main content

Unofficial API of 1337x.to

Project description

1337x

Stars Issues

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 a category may 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

1337x-2.1.1.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

1337x-2.1.1-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file 1337x-2.1.1.tar.gz.

File metadata

  • Download URL: 1337x-2.1.1.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for 1337x-2.1.1.tar.gz
Algorithm Hash digest
SHA256 a3659536f6139c19c253ae0373efe2f9ebd98bab577c51a6b79913290baa16cc
MD5 9b014c9234e95608659ecf87395bf4c6
BLAKE2b-256 d8432007840a5d119a3f72d6c2765fd3a533baa20f0168fba5dacfee167d8f3d

See more details on using hashes here.

Provenance

The following attestation bundles were made for 1337x-2.1.1.tar.gz:

Publisher: publish.yml on hemantapkh/1337x

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file 1337x-2.1.1-py3-none-any.whl.

File metadata

  • Download URL: 1337x-2.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for 1337x-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c33363b8cc66a1c762dc67c4557f75e904cf21f7d4cf5e16d339bdcad1dd1dec
MD5 3c356a4f42d1871ff57233ef9ea68985
BLAKE2b-256 07eba014407685802f81d15b1527cadc3c179a8c1da9dc8775b241cc872f24a3

See more details on using hashes here.

Provenance

The following attestation bundles were made for 1337x-2.1.1-py3-none-any.whl:

Publisher: publish.yml on hemantapkh/1337x

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page