Skip to main content

Python async client library for MovieBox API v3

Project description

moviebox_api_v3

moviebox_api_v3 est une bibliothèque Python asynchrone pour interagir avec l'API MovieBox v3.

Projet non officiel. Ce package n'est pas affilié à MovieBox. Utilisez-le uniquement dans le respect des lois applicables et des conditions d'utilisation des services concernés.

Installation

pip install moviebox_api_v3

Avec les outils CLI :

pip install "moviebox_api_v3[cli]"

Exemple rapide

import asyncio

from moviebox_api_v3.v3.constants import SubjectType
from moviebox_api_v3.v3.core import Search
from moviebox_api_v3.v3.http_client import MovieBoxHttpClient


async def main():
    async with MovieBoxHttpClient(timeout=8) as client:
        api = Search(
            client_session=client,
            query="avatar",
            subject_type=SubjectType.ALL,
            page=1,
            per_page=10,
        )
        data = await api.get_content()
        print(data)


if __name__ == "__main__":
    asyncio.run(main())

Configuration région/langue

La bibliothèque lit plusieurs variables d'environnement avant l'import des constantes :

export MOVIEBOX_ACCEPT_LANGUAGE="fr-MG,fr-FR;q=0.95,fr;q=0.9,en-US;q=0.6,en;q=0.5"
export MOVIEBOX_ACCEPT_COUNTRY="MG"
export MOVIEBOX_ACCEPT_TIMEZONE="Indian/Antananarivo"
export MOVIEBOX_REGION="MG"
export MOVIEBOX_SYSTEM_LANGUAGE="fr"
export MOVIEBOX_LOCALE_TAG="fr_MG"
export MOVIEBOX_PREFERRED_DUB="French"

CLI

Après installation avec l'extra cli :

moviebox-api-v3 --help
moviebox-v3 --help

Publication PyPI

Les étapes complètes sont dans PUBLISH_PYPI.md.

Résumé :

python -m pip install --upgrade build twine
python -m build
python -m twine check dist/*
python -m twine upload --repository testpypi dist/*
python -m twine upload dist/*

Structure

moviebox_api_v3/
├── v1/
├── v2/
└── v3/

La partie recommandée pour les nouveaux projets est moviebox_api_v3.v3.

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

moviebox_api_v3-3.0.1.tar.gz (91.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

moviebox_api_v3-3.0.1-py3-none-any.whl (115.9 kB view details)

Uploaded Python 3

File details

Details for the file moviebox_api_v3-3.0.1.tar.gz.

File metadata

  • Download URL: moviebox_api_v3-3.0.1.tar.gz
  • Upload date:
  • Size: 91.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for moviebox_api_v3-3.0.1.tar.gz
Algorithm Hash digest
SHA256 454a3fab66c8bc8a9a31f6db6fc266f7f2c53857729219f4babd3341a10b7399
MD5 22019e1e6c0556d6631df384853b966c
BLAKE2b-256 00f8f2e83c317c76ecf494ce04319a4140d119972e237a7cf9a16a615cf7e132

See more details on using hashes here.

File details

Details for the file moviebox_api_v3-3.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for moviebox_api_v3-3.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c804aa2ab62af39a4dd95d4e96f98b785cea5cd6610b504c39883617210f7869
MD5 e591caae9062c1ab53f49fc5d215af87
BLAKE2b-256 34f9fb4cb8138ff5f0d4ea0254115057b60e364335e5bd18656641d86a939939

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page