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.

Android / Pydroid compatibility

The base package does not require pydantic, so installation works on platforms where pydantic-core wheels are unavailable.

For typed Pydantic models on desktop/server environments, install:

pip install moviebox_api_v3[models]

On Android/Pydroid, prefer the raw dictionary methods such as get_content() instead of get_content_model().

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.2.tar.gz (175.5 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.2-py3-none-any.whl (224.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: moviebox_api_v3-3.0.2.tar.gz
  • Upload date:
  • Size: 175.5 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.2.tar.gz
Algorithm Hash digest
SHA256 a2c031b99236512ee21d483d76e1b627eb2b7ca6469fdccbe429ecbde6586257
MD5 25d3d25d680aa1800cba25e842089370
BLAKE2b-256 66660a393ae2de62a81bd6e301adb982237ad98bb9f0a4b5227fd965537ef032

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for moviebox_api_v3-3.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 acb842dd1c86d4776a24e9cdf4b7bd1abf0bbe93fce42280fee1a5c2384a492e
MD5 7527ea92ed66f78e4252c9eee1ae9b66
BLAKE2b-256 aa4764983a8f6263925cc8fbeb52a2a3b76aaa690f406d510dc61edfd3b8a28d

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