|
1 |
| -# programapi |
| 1 | +# π€ programapi |
2 | 2 |
|
3 |
| -This project downloads, processes, saves, and serves the static JSON files containing details of accepted speakers and submissions via an API. |
| 3 | +This project powers the **EuroPython 2025** website and Discord bot by downloading, transforming, and serving clean, structured JSON files for sessions, speakers, and the schedule, all pulled from Pretalx. |
4 | 4 |
|
5 |
| -Used by the EuroPython 2024 website and the Discord bot. |
| 5 | +Built for transparency. Designed for reuse. Optimized for EuroPython. |
6 | 6 |
|
7 |
| -**What this project does step-by-step:** |
| 7 | +--- |
8 | 8 |
|
9 |
| -1. Downloads the Pretalx speaker and submission data, and saves it as JSON files. |
10 |
| -2. Transforms the JSON files into a format that is easier to work with and OK to serve publicly. This includes removing unnecessary/private fields, and adding new fields. |
11 |
| -3. Serves the JSON files via an API. |
| 9 | +## π What This Project Does |
12 | 10 |
|
13 |
| -## Installation |
| 11 | +1. **Downloads** submission and speaker data from Pretalx. |
| 12 | +2. **Transforms** raw data: |
| 13 | + - Removes private/irrelevant fields |
| 14 | + - Normalizes formats |
| 15 | + - Adds computed fields (e.g. URLs, delivery mode) |
| 16 | +3. **Serves** the transformed JSON files via a static API. |
14 | 17 |
|
15 |
| -1. Clone the repository. |
16 |
| -2. Install the dependency management tool: ``make deps/pre`` |
17 |
| -3. Install the dependencies: ``make deps/install`` |
18 |
| -4. Set up ``pre-commit``: ``make pre-commit`` |
| 18 | +--- |
19 | 19 |
|
20 |
| -## Configuration |
| 20 | +## βοΈ Installation |
21 | 21 |
|
22 |
| -You can change the event in the [``config.py``](src/config.py) file. It is set to ``europython-2024`` right now. |
| 22 | +1. **Clone the repo** |
| 23 | + ```bash |
| 24 | + git clone https://github.com/EuroPython/programapi.git |
| 25 | + cd programapi |
| 26 | + ``` |
23 | 27 |
|
24 |
| -## Usage |
| 28 | +2. **Install [uv](https://docs.astral.sh/uv/getting-started/installation/)** (fast Python package manager) |
25 | 29 |
|
26 |
| -- Run the whole process: ``make all`` |
27 |
| -- Run only the download process: ``make download`` |
28 |
| -- Run only the transformation process: ``make transform`` |
| 30 | +3. **Create a Python 3.13 virtual environment** |
| 31 | + ```bash |
| 32 | + uv venv -p 3.13 |
| 33 | + ``` |
29 | 34 |
|
30 |
| -**Note:** Don't forget to set ``PRETALX_TOKEN`` in your ``.env`` file at the root of the project. And please don't make too many requests to the Pretalx API, it might get angry π€ͺ |
| 35 | +4. **Install dev dependencies** |
| 36 | + ```bash |
| 37 | + make dev |
| 38 | + ``` |
31 | 39 |
|
32 |
| -## API |
| 40 | +5. **Enable pre-commit hooks** |
| 41 | + ```bash |
| 42 | + make pre-commit |
| 43 | + ``` |
33 | 44 |
|
34 |
| -The API is served at ``https://programapi24.europython.eu/2024``. It has two endpoints (for now): |
| 45 | +--- |
35 | 46 |
|
36 |
| -- ``/speakers.json``: Returns the list of confirmed speakers. |
37 |
| -- ``/sessions.json``: Returns the list of confirmed sessions. |
| 47 | +## π οΈ Configuration |
38 | 48 |
|
39 |
| -## Schema |
| 49 | +You can update the event year or shortname in [`src/config.py`](src/config.py). |
40 | 50 |
|
41 |
| -See [this page](data/examples/README.md) for the explanations of the fields in the returned JSON files. |
| 51 | +Also, create a `.env` file in the project root and set: |
| 52 | + |
| 53 | +```env |
| 54 | +PRETALX_TOKEN=your_api_token_here |
| 55 | +``` |
| 56 | + |
| 57 | +(Yes, Pretalx has rate limits. Please be nice. π€ͺ) |
| 58 | + |
| 59 | +--- |
| 60 | + |
| 61 | +## π¦ Usage |
| 62 | + |
| 63 | +- Run the **entire pipeline**: |
| 64 | + ```bash |
| 65 | + make all |
| 66 | + ``` |
| 67 | + |
| 68 | +- Run only the **download step**: |
| 69 | + ```bash |
| 70 | + make download |
| 71 | + ``` |
| 72 | + |
| 73 | +- Run only the **transformation step**: |
| 74 | + ```bash |
| 75 | + make transform |
| 76 | + ``` |
| 77 | + |
| 78 | +- (Optional) **Exclude components**: |
| 79 | + ```bash |
| 80 | + make all EXCLUDE="schedule youtube" |
| 81 | + ``` |
| 82 | + |
| 83 | +--- |
| 84 | + |
| 85 | +## π API Endpoints |
| 86 | + |
| 87 | +Hosted at: |
| 88 | + |
| 89 | +``` |
| 90 | +https://static.europython.eu/programme/ep2025/releases/current |
| 91 | +``` |
| 92 | + |
| 93 | +| Endpoint | Description | |
| 94 | +|---------------------|--------------------------------------------| |
| 95 | +| `/speakers.json` | List of confirmed speakers | |
| 96 | +| `/sessions.json` | List of confirmed sessions | |
| 97 | +| `/schedule.json` | Finalized conference schedule *(TBA)* | |
| 98 | + |
| 99 | +--- |
| 100 | + |
| 101 | +## π Schema Documentation |
| 102 | + |
| 103 | +Looking for field definitions and examples? |
| 104 | +Check out the π [`data/examples/README.md`](data/examples/README.md) for a full schema reference with example payloads and explanations. |
| 105 | + |
| 106 | +--- |
| 107 | + |
| 108 | +## π¬ Questions? Feedback? |
| 109 | + |
| 110 | +Feel free to open an issue or reach us at [[email protected]](mailto:[email protected]). We love contributors π |
| 111 | + |
| 112 | +--- |
| 113 | + |
| 114 | +π
Last updated for: **EuroPython 2025** |
0 commit comments