A super simple FastAPI application that allows students to view and sign up for extracurricular activities.
- View all available extracurricular activities
- Sign up for activities
-
Install the dependencies:
pip install fastapi uvicorn
-
Run the application:
python app.py
-
Open your browser and go to:
- API documentation: http://localhost:8000/docs
- Alternative documentation: http://localhost:8000/redoc
Method | Endpoint | Description |
---|---|---|
GET | /activities |
Get all activities with their details and current participant count |
POST | /activities/{activity_name}/[email protected] |
Sign up for an activity |
The application uses a simple data model with meaningful identifiers:
-
Activities - Uses activity name as identifier:
- Description
- Schedule
- Maximum number of participants allowed
- List of student emails who are signed up
-
Students - Uses email as identifier:
- Name
- Grade level
All data is stored in memory, which means data will be reset when the server restarts.