Skip to main content

Python RedTube API Client

Here we go! I’d like to present simple module to access RedTube API. That API has a few methods to access their video library with external clients (such as this small piece of code). Only read access is provided at this moment.

So, I’ll show you one small example, how to use this cool library:

from redtube import RedClient

red = RedClient()
# Getting top of the top... I think so :)
collection = red.search()
# Search method provides list like object of type RedCollection with video entries of type RedVideo.
print type(collection)
# You can show you total videos for current search and current page
print collection.total, collection.page

# Let's search banana, it's good choice for this search engine
collection = red.search(query='banana', page=2)
# As you can see, we can access next page by page parameter
# Also you can access next page by calling next method from RedCollection instance
collection = red.next()

# You can access video entries by their internal ID
first = red.by_id('1')
# Or by some syntax sugar:
first = red[1]
print first # <RedVideo[1] "Heather taking it deep again">

# RedVideo entries has many useful information about video, ie:
print first.title, first.duration, first.url, first.player_url, first.embed
# As you can see, we can access video streaming url for this client or generate video embed code

# Also you can retrieve tag, category or star lists provided by RedTube
categories, tags, stars = red.categories, red.tags, red.stars
# This methods has internal cache, so you will do only one HTTP request for multi calls.

That’s all, guys! Have a nice day!

Metadata

Release files for redtube 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for redtube 0.5.0
File Size Uploaded Provenance
redtube-0.5.0.tar.gz 3.8 kB Without provenance Details

Release files / redtube-0.5.0.tar.gz

Download URL redtube-0.5.0.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d97519966951d256caa02f3e7f8728b717c0ed82cba42669a59622f59b408d68
BLAKE2b-256 checksum
How to use checksums
b1e332058913bcbac53893e92fb6132355ed2d842c42af5c4efe9f59ff332e81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for redtube 0.5.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page