MovieLens SDK - films_sdk_sbre
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.
Installation
pip install films_sdk_sbre
Configuration
from films_sdk_sbre import MovieClient, MovieConfig
# Configuration avec l’URL de votre API (Render ou locale)
config = MovieConfig(movie_base_url="https://movie-backend-x8iq.onrender.com")
client = MovieClient(config=config)
Nouvelles tentatives
Depuis la version 0.0.3, le client réessaie automatiquement, avec un délai croissant, les erreurs réseau, les erreurs 5xx (par exemple pendant le réveil de l'API hébergée) et les erreurs 429. Les erreurs du client (404, 422…) ne sont pas réessayées.
MovieConfig(movie_base_url=..., backoff=True, backoff_max_time=30) # valeurs par défaut
MovieConfig(movie_base_url=..., backoff=False) # une seule tentative
Tester le SDK
1. Health check
client.health_check()
# Retourne : {"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 :
- 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
- API Render : https://movie-backend-x8iq.onrender.com
- PyPI : https://pypi.org/project/films_sdk_sbre
Metadata
Release files for films-sdk-sbre 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| films_sdk_sbre-0.0.3.tar.gz | 8.0 kB | With provenance | Details for films_sdk_sbre-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| films_sdk_sbre-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for films_sdk_sbre-0.0.3-py3-none-any.whl |
Total release size: 14.7 kB
Release files / films_sdk_sbre-0.0.3.tar.gz
| Download URL | films_sdk_sbre-0.0.3.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c92611d5e49e6195db190176fb40437a978082e1934b0454a6ef0643a0508402
|
|
BLAKE2b-256 checksum How to use checksums |
5947f56e87e2fbff4c60d185909f1cf1f62f9d0cc74a23901946ab7272569228
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.
Transparency logRelease files / films_sdk_sbre-0.0.3-py3-none-any.whl
| Download URL | films_sdk_sbre-0.0.3-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ce8fb1755d80bc7f39b8fbd778b1b5a1103158f4dc75b70415f264f401f5e3d1
|
|
BLAKE2b-256 checksum How to use checksums |
9e9e55e6faa6562bd4dc86a31f110d2cdab4bad2d76929ede815b7a4a8ad3864
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.
Transparency logSecurity for films-sdk-sbre 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for films_sdk_sbre-0.0.3.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.