Skip to main content

SDK Python pour accéder à l’API MovieLens (compatible Data Analysts/Data Scientists)

Project description

🎬 MovieLens SDK - sylla_films

Un SDK Python moderne permettant d’accéder à l’API MovieLens
déployée sur Render.
Idéal pour les Data Analysts, Data Scientists, étudiants, et projets ML.

PyPI version License: MIT


🚀 Installation

pip install sylla_films

⚙️ Configuration

from sylla_films.film_client import MovieClient
from sylla_films.film_config import MovieConfig

config = MovieConfig(
    movie_base_url="https://projet-api-et-deploiement-2.onrender.com"
)

client = MovieClient(config=config)

Ou via une variable d’environnement :

MOVIE_API_BASE_URL=https://projet-api-et-deploiement-2.onrender.com

Puis :

client = MovieClient()

🩺 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)

Résultat :

Toy Story (1995)

📋 3. Liste de films dans plusieurs formats

a) Format Pydantic (par défaut)

movies = client.list_movies(limit=5)
print(movies[0].title)

b) Format dictionnaire

movies_dict = client.list_movies(limit=5, output_format="dict")

c) Format Pandas DataFrame

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

⭐ Formats supportés

Format demandé Retour
"pydantic" (défaut) Liste d’objets Pydantic
"dict" Liste de dictionnaires
"pandas" Pandas DataFrame

Exemple :

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

🧩 Travailler avec les autres endpoints

🎭 Rating

rating = client.get_rating(user_id=1, movie_id=1)
print(rating.rating)

🏷️ Tags

tags = client.list_tags(limit=5, output_format="dict")

🔗 Liens IMDB / TMDB

link = client.get_link(1)
print(link.imdbId)

📊 Analytics global

analytics = client.get_analytics()
print(analytics.movie_count)

🧪 Tester avec une API locale

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

👥 Public cible

  • Data Analysts
  • Data Scientists
  • Étudiants
  • Développeurs Python
  • Projets ML / IA

📄 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

sylla_films-0.0.3.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

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

sylla_films-0.0.3-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file sylla_films-0.0.3.tar.gz.

File metadata

  • Download URL: sylla_films-0.0.3.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for sylla_films-0.0.3.tar.gz
Algorithm Hash digest
SHA256 c6a3e003ece37ae28dc18307ea84d0ee48f15ed90bffc74e8b34d5c8e0d87fc2
MD5 cda24f4b6b1276b52c882c08c952913c
BLAKE2b-256 a231f075771e6182fdc999854ac4a540e31a735ad0d1243622b93d0df051e219

See more details on using hashes here.

File details

Details for the file sylla_films-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: sylla_films-0.0.3-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.5

File hashes

Hashes for sylla_films-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 62a75c9dcb3fc583483538b04145a121382b22b0afb60c2815d01a3325bd4b6f
MD5 cb86c4fdbdfbd0e46906bdbe5f73357b
BLAKE2b-256 880bbd9a1200ed2629941c002402c92dd1fdb421dd264568c308fcd84b52d447

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