An Python wrapper for TMDb API
Project description
ezapi-tmdb
A Python wrapper for TMDb API, supporting version 3
Install
pip install ezapi-tmdb
Test
git clone git@github.com:zehengl/ezapi-tmdb.git
export api_key="..."
export username="..."
export password="..."
cd ezapi-tmdb
python setup.py test
Usage
- All endpoints are mapped to funtions in a
TMDb
object - All query string params are used keyword arguments
See documents for detailed API usage.
from tmdb import TMDb
api_key = "..."
tmdb = TMDb(api_key)
# query string params are used as keyword arguments
print(tmdb.get_popular_movies(region="US"))
print(tmdb.get_tvs_on_the_air(page=10))
# create session_id with username/password login
username = "..."
password = "..."
request_token = tmdb.create_request_token().get("request_token")
tmdb.create_session_with_login(username, password, request_token)
session_id = tmdb.create_session(request_token).get("session_id")
# some endpoints require session_id
print(tmdb.get_account_details(session_id=session_id))
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
ezapi_tmdb-0.5.0.tar.gz
(10.8 kB
view details)
Built Distribution
File details
Details for the file ezapi_tmdb-0.5.0.tar.gz
.
File metadata
- Download URL: ezapi_tmdb-0.5.0.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a713f990dd9ae803abe561ed61be1a0ebb1e12a02839bc55a129c37db0e2ba14 |
|
MD5 | 857760ad4490c7b5f50286203edc2c25 |
|
BLAKE2b-256 | 06f280b5436d46e823495f01285ffa96c5c5336ebb471358e6128a171cc8d489 |
File details
Details for the file ezapi_tmdb-0.5.0-py3-none-any.whl
.
File metadata
- Download URL: ezapi_tmdb-0.5.0-py3-none-any.whl
- Upload date:
- Size: 25.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad0b6fb36aed47b8403936b404edc798a9b7bac0c2064bcaeca6ca597c51fa9d |
|
MD5 | f7d2b7280924c53b85368017f7acae3d |
|
BLAKE2b-256 | 7139f2543623578f943915876997e2f06758c4a5d1b8b434ae325dd6f673e097 |