Skip to main content

Python SDK to access API MovieLens

Project description

MovieLens SDK - filmsdk_ibrahim

A simple Python SDK to interact with the MovieLens REST API. It is designed for Data Analysts and Data Scientists, with native support for Pydantic, dictionaries, and Pandas DataFrames.


Installation

pip install filmsdk_ibrahim

Configuration to test on local machine

from filmsdk-ibrahim import MovieClient, MovieConfig

# Configuration with your API URL (local via docker)
config = MovieConfig(movie_base_url="http://localhost:5050")
client = MovieClient(config=config)

Test SDK

1. Health check

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

2. Get a film

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

3. List of films in DataFrame format

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

Available output modes

All listing methods (list_movies, list_ratings, etc.) can return:

Pydantic objects (default)

Dictionaries

Pandas DataFrames

Example :

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

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

filmsdk_ibrahim-0.0.3.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

filmsdk_ibrahim-0.0.3-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: filmsdk_ibrahim-0.0.3.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for filmsdk_ibrahim-0.0.3.tar.gz
Algorithm Hash digest
SHA256 2b9e41e9a65cf132c59ff4380a01f9f5d8cd1d1ba3c1da3925a1119c195f04a9
MD5 e2c0acb611827a54db109d2a966786b0
BLAKE2b-256 07df96e684f41e63dd1766c56ed311493a5db7638880c546ce0198850adacb91

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for filmsdk_ibrahim-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3b34d9e172a5e2a42cc864abda13133d3b2253ad8442ab3f2a47f680899aec9f
MD5 82cb781c225d680ca752c123260b545d
BLAKE2b-256 b7ec2234e3f82cfb559a3b48c945daacc98675c0e8859f4aaee5a020a8d37f34

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