Skip to main content

SDK Python pour accéder à l'API Movielens (Data Analysts/Data Scientists friendly)

Project description

MovieLens SDK - moviedex

Un SDK Python simple pour interagir avec l’API REST MovieLens. Il est conçu pour les Data Analysts et Data Scientists, avec une prise en charge native de Pydantic, dictionnaires et DataFrames Pandas.

PyPI version License: MIT


Installation

pip install moviedex

Configuration

from moviedex import MovieClient, MovieConfig

# Configuration avec l’URL de votre API (Render ou locale)
config = MovieConfig(movie_base_url="https://movie-backend-a-m-h.onrender.com")
client = MovieClient(config=config)

Tester le SDK

1. Health check

client.health_check()
# Retourne : {"status": "ok"}

2. Récupérer un film

movie = client.get_movie(1)
print(movie.title)

3. Liste de films au format DataFrame

df = client.list_movies(limit=5, output_format="pandas")
print(df.head())

Modes de sortie disponibles

Toutes les méthodes de liste (list_movies, list_ratings, etc.) peuvent retourner :

  • des objets Pydantic (défaut)
  • des dictionnaires
  • des DataFrames Pandas

Exemple :

client.list_movies(limit=10, output_format="dict")
client.list_ratings(limit=10, output_format="pandas")

Tester en local

Vous pouvez aussi utiliser une API locale :

config = MovieConfig(movie_base_url="http://localhost:8000")
client = MovieClient(config=config)

Public cible

  • Data Analysts
  • Data Scientists
  • Étudiants et curieux en Data
  • Développeurs Python

Licence

MIT License


Liens utiles

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

moviedex-0.0.2.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

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

moviedex-0.0.2-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file moviedex-0.0.2.tar.gz.

File metadata

  • Download URL: moviedex-0.0.2.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.5

File hashes

Hashes for moviedex-0.0.2.tar.gz
Algorithm Hash digest
SHA256 c5e0ee7db6e90e4ffc4c50b73cf726bdd6583be51764d911c0f12da8afd5913a
MD5 453ceb3be865740853fb9b56f531dd93
BLAKE2b-256 5462186a9faf326adcd0edd84d47234b44d5d218f8ebbe07feaba4e56eb70c98

See more details on using hashes here.

File details

Details for the file moviedex-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: moviedex-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.5

File hashes

Hashes for moviedex-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e3b83104e23109438e8ab5ac22fa135bd2e942fddb39e159abf572b63eb28ff6
MD5 0722ecbb4171022ec0519200f86b9407
BLAKE2b-256 040ba1f06aa150ba74a1079b2ed2738edc7545bf7e640e62892775d2e5d65ffa

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