Skip to main content

SDK Python pour accéder à l’API MovieLens

Project description

MovieLens SDK - moviespac

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 :

  • Objets Pydantic
  • Dictionnaires JSON
  • DataFrames Pandas

PyPI version License: MIT


Installation

pip install moviespac

Configuration

from moviespac import MovieClient, MovieConfig

# Configuration avec l’URL de votre API (Render ou locale)
config = MovieConfig(movie_base_url="https://film-api-3i06.onrender.com")
client = MovieClient(config=config)

Tester le SDK

1. Health check

client.health_check()
# {"message": "API MovieLens opérationnelle"}

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 trois types de formats :

  • 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

Liens utiles


Licence

MIT License – libre pour usage éducatif et expérimental.

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

moviespac-0.0.1.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

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

moviespac-0.0.1-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file moviespac-0.0.1.tar.gz.

File metadata

  • Download URL: moviespac-0.0.1.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for moviespac-0.0.1.tar.gz
Algorithm Hash digest
SHA256 02e9f8fbbd4715ba845d0cc8f8bab7aa35749fa480fe755c31e40b9c8cc65c24
MD5 98048b771d06536d7dcec07f3ed10e73
BLAKE2b-256 67a6bbd58f11cd23df43b1d5720bc5d87154d1859f6cf2e05f935c881679c5fb

See more details on using hashes here.

File details

Details for the file moviespac-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: moviespac-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for moviespac-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1b09434fea3346c3788836a748b320eb324b3e099e2fb98e7f985e9598b375e2
MD5 a5fbeeb01248d777993f60a81023676b
BLAKE2b-256 6cadc72ec2a8b9ff4b7e94ffa9754c67fe75d5ecb1e3948530a53984df5355ef

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