Python client for the Friday Movie Club API
Project description
Friday Movie Club Client
Python client for the Friday Movie Club API.
fmc wraps the FMC REST API in a synchronous, typed client built on
httpx and pydantic.
Resources are exposed as attributes on a single FMCClient:
| Attribute | Purpose |
|---|---|
client.auth |
Register, login (email/password or PAT), refresh tokens |
client.users |
Current-user profile and personal access tokens |
client.clubs |
Club CRUD, members, invitations, cover images |
client.movies |
Movie suggestions, rankings, TMDB search |
client.events |
Event CRUD, RSVPs, movie assignment |
Requirements
- Python 3.12+
Installation
pip install python-fmc
Or with uv:
uv add python-fmc
Quickstart
from fmc import FMCClient
with FMCClient(base_url="https://api.example.com/api/v1") as client:
# Login with email/password (sets the access token on the client)
client.auth.login(email="user@example.com", password="hunter2")
# Or login with a Personal Access Token
# client.auth.login(token="fmc_pat_...")
# Create a club and list its members
club = client.clubs.create("Friday Movie Club", description="Weekly hangout")
members = client.clubs.list_members(club.id)
for user in members.items:
print(user.name, user.email)
If you already have an access token, pass it directly:
client = FMCClient(base_url="...", token="eyJhbGciOi...")
Errors
API errors are raised as subclasses of FMCError:
from fmc import FMCClient, NotFoundError, ValidationError
try:
club = client.clubs.get("00000000-0000-0000-0000-000000000000")
except NotFoundError:
...
except ValidationError as e:
...
Available exceptions: APIError, AuthenticationError, ForbiddenError,
NotFoundError, ConflictError, ValidationError — all inherit from FMCError.
Examples
The examples/ directory contains runnable scripts that
read BASE_URL and AUTH_TOKEN from the environment:
create-club/— create a club if it doesn't already existcreate-suggestions/— bulk-suggest movies from a JSON filecreate-events/— create movie-night events from a JSON file
export BASE_URL=https://api.example.com/api/v1
export AUTH_TOKEN=fmc_pat_...
python examples/create-club/create-club.py
Development
This project uses uv for dependency management and ruff for linting.
uv sync
uv run ruff check
uv build
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
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 python_fmc-1.1.0.tar.gz.
File metadata
- Download URL: python_fmc-1.1.0.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92e5788291e4287b86db9b60e9a9433ce1dfbe3250b38087664bc71e4fb5d3a7
|
|
| MD5 |
ca52fb4e564b6e5997072c513800b73f
|
|
| BLAKE2b-256 |
95d8366c73e4685e352a6ce0effcd7bd7305333a0353cf6a67890797f43e5e45
|
Provenance
The following attestation bundles were made for python_fmc-1.1.0.tar.gz:
Publisher:
publish.yml on friday-movie-club/pyfmc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_fmc-1.1.0.tar.gz -
Subject digest:
92e5788291e4287b86db9b60e9a9433ce1dfbe3250b38087664bc71e4fb5d3a7 - Sigstore transparency entry: 1450574254
- Sigstore integration time:
-
Permalink:
friday-movie-club/pyfmc@b027d0fdd212861eb89bea2f4c83e4fe829be690 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/friday-movie-club
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b027d0fdd212861eb89bea2f4c83e4fe829be690 -
Trigger Event:
push
-
Statement type:
File details
Details for the file python_fmc-1.1.0-py3-none-any.whl.
File metadata
- Download URL: python_fmc-1.1.0-py3-none-any.whl
- Upload date:
- Size: 12.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
315ec9a7355da284d5f7b3d87be2e9a56124796aa9e12402a67f5e5b986a838d
|
|
| MD5 |
05a464c03a2e814a047c99c0cf0881ae
|
|
| BLAKE2b-256 |
6c4f98362249c869be750ccaa6a273a8cdd8997617d212ea5400ebd60170e1cc
|
Provenance
The following attestation bundles were made for python_fmc-1.1.0-py3-none-any.whl:
Publisher:
publish.yml on friday-movie-club/pyfmc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_fmc-1.1.0-py3-none-any.whl -
Subject digest:
315ec9a7355da284d5f7b3d87be2e9a56124796aa9e12402a67f5e5b986a838d - Sigstore transparency entry: 1450574327
- Sigstore integration time:
-
Permalink:
friday-movie-club/pyfmc@b027d0fdd212861eb89bea2f4c83e4fe829be690 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/friday-movie-club
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b027d0fdd212861eb89bea2f4c83e4fe829be690 -
Trigger Event:
push
-
Statement type: