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.
🚀 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
- API Render : https://projet-api-et-deploiement-2.onrender.com
- Documentation interactive : https://projet-api-et-deploiement-2.onrender.com/docs
- PyPI : https://pypi.org/project/sylla-films/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6a3e003ece37ae28dc18307ea84d0ee48f15ed90bffc74e8b34d5c8e0d87fc2
|
|
| MD5 |
cda24f4b6b1276b52c882c08c952913c
|
|
| BLAKE2b-256 |
a231f075771e6182fdc999854ac4a540e31a735ad0d1243622b93d0df051e219
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62a75c9dcb3fc583483538b04145a121382b22b0afb60c2815d01a3325bd4b6f
|
|
| MD5 |
cb86c4fdbdfbd0e46906bdbe5f73357b
|
|
| BLAKE2b-256 |
880bbd9a1200ed2629941c002402c92dd1fdb421dd264568c308fcd84b52d447
|