Welcome to TMDbAPIs Documentation!
==========================================================
.. image:: https://img.shields.io/github/v/release/Kometa-Team/TMDbAPIs?style=plastic
:target: https://github.com/Kometa-Team/TMDbAPIs/releases
:alt: GitHub release (latest by date)
.. image:: https://img.shields.io/github/actions/workflow/status/Kometa-Team/TMDbAPIs/tests.yml?branch=master&style=plastic
:target: https://github.com/Kometa-Team/TMDbAPIs/actions/workflows/tests.yml
:alt: Build Testing
.. image:: https://img.shields.io/codecov/c/github/Kometa-Team/TMDbAPIs?color=greenred&style=plastic
:target: https://codecov.io/gh/Kometa-Team/TMDbAPIs
:alt: Build Coverage
.. image:: https://img.shields.io/github/commits-since/Kometa-Team/TMDbAPIs/latest?style=plastic
:target: https://github.com/Kometa-Team/TMDbAPIs/commits/master
:alt: GitHub commits since latest release (by date) for a branch
.. image:: https://img.shields.io/pypi/v/TMDbAPIs?style=plastic
:target: https://pypi.org/project/tmdbapis/
:alt: PyPI
.. image:: https://img.shields.io/pypi/dm/tmdbapis.svg?style=plastic
:target: https://pypi.org/project/tmdbapis/
:alt: Downloads
|
.. image:: https://img.shields.io/readthedocs/tmdbapis?color=%2300bc8c&style=plastic
:target: https://tmdbapis.kometa.wiki/en/latest/
:alt: Wiki
.. image:: https://img.shields.io/discord/822460010649878528?color=%2300bc8c&label=Discord&style=plastic
:target: https://kometa.wiki/en/latest/discord/
:alt: Discord
.. image:: https://img.shields.io/reddit/subreddit-subscribers/Kometa?color=%2300bc8c&label=r%2FKometa&style=plastic
:target: https://www.reddit.com/r/Kometa/
:alt: Reddit
.. image:: https://img.shields.io/github/sponsors/meisnate12?color=%238a2be2&style=plastic
:target: https://github.com/sponsors/meisnate12
:alt: GitHub Sponsors
.. image:: https://img.shields.io/badge/-Sponsor_or_Donate-blueviolet?style=plastic
:target: https://github.com/sponsors/Kometa-Team
:alt: Sponsor or Donate
Overview
----------------------------------------------------------
Unofficial Python bindings for the TMDb API. The goal is to make interaction with the API as easy as possible while emulating the endpoints as much as possible
Installation & Documentation
----------------------------------------------------------
.. code-block:: python
pip install tmdbapis
Documentation_ can be found at Read the Docs.
.. _Documentation: https://tmdbapis.kometa.wiki
Using the Object API
==========================================================
Getting a TMDbAPIs Instance
----------------------------------------------------------
To create a TMDbAPIs Object you need your V3 API Key, which can be found following `this guide <https://developers.themoviedb.org/3/getting-started/introduction>`_.
.. code-block:: python
from tmdbapis import TMDbAPIs
apikey = "0010843563404748808d3fc9c562c05e"
tmdb = TMDbAPIs(apikey)
Authenticating V3 API Token
----------------------------------------------------------
To authenticate your TMDb V3 API Token you can either authenticate your TMDb V4 Token or use the `authenticate() <https://tmdbapis.kometa.wiki/en/latest/objapi.html#tmdbapis.tmdb.TMDbAPIs.authenticate>`_ method.
.. code-block:: python
from tmdbapis import TMDbAPIs
apikey = "0010843563404748808d3fc9c562c05e"
tmdb = TMDbAPIs(apikey)
tmdb.authenticate(username, password)
Saving a V3 API Authenticated Session
----------------------------------------------------------
To save your authenticated session use the ``session_id`` Attribute.
.. code-block:: python
from tmdbapis import TMDbAPIs
apikey = "0010843563404748808d3fc9c562c05e"
tmdb = TMDbAPIs(apikey)
tmdb.authenticate(username, password)
with open("session_id.txt", "w") as text_file:
print(tmdb.session_id, file=text_file)
To load the authenticated session use the ``session_id`` Parameter of the `TMDbAPIs <https://tmdbapis.kometa.wiki/en/latest/objapi.html#tmdbapis.tmdb.TMDbAPIs>`_ constructor.
.. code-block:: python
from tmdbapis import TMDbAPIs
apikey = "0010843563404748808d3fc9c562c05e"
session_id = None
with open("session_id.txt") as text_file:
session_id = text_file.readline()
tmdb = TMDbAPIs(apikey, session_id=session_id)
Adding TMDb V4 API Read Access Token
----------------------------------------------------------
To gain read access to TMDb V4's API just provide you're TMDb V4 Access Token either using the ``v4_access_token`` Parameter of the `TMDbAPIs <https://tmdbapis.kometa.wiki/en/latest/objapi.html#tmdbapis.tmdb.TMDbAPIs>`_ constructor or by using the `v4_access_token() <https://tmdbapis.kometa.wiki/en/latest/objapi.html#tmdbapis.tmdb.TMDbAPIs.v4_access_token>`_ method.
To gain read access to TMDb V4's API need your TMDb V4 Access Token, which can be found following `this guide <https://developers.themoviedb.org/3/getting-started/introduction>`_.
.. code-block:: python
from tmdbapis import TMDbAPIs
apikey = "0010843563404748808d3fc9c562c05e"
v4_access_token = "sohsnrfiemrsdvsavvt4h426GWEGW434gSgSdnjhcyuwbBYHBOSIYCBWgyNTYxNTY4OGQ5NTJjZCIsInN1YiI6IjVkMzM5ZmI0MmY4ZDAfdfdgegeGGregerfge34345BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIvfdvsdfveregrgqgfsfghjhOR0shmZZ_ZekFiuyl7o56921C0"
tmdb = TMDbAPIs(apikey, v4_access_token=v4_access_token)
Authenticating TMDb V4 API Token
----------------------------------------------------------
To authenticate your TMDB V4 Read Access Token it is a multi step process.
1. Add your TMDb V4 API Read Access Token.
2. Authenticate the URL returned from `v4_authenticate() <https://tmdbapis.kometa.wiki/en/latest/objapi.html#tmdbapis.tmdb.TMDbAPIs.v4_authenticate>`_.
3. Once the URL has been authenticated you must approve it by running `v4_approved() <https://tmdbapis.kometa.wiki/en/latest/objapi.html#tmdbapis.tmdb.TMDbAPIs.v4_approved>`_.
.. code-block:: python
from tmdbapis import TMDbAPIs
apikey = "0010843563404748808d3fc9c562c05e"
v4_access_token = "sohsnrfiemrsdvsavvt4h426GWEGW434gSgSdnjhcyuwbBYHBOSIYCBWgyNTYxNTY4OGQ5NTJjZCIsInN1YiI6IjVkMzM5ZmI0MmY4ZDAfdfdgegeGGregerfge34345BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIvfdvsdfveregrgqgfsfghjhOR0shmZZ_ZekFiuyl7o56921C0"
tmdb = TMDbAPIs(apikey, v4_access_token=v4_access_token)
print(tmdb.v4_authenticate())
input("Navigate to the URL and then hit enter when Authenticated")
tmdb.v4_approved()
Saving a V4 API Authenticated Token
----------------------------------------------------------
To save your authenticated token use the ``v4_access_token`` Attribute.
.. code-block:: python
from tmdbapis import TMDbAPIs
apikey = "0010843563404748808d3fc9c562c05e"
v4_access_token = "sohsnrfiemrsdvsavvt4h426GWEGW434gSgSdnjhcyuwbBYHBOSIYCBWgyNTYxNTY4OGQ5NTJjZCIsInN1YiI6IjVkMzM5ZmI0MmY4ZDAfdfdgegeGGregerfge34345BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIvfdvsdfveregrgqgfsfghjhOR0shmZZ_ZekFiuyl7o56921C0"
tmdb = TMDbAPIs(apikey, v4_access_token=v4_access_token)
print(tmdb.v4_authenticate())
input("Navigate to the URL and then hit enter when Authenticated")
tmdb.v4_approved()
with open("access_token.txt", "w") as text_file:
print(tmdb.v4_access_token, file=text_file)
To load the authenticated token use the ``v4_access_token`` Parameter of the `TMDbAPIs <https://tmdbapis.kometa.wiki/en/latest/objapi.html#tmdbapis.tmdb.TMDbAPIs>`_ constructor or the `v4_access_token() <https://tmdbapis.kometa.wiki/en/latest/objapi.html#tmdbapis.tmdb.TMDbAPIs.v4_access_token>`_ method.
.. code-block:: python
from tmdbapis import TMDbAPIs
apikey = "0010843563404748808d3fc9c562c05e"
v4_access_token = None
with open("access_token.txt") as text_file:
v4_access_token = text_file.readline()
tmdb = TMDbAPIs(apikey, v4_access_token=v4_access_token)
Hyperlinks
----------------------------------------------------------
* `TMDb V3 API Docs <https://developers.themoviedb.org/3/getting-started/introduction>`_
* `TMDb V4 API Docs <https://developers.themoviedb.org/4/getting-started/authorization>`_
Usage & Contributions
----------------------------------------------------------
* Source is available on the `Github Project Page <https://github.com/Kometa-Team/TMDbAPIs>`_.
* Contributors to TMDbAPIs own their own contributions and may distribute that code under
the `MIT license <https://github.com/Kometa-Team/TMDbAPIs/blob/master/LICENSE.txt>`_.
Raw data
{
"_id": null,
"home_page": "https://github.com/Kometa-Team/TMDbAPIs",
"name": "tmdbapis",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "tmdbapis, tmdbapi, tmdb, wrapper, api",
"author": "Nathan Taggart",
"author_email": "kometateam@proton.me",
"download_url": "https://files.pythonhosted.org/packages/d0/69/4240fc5a58a35a40d9cbf3d2057d579a14b5b39f0a2d5dc92ecf32845e3c/tmdbapis-1.2.16.tar.gz",
"platform": null,
"description": "Welcome to TMDbAPIs Documentation!\n==========================================================\n\n.. image:: https://img.shields.io/github/v/release/Kometa-Team/TMDbAPIs?style=plastic\n :target: https://github.com/Kometa-Team/TMDbAPIs/releases\n :alt: GitHub release (latest by date)\n\n.. image:: https://img.shields.io/github/actions/workflow/status/Kometa-Team/TMDbAPIs/tests.yml?branch=master&style=plastic\n :target: https://github.com/Kometa-Team/TMDbAPIs/actions/workflows/tests.yml\n :alt: Build Testing\n\n.. image:: https://img.shields.io/codecov/c/github/Kometa-Team/TMDbAPIs?color=greenred&style=plastic\n :target: https://codecov.io/gh/Kometa-Team/TMDbAPIs\n :alt: Build Coverage\n\n.. image:: https://img.shields.io/github/commits-since/Kometa-Team/TMDbAPIs/latest?style=plastic\n :target: https://github.com/Kometa-Team/TMDbAPIs/commits/master\n :alt: GitHub commits since latest release (by date) for a branch\n\n.. image:: https://img.shields.io/pypi/v/TMDbAPIs?style=plastic\n :target: https://pypi.org/project/tmdbapis/\n :alt: PyPI\n\n.. image:: https://img.shields.io/pypi/dm/tmdbapis.svg?style=plastic\n :target: https://pypi.org/project/tmdbapis/\n :alt: Downloads\n\n|\n\n.. image:: https://img.shields.io/readthedocs/tmdbapis?color=%2300bc8c&style=plastic\n :target: https://tmdbapis.kometa.wiki/en/latest/\n :alt: Wiki\n\n.. image:: https://img.shields.io/discord/822460010649878528?color=%2300bc8c&label=Discord&style=plastic\n :target: https://kometa.wiki/en/latest/discord/\n :alt: Discord\n\n.. image:: https://img.shields.io/reddit/subreddit-subscribers/Kometa?color=%2300bc8c&label=r%2FKometa&style=plastic\n :target: https://www.reddit.com/r/Kometa/\n :alt: Reddit\n\n.. image:: https://img.shields.io/github/sponsors/meisnate12?color=%238a2be2&style=plastic\n :target: https://github.com/sponsors/meisnate12\n :alt: GitHub Sponsors\n\n.. image:: https://img.shields.io/badge/-Sponsor_or_Donate-blueviolet?style=plastic\n :target: https://github.com/sponsors/Kometa-Team\n :alt: Sponsor or Donate\n\n\nOverview\n----------------------------------------------------------\nUnofficial Python bindings for the TMDb API. The goal is to make interaction with the API as easy as possible while emulating the endpoints as much as possible\n\n\nInstallation & Documentation\n----------------------------------------------------------\n\n.. code-block:: python\n\n pip install tmdbapis\n\nDocumentation_ can be found at Read the Docs.\n\n.. _Documentation: https://tmdbapis.kometa.wiki\n\n\nUsing the Object API\n==========================================================\n\n\nGetting a TMDbAPIs Instance\n----------------------------------------------------------\n\nTo create a TMDbAPIs Object you need your V3 API Key, which can be found following `this guide <https://developers.themoviedb.org/3/getting-started/introduction>`_.\n\n.. code-block:: python\n\n from tmdbapis import TMDbAPIs\n\n apikey = \"0010843563404748808d3fc9c562c05e\"\n\n tmdb = TMDbAPIs(apikey)\n\n\nAuthenticating V3 API Token\n----------------------------------------------------------\n\nTo authenticate your TMDb V3 API Token you can either authenticate your TMDb V4 Token or use the `authenticate() <https://tmdbapis.kometa.wiki/en/latest/objapi.html#tmdbapis.tmdb.TMDbAPIs.authenticate>`_ method.\n\n.. code-block:: python\n\n from tmdbapis import TMDbAPIs\n\n apikey = \"0010843563404748808d3fc9c562c05e\"\n\n tmdb = TMDbAPIs(apikey)\n tmdb.authenticate(username, password)\n\n\nSaving a V3 API Authenticated Session\n----------------------------------------------------------\n\nTo save your authenticated session use the ``session_id`` Attribute.\n\n.. code-block:: python\n\n from tmdbapis import TMDbAPIs\n\n apikey = \"0010843563404748808d3fc9c562c05e\"\n\n tmdb = TMDbAPIs(apikey)\n tmdb.authenticate(username, password)\n with open(\"session_id.txt\", \"w\") as text_file:\n print(tmdb.session_id, file=text_file)\n\nTo load the authenticated session use the ``session_id`` Parameter of the `TMDbAPIs <https://tmdbapis.kometa.wiki/en/latest/objapi.html#tmdbapis.tmdb.TMDbAPIs>`_ constructor.\n\n.. code-block:: python\n\n from tmdbapis import TMDbAPIs\n\n apikey = \"0010843563404748808d3fc9c562c05e\"\n\n session_id = None\n with open(\"session_id.txt\") as text_file:\n session_id = text_file.readline()\n\n tmdb = TMDbAPIs(apikey, session_id=session_id)\n\n\nAdding TMDb V4 API Read Access Token\n----------------------------------------------------------\n\nTo gain read access to TMDb V4's API just provide you're TMDb V4 Access Token either using the ``v4_access_token`` Parameter of the `TMDbAPIs <https://tmdbapis.kometa.wiki/en/latest/objapi.html#tmdbapis.tmdb.TMDbAPIs>`_ constructor or by using the `v4_access_token() <https://tmdbapis.kometa.wiki/en/latest/objapi.html#tmdbapis.tmdb.TMDbAPIs.v4_access_token>`_ method.\n\nTo gain read access to TMDb V4's API need your TMDb V4 Access Token, which can be found following `this guide <https://developers.themoviedb.org/3/getting-started/introduction>`_.\n\n.. code-block:: python\n\n from tmdbapis import TMDbAPIs\n\n apikey = \"0010843563404748808d3fc9c562c05e\"\n v4_access_token = \"sohsnrfiemrsdvsavvt4h426GWEGW434gSgSdnjhcyuwbBYHBOSIYCBWgyNTYxNTY4OGQ5NTJjZCIsInN1YiI6IjVkMzM5ZmI0MmY4ZDAfdfdgegeGGregerfge34345BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIvfdvsdfveregrgqgfsfghjhOR0shmZZ_ZekFiuyl7o56921C0\"\n\n tmdb = TMDbAPIs(apikey, v4_access_token=v4_access_token)\n\n\nAuthenticating TMDb V4 API Token\n----------------------------------------------------------\n\nTo authenticate your TMDB V4 Read Access Token it is a multi step process.\n\n1. Add your TMDb V4 API Read Access Token.\n2. Authenticate the URL returned from `v4_authenticate() <https://tmdbapis.kometa.wiki/en/latest/objapi.html#tmdbapis.tmdb.TMDbAPIs.v4_authenticate>`_.\n3. Once the URL has been authenticated you must approve it by running `v4_approved() <https://tmdbapis.kometa.wiki/en/latest/objapi.html#tmdbapis.tmdb.TMDbAPIs.v4_approved>`_.\n\n.. code-block:: python\n\n from tmdbapis import TMDbAPIs\n\n apikey = \"0010843563404748808d3fc9c562c05e\"\n v4_access_token = \"sohsnrfiemrsdvsavvt4h426GWEGW434gSgSdnjhcyuwbBYHBOSIYCBWgyNTYxNTY4OGQ5NTJjZCIsInN1YiI6IjVkMzM5ZmI0MmY4ZDAfdfdgegeGGregerfge34345BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIvfdvsdfveregrgqgfsfghjhOR0shmZZ_ZekFiuyl7o56921C0\"\n\n tmdb = TMDbAPIs(apikey, v4_access_token=v4_access_token)\n\n print(tmdb.v4_authenticate())\n input(\"Navigate to the URL and then hit enter when Authenticated\")\n tmdb.v4_approved()\n\n\nSaving a V4 API Authenticated Token\n----------------------------------------------------------\n\nTo save your authenticated token use the ``v4_access_token`` Attribute.\n\n.. code-block:: python\n\n from tmdbapis import TMDbAPIs\n\n apikey = \"0010843563404748808d3fc9c562c05e\"\n v4_access_token = \"sohsnrfiemrsdvsavvt4h426GWEGW434gSgSdnjhcyuwbBYHBOSIYCBWgyNTYxNTY4OGQ5NTJjZCIsInN1YiI6IjVkMzM5ZmI0MmY4ZDAfdfdgegeGGregerfge34345BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIvfdvsdfveregrgqgfsfghjhOR0shmZZ_ZekFiuyl7o56921C0\"\n\n tmdb = TMDbAPIs(apikey, v4_access_token=v4_access_token)\n\n print(tmdb.v4_authenticate())\n input(\"Navigate to the URL and then hit enter when Authenticated\")\n tmdb.v4_approved()\n with open(\"access_token.txt\", \"w\") as text_file:\n print(tmdb.v4_access_token, file=text_file)\n\nTo load the authenticated token use the ``v4_access_token`` Parameter of the `TMDbAPIs <https://tmdbapis.kometa.wiki/en/latest/objapi.html#tmdbapis.tmdb.TMDbAPIs>`_ constructor or the `v4_access_token() <https://tmdbapis.kometa.wiki/en/latest/objapi.html#tmdbapis.tmdb.TMDbAPIs.v4_access_token>`_ method.\n\n.. code-block:: python\n\n from tmdbapis import TMDbAPIs\n\n apikey = \"0010843563404748808d3fc9c562c05e\"\n\n v4_access_token = None\n with open(\"access_token.txt\") as text_file:\n v4_access_token = text_file.readline()\n\n tmdb = TMDbAPIs(apikey, v4_access_token=v4_access_token)\n\n\nHyperlinks\n----------------------------------------------------------\n\n* `TMDb V3 API Docs <https://developers.themoviedb.org/3/getting-started/introduction>`_\n* `TMDb V4 API Docs <https://developers.themoviedb.org/4/getting-started/authorization>`_\n\nUsage & Contributions\n----------------------------------------------------------\n* Source is available on the `Github Project Page <https://github.com/Kometa-Team/TMDbAPIs>`_.\n* Contributors to TMDbAPIs own their own contributions and may distribute that code under\n the `MIT license <https://github.com/Kometa-Team/TMDbAPIs/blob/master/LICENSE.txt>`_.\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "A lightweight Python library for The V3 and V4 TMDb APIs.",
"version": "1.2.16",
"project_urls": {
"Documentation": "https://tmdbapis.kometa.wiki",
"Funding": "https://github.com/sponsors/meisnate12",
"Homepage": "https://github.com/Kometa-Team/TMDbAPIs",
"Issues": "https://github.com/Kometa-Team/TMDbAPIs/issues",
"Source": "https://github.com/Kometa-Team/TMDbAPIs"
},
"split_keywords": [
"tmdbapis",
" tmdbapi",
" tmdb",
" wrapper",
" api"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "cf8de8cd945fee82ece06243da9e3575d421852c43c623994e7fa58fe551311c",
"md5": "0f15d4bcdb74dd211c273167fbd49040",
"sha256": "28cd8fd37e48e4d5473818fb80b68f1f38bf7c3aeae41e9b1dcf6c7c63017c56"
},
"downloads": -1,
"filename": "tmdbapis-1.2.16-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0f15d4bcdb74dd211c273167fbd49040",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 57775,
"upload_time": "2024-04-25T06:19:33",
"upload_time_iso_8601": "2024-04-25T06:19:33.231746Z",
"url": "https://files.pythonhosted.org/packages/cf/8d/e8cd945fee82ece06243da9e3575d421852c43c623994e7fa58fe551311c/tmdbapis-1.2.16-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d0694240fc5a58a35a40d9cbf3d2057d579a14b5b39f0a2d5dc92ecf32845e3c",
"md5": "0369f5fc1bf7c9126df05ae3ceb60f4e",
"sha256": "21cabbefbceb3d6a53998c55f51aa87c24e118176b1877ca68705cbb2a7fa22e"
},
"downloads": -1,
"filename": "tmdbapis-1.2.16.tar.gz",
"has_sig": false,
"md5_digest": "0369f5fc1bf7c9126df05ae3ceb60f4e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 60062,
"upload_time": "2024-04-25T06:19:35",
"upload_time_iso_8601": "2024-04-25T06:19:35.360899Z",
"url": "https://files.pythonhosted.org/packages/d0/69/4240fc5a58a35a40d9cbf3d2057d579a14b5b39f0a2d5dc92ecf32845e3c/tmdbapis-1.2.16.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-25 06:19:35",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Kometa-Team",
"github_project": "TMDbAPIs",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "requests",
"specs": []
},
{
"name": "setuptools",
"specs": []
}
],
"lcname": "tmdbapis"
}