Python client for the Festival API — film festival data for developers
Project description
Festival API — Python Client
Client library for the Festival API.
pip install festivalapi
Usage
from festivalapi import FestivalAPI
client = FestivalAPI("fes_your_api_key")
# Search festivals
festivals = client.festivals.list(category="short_film")
# Get festival detail
festival = client.festivals.get(1)
# Get festival roster (past winners / screened films)
roster = client.festivals.roster(1)
# Get scored festivals
scored = client.festivals.scored(min_score=70)
# List available category codes (requires auth)
categories = client.categories()
for cat in categories["results"]:
print(f'{cat["category"]} ({cat["count"]})')
# Health check (no auth)
client.health()
Categories
Call client.categories() to get all available category codes. Returns:
{
"count": 158,
"results": [
{"category": "short_film", "count": 60},
{"category": "feature", "count": 55},
{"category": "documentary", "count": 31},
{"category": "animation", "count": 14},
{"category": "horror", "count": 12},
{"category": "experimental", "count": 10},
{"category": "ai", "count": 10},
{"category": "music_video", "count": 14},
{"category": "web_series", "count": 9},
{"category": "comedy", "count": 5},
{"category": "sci_fi", "count": 5},
{"category": "student", "count": 5},
{"category": "lgbtq", "count": 3},
{"category": "vr_360", "count": 2},
...
]
}
Common filters: short_film, feature, documentary, animation, horror, sci_fi, comedy, experimental, music_video, ai, web_series, student, lgbtq, vr_360.
Use the category field (lowercase) as the filter value — e.g. client.festivals.list(category="horror").
API Key
Sign up at festivalapi.com to get your API key (starts with fes_). You can also set the FESTIVALAPI_KEY environment variable.
Error Handling
from festivalapi import FestivalAPI, NotFoundError, InsufficientCreditsError
client = FestivalAPI("fes_your_api_key")
try:
festival = client.festivals.get(999999)
except NotFoundError:
print("Festival not found")
except InsufficientCreditsError as e:
print(f"Need more credits: {e}")
Requirements
- Python 3.9+
- Zero dependencies (uses only stdlib
urllib)
License
MIT
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 festivalapi-0.2.2.tar.gz.
File metadata
- Download URL: festivalapi-0.2.2.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5fd299c5751dc25b7b2651bb1b6a3e848c95a3c7cffb91b97719a58f8a059671
|
|
| MD5 |
4d075b1830811dfc65c7f5ac72f3280e
|
|
| BLAKE2b-256 |
69ffec5e3944ef990c434753cf9f801a9fb801cbbb1229866f7a0cbd1e029412
|
File details
Details for the file festivalapi-0.2.2-py3-none-any.whl.
File metadata
- Download URL: festivalapi-0.2.2-py3-none-any.whl
- Upload date:
- Size: 5.2 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 |
58d05484c1d6f9ccbf02779c414ba2a751cc066dbd74cc917df8c2092051e659
|
|
| MD5 |
075424f237c27df426f6c08d7502da8a
|
|
| BLAKE2b-256 |
c62b6530c366ed41ce9e31ce1e385e37d5a62954afd5be3535f20925a871544e
|