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/a3/cb/fe2ce7062996c0bca05a27d10f272a8fd921c2b8c4ededbd903265910bbc/tmdbapis-1.2.21.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.21",
"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": "7c65dcebc99f016450636425387f24c6230aafc770cc9e864773dca22ca972d4",
"md5": "b70c641c33fb8766e344d114a4205426",
"sha256": "a11f2d2c4f033bb30577ba558d9d435fcd62274a45d8a179cff1e2516b4da0b9"
},
"downloads": -1,
"filename": "tmdbapis-1.2.21-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b70c641c33fb8766e344d114a4205426",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 57932,
"upload_time": "2024-09-26T17:38:12",
"upload_time_iso_8601": "2024-09-26T17:38:12.886237Z",
"url": "https://files.pythonhosted.org/packages/7c/65/dcebc99f016450636425387f24c6230aafc770cc9e864773dca22ca972d4/tmdbapis-1.2.21-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a3cbfe2ce7062996c0bca05a27d10f272a8fd921c2b8c4ededbd903265910bbc",
"md5": "fb669fda198910d21171caaefe441887",
"sha256": "6630177ac2f894e7e671295a0a1b03f8e69aeb6ffda748c081727df7453c3eef"
},
"downloads": -1,
"filename": "tmdbapis-1.2.21.tar.gz",
"has_sig": false,
"md5_digest": "fb669fda198910d21171caaefe441887",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 60204,
"upload_time": "2024-09-26T17:38:14",
"upload_time_iso_8601": "2024-09-26T17:38:14.835996Z",
"url": "https://files.pythonhosted.org/packages/a3/cb/fe2ce7062996c0bca05a27d10f272a8fd921c2b8c4ededbd903265910bbc/tmdbapis-1.2.21.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-26 17:38:14",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Kometa-Team",
"github_project": "TMDbAPIs",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "tmdbapis"
}