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

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


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.0.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

1337x-2.1.0-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

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

Hashes for 1337x-2.1.0.tar.gz
Algorithm Hash digest
SHA256 c0f473224bae51ec01d30ddb2a9dccc65ecdd5407746e721891615200ccbf7c1
MD5 fd30797737858e965867815ab816fbf5
BLAKE2b-256 459c941e97184021993ba30a584531d81ed67f1683962783795091dc6f10d45d

See more details on using hashes here.

Provenance

The following attestation bundles were made for 1337x-2.1.0.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.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

Hashes for 1337x-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 063c6990445d3ff285cc76fb79f1a2e9a2ffdef6eb3408564f41a72392ee3cf7
MD5 9686b4fc9f958bf75e88d27593e69f8e
BLAKE2b-256 5c75cce284bf32e21dae6865fb5b72666fcb1159cb6cf24eb2b9914909724048

See more details on using hashes here.

Provenance

The following attestation bundles were made for 1337x-2.1.0-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 Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page