festivalapi 0.2.0__tar.gz → 0.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {festivalapi-0.2.0 → festivalapi-0.2.2}/PKG-INFO +39 -6
- festivalapi-0.2.2/README.md +94 -0
- {festivalapi-0.2.0 → festivalapi-0.2.2}/festivalapi/client.py +2 -2
- {festivalapi-0.2.0 → festivalapi-0.2.2}/festivalapi.egg-info/PKG-INFO +39 -6
- {festivalapi-0.2.0 → festivalapi-0.2.2}/pyproject.toml +1 -1
- festivalapi-0.2.0/README.md +0 -61
- {festivalapi-0.2.0 → festivalapi-0.2.2}/festivalapi/__init__.py +0 -0
- {festivalapi-0.2.0 → festivalapi-0.2.2}/festivalapi/exceptions.py +0 -0
- {festivalapi-0.2.0 → festivalapi-0.2.2}/festivalapi.egg-info/SOURCES.txt +0 -0
- {festivalapi-0.2.0 → festivalapi-0.2.2}/festivalapi.egg-info/dependency_links.txt +0 -0
- {festivalapi-0.2.0 → festivalapi-0.2.2}/festivalapi.egg-info/top_level.txt +0 -0
- {festivalapi-0.2.0 → festivalapi-0.2.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: festivalapi
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: Python client for the Festival API — film festival data for developers
|
|
5
5
|
Author-email: Festival API <hello@festivalapi.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -34,7 +34,7 @@ pip install festivalapi
|
|
|
34
34
|
```python
|
|
35
35
|
from festivalapi import FestivalAPI
|
|
36
36
|
|
|
37
|
-
client = FestivalAPI("
|
|
37
|
+
client = FestivalAPI("fes_your_api_key")
|
|
38
38
|
|
|
39
39
|
# Search festivals
|
|
40
40
|
festivals = client.festivals.list(category="short_film")
|
|
@@ -42,29 +42,62 @@ festivals = client.festivals.list(category="short_film")
|
|
|
42
42
|
# Get festival detail
|
|
43
43
|
festival = client.festivals.get(1)
|
|
44
44
|
|
|
45
|
-
# Get festival roster
|
|
45
|
+
# Get festival roster (past winners / screened films)
|
|
46
46
|
roster = client.festivals.roster(1)
|
|
47
47
|
|
|
48
48
|
# Get scored festivals
|
|
49
49
|
scored = client.festivals.scored(min_score=70)
|
|
50
50
|
|
|
51
|
-
# List
|
|
51
|
+
# List available category codes (requires auth)
|
|
52
52
|
categories = client.categories()
|
|
53
|
+
for cat in categories["results"]:
|
|
54
|
+
print(f'{cat["category"]} ({cat["count"]})')
|
|
53
55
|
|
|
54
56
|
# Health check (no auth)
|
|
55
57
|
client.health()
|
|
56
58
|
```
|
|
57
59
|
|
|
60
|
+
## Categories
|
|
61
|
+
|
|
62
|
+
Call `client.categories()` to get all available category codes. Returns:
|
|
63
|
+
|
|
64
|
+
```python
|
|
65
|
+
{
|
|
66
|
+
"count": 158,
|
|
67
|
+
"results": [
|
|
68
|
+
{"category": "short_film", "count": 60},
|
|
69
|
+
{"category": "feature", "count": 55},
|
|
70
|
+
{"category": "documentary", "count": 31},
|
|
71
|
+
{"category": "animation", "count": 14},
|
|
72
|
+
{"category": "horror", "count": 12},
|
|
73
|
+
{"category": "experimental", "count": 10},
|
|
74
|
+
{"category": "ai", "count": 10},
|
|
75
|
+
{"category": "music_video", "count": 14},
|
|
76
|
+
{"category": "web_series", "count": 9},
|
|
77
|
+
{"category": "comedy", "count": 5},
|
|
78
|
+
{"category": "sci_fi", "count": 5},
|
|
79
|
+
{"category": "student", "count": 5},
|
|
80
|
+
{"category": "lgbtq", "count": 3},
|
|
81
|
+
{"category": "vr_360", "count": 2},
|
|
82
|
+
...
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Common filters: `short_film`, `feature`, `documentary`, `animation`, `horror`, `sci_fi`, `comedy`, `experimental`, `music_video`, `ai`, `web_series`, `student`, `lgbtq`, `vr_360`.
|
|
88
|
+
|
|
89
|
+
Use the `category` field (lowercase) as the filter value — e.g. `client.festivals.list(category="horror")`.
|
|
90
|
+
|
|
58
91
|
## API Key
|
|
59
92
|
|
|
60
|
-
Sign up at [festivalapi.com](https://festivalapi.com) to get your API key. You can also set the `FESTIVALAPI_KEY` environment variable.
|
|
93
|
+
Sign up at [festivalapi.com](https://festivalapi.com) to get your API key (starts with `fes_`). You can also set the `FESTIVALAPI_KEY` environment variable.
|
|
61
94
|
|
|
62
95
|
## Error Handling
|
|
63
96
|
|
|
64
97
|
```python
|
|
65
98
|
from festivalapi import FestivalAPI, NotFoundError, InsufficientCreditsError
|
|
66
99
|
|
|
67
|
-
client = FestivalAPI("
|
|
100
|
+
client = FestivalAPI("fes_your_api_key")
|
|
68
101
|
|
|
69
102
|
try:
|
|
70
103
|
festival = client.festivals.get(999999)
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Festival API — Python Client
|
|
2
|
+
|
|
3
|
+
Client library for the [Festival API](https://festivalapi.com).
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
pip install festivalapi
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```python
|
|
12
|
+
from festivalapi import FestivalAPI
|
|
13
|
+
|
|
14
|
+
client = FestivalAPI("fes_your_api_key")
|
|
15
|
+
|
|
16
|
+
# Search festivals
|
|
17
|
+
festivals = client.festivals.list(category="short_film")
|
|
18
|
+
|
|
19
|
+
# Get festival detail
|
|
20
|
+
festival = client.festivals.get(1)
|
|
21
|
+
|
|
22
|
+
# Get festival roster (past winners / screened films)
|
|
23
|
+
roster = client.festivals.roster(1)
|
|
24
|
+
|
|
25
|
+
# Get scored festivals
|
|
26
|
+
scored = client.festivals.scored(min_score=70)
|
|
27
|
+
|
|
28
|
+
# List available category codes (requires auth)
|
|
29
|
+
categories = client.categories()
|
|
30
|
+
for cat in categories["results"]:
|
|
31
|
+
print(f'{cat["category"]} ({cat["count"]})')
|
|
32
|
+
|
|
33
|
+
# Health check (no auth)
|
|
34
|
+
client.health()
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Categories
|
|
38
|
+
|
|
39
|
+
Call `client.categories()` to get all available category codes. Returns:
|
|
40
|
+
|
|
41
|
+
```python
|
|
42
|
+
{
|
|
43
|
+
"count": 158,
|
|
44
|
+
"results": [
|
|
45
|
+
{"category": "short_film", "count": 60},
|
|
46
|
+
{"category": "feature", "count": 55},
|
|
47
|
+
{"category": "documentary", "count": 31},
|
|
48
|
+
{"category": "animation", "count": 14},
|
|
49
|
+
{"category": "horror", "count": 12},
|
|
50
|
+
{"category": "experimental", "count": 10},
|
|
51
|
+
{"category": "ai", "count": 10},
|
|
52
|
+
{"category": "music_video", "count": 14},
|
|
53
|
+
{"category": "web_series", "count": 9},
|
|
54
|
+
{"category": "comedy", "count": 5},
|
|
55
|
+
{"category": "sci_fi", "count": 5},
|
|
56
|
+
{"category": "student", "count": 5},
|
|
57
|
+
{"category": "lgbtq", "count": 3},
|
|
58
|
+
{"category": "vr_360", "count": 2},
|
|
59
|
+
...
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Common filters: `short_film`, `feature`, `documentary`, `animation`, `horror`, `sci_fi`, `comedy`, `experimental`, `music_video`, `ai`, `web_series`, `student`, `lgbtq`, `vr_360`.
|
|
65
|
+
|
|
66
|
+
Use the `category` field (lowercase) as the filter value — e.g. `client.festivals.list(category="horror")`.
|
|
67
|
+
|
|
68
|
+
## API Key
|
|
69
|
+
|
|
70
|
+
Sign up at [festivalapi.com](https://festivalapi.com) to get your API key (starts with `fes_`). You can also set the `FESTIVALAPI_KEY` environment variable.
|
|
71
|
+
|
|
72
|
+
## Error Handling
|
|
73
|
+
|
|
74
|
+
```python
|
|
75
|
+
from festivalapi import FestivalAPI, NotFoundError, InsufficientCreditsError
|
|
76
|
+
|
|
77
|
+
client = FestivalAPI("fes_your_api_key")
|
|
78
|
+
|
|
79
|
+
try:
|
|
80
|
+
festival = client.festivals.get(999999)
|
|
81
|
+
except NotFoundError:
|
|
82
|
+
print("Festival not found")
|
|
83
|
+
except InsufficientCreditsError as e:
|
|
84
|
+
print(f"Need more credits: {e}")
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Requirements
|
|
88
|
+
|
|
89
|
+
- Python 3.9+
|
|
90
|
+
- Zero dependencies (uses only stdlib `urllib`)
|
|
91
|
+
|
|
92
|
+
## License
|
|
93
|
+
|
|
94
|
+
MIT
|
|
@@ -18,7 +18,7 @@ class FestivalAPI:
|
|
|
18
18
|
"""Client for the Festival API.
|
|
19
19
|
|
|
20
20
|
Args:
|
|
21
|
-
api_key: Your Festival API key (starts with '
|
|
21
|
+
api_key: Your Festival API key (starts with 'fes_').
|
|
22
22
|
base_url: Override the API base URL. Defaults to production.
|
|
23
23
|
timeout: Request timeout in seconds. Default 30.
|
|
24
24
|
"""
|
|
@@ -36,7 +36,7 @@ class FestivalAPI:
|
|
|
36
36
|
self.timeout = timeout
|
|
37
37
|
self.festivals = FestivalEndpoints(self)
|
|
38
38
|
self.health = lambda: self._get("/health", auth_required=False)
|
|
39
|
-
self.categories = lambda: self._get("/categories"
|
|
39
|
+
self.categories = lambda: self._get("/categories")
|
|
40
40
|
|
|
41
41
|
def _auth_headers(self) -> Dict[str, str]:
|
|
42
42
|
return {"Authorization": f"Bearer {self.api_key}"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: festivalapi
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: Python client for the Festival API — film festival data for developers
|
|
5
5
|
Author-email: Festival API <hello@festivalapi.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -34,7 +34,7 @@ pip install festivalapi
|
|
|
34
34
|
```python
|
|
35
35
|
from festivalapi import FestivalAPI
|
|
36
36
|
|
|
37
|
-
client = FestivalAPI("
|
|
37
|
+
client = FestivalAPI("fes_your_api_key")
|
|
38
38
|
|
|
39
39
|
# Search festivals
|
|
40
40
|
festivals = client.festivals.list(category="short_film")
|
|
@@ -42,29 +42,62 @@ festivals = client.festivals.list(category="short_film")
|
|
|
42
42
|
# Get festival detail
|
|
43
43
|
festival = client.festivals.get(1)
|
|
44
44
|
|
|
45
|
-
# Get festival roster
|
|
45
|
+
# Get festival roster (past winners / screened films)
|
|
46
46
|
roster = client.festivals.roster(1)
|
|
47
47
|
|
|
48
48
|
# Get scored festivals
|
|
49
49
|
scored = client.festivals.scored(min_score=70)
|
|
50
50
|
|
|
51
|
-
# List
|
|
51
|
+
# List available category codes (requires auth)
|
|
52
52
|
categories = client.categories()
|
|
53
|
+
for cat in categories["results"]:
|
|
54
|
+
print(f'{cat["category"]} ({cat["count"]})')
|
|
53
55
|
|
|
54
56
|
# Health check (no auth)
|
|
55
57
|
client.health()
|
|
56
58
|
```
|
|
57
59
|
|
|
60
|
+
## Categories
|
|
61
|
+
|
|
62
|
+
Call `client.categories()` to get all available category codes. Returns:
|
|
63
|
+
|
|
64
|
+
```python
|
|
65
|
+
{
|
|
66
|
+
"count": 158,
|
|
67
|
+
"results": [
|
|
68
|
+
{"category": "short_film", "count": 60},
|
|
69
|
+
{"category": "feature", "count": 55},
|
|
70
|
+
{"category": "documentary", "count": 31},
|
|
71
|
+
{"category": "animation", "count": 14},
|
|
72
|
+
{"category": "horror", "count": 12},
|
|
73
|
+
{"category": "experimental", "count": 10},
|
|
74
|
+
{"category": "ai", "count": 10},
|
|
75
|
+
{"category": "music_video", "count": 14},
|
|
76
|
+
{"category": "web_series", "count": 9},
|
|
77
|
+
{"category": "comedy", "count": 5},
|
|
78
|
+
{"category": "sci_fi", "count": 5},
|
|
79
|
+
{"category": "student", "count": 5},
|
|
80
|
+
{"category": "lgbtq", "count": 3},
|
|
81
|
+
{"category": "vr_360", "count": 2},
|
|
82
|
+
...
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Common filters: `short_film`, `feature`, `documentary`, `animation`, `horror`, `sci_fi`, `comedy`, `experimental`, `music_video`, `ai`, `web_series`, `student`, `lgbtq`, `vr_360`.
|
|
88
|
+
|
|
89
|
+
Use the `category` field (lowercase) as the filter value — e.g. `client.festivals.list(category="horror")`.
|
|
90
|
+
|
|
58
91
|
## API Key
|
|
59
92
|
|
|
60
|
-
Sign up at [festivalapi.com](https://festivalapi.com) to get your API key. You can also set the `FESTIVALAPI_KEY` environment variable.
|
|
93
|
+
Sign up at [festivalapi.com](https://festivalapi.com) to get your API key (starts with `fes_`). You can also set the `FESTIVALAPI_KEY` environment variable.
|
|
61
94
|
|
|
62
95
|
## Error Handling
|
|
63
96
|
|
|
64
97
|
```python
|
|
65
98
|
from festivalapi import FestivalAPI, NotFoundError, InsufficientCreditsError
|
|
66
99
|
|
|
67
|
-
client = FestivalAPI("
|
|
100
|
+
client = FestivalAPI("fes_your_api_key")
|
|
68
101
|
|
|
69
102
|
try:
|
|
70
103
|
festival = client.festivals.get(999999)
|
festivalapi-0.2.0/README.md
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
# Festival API — Python Client
|
|
2
|
-
|
|
3
|
-
Client library for the [Festival API](https://festivalapi.com).
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
pip install festivalapi
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
## Usage
|
|
10
|
-
|
|
11
|
-
```python
|
|
12
|
-
from festivalapi import FestivalAPI
|
|
13
|
-
|
|
14
|
-
client = FestivalAPI("fda_your_api_key")
|
|
15
|
-
|
|
16
|
-
# Search festivals
|
|
17
|
-
festivals = client.festivals.list(category="short_film")
|
|
18
|
-
|
|
19
|
-
# Get festival detail
|
|
20
|
-
festival = client.festivals.get(1)
|
|
21
|
-
|
|
22
|
-
# Get festival roster
|
|
23
|
-
roster = client.festivals.roster(1)
|
|
24
|
-
|
|
25
|
-
# Get scored festivals
|
|
26
|
-
scored = client.festivals.scored(min_score=70)
|
|
27
|
-
|
|
28
|
-
# List categories (no auth required)
|
|
29
|
-
categories = client.categories()
|
|
30
|
-
|
|
31
|
-
# Health check (no auth)
|
|
32
|
-
client.health()
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## API Key
|
|
36
|
-
|
|
37
|
-
Sign up at [festivalapi.com](https://festivalapi.com) to get your API key. You can also set the `FESTIVALAPI_KEY` environment variable.
|
|
38
|
-
|
|
39
|
-
## Error Handling
|
|
40
|
-
|
|
41
|
-
```python
|
|
42
|
-
from festivalapi import FestivalAPI, NotFoundError, InsufficientCreditsError
|
|
43
|
-
|
|
44
|
-
client = FestivalAPI("fda_your_api_key")
|
|
45
|
-
|
|
46
|
-
try:
|
|
47
|
-
festival = client.festivals.get(999999)
|
|
48
|
-
except NotFoundError:
|
|
49
|
-
print("Festival not found")
|
|
50
|
-
except InsufficientCreditsError as e:
|
|
51
|
-
print(f"Need more credits: {e}")
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
## Requirements
|
|
55
|
-
|
|
56
|
-
- Python 3.9+
|
|
57
|
-
- Zero dependencies (uses only stdlib `urllib`)
|
|
58
|
-
|
|
59
|
-
## License
|
|
60
|
-
|
|
61
|
-
MIT
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|