An open API service indexing awesome lists of open source software.

https://github.com/ali-tm-original/eventsapi

ELTE Python course FASTAPI assignment
https://github.com/ali-tm-original/eventsapi

fastapi json rest-api

Last synced: about 2 months ago
JSON representation

ELTE Python course FASTAPI assignment

Awesome Lists containing this project

README

          

# FastAPI Project

This is a FastAPI project designed for Assignment 1.

## Installation

To run this project locally, you need to have Python and pip installed on your machine.

1. Clone this repository:
```bash
git clone https://github.com/frdayvz85/assignment1.git
or
git@github.com:frdayvz85/assignment1.git
```
2. Navigate into the project directory:
```bash
cd assignment1
```
3. Create a virtual enviroment:
```bash
python -m venv venv
or
py -m venv venv
or
py3 -m venv venv
```
4. Active a virtualenv
```bash
Windows users from CMD run this command:
.\venv\Scripts\activate.bat

Windows users from PowerShell run this command:
.\venv\Scripts\Activate.ps1

Linux or Mac users run this command:
source venv/bin/activate
```
5. Install the requirements in the current environment:
```bash
pip install -r requirements.txt
```
6. Last step run the following command:
```bash
py app/main.py
```

### Testing APIs 🚀:
FastAPI documentation is automatically generated and interactive, meaning you can explore and test your API endpoints directly from a web browser. This documentation is generated based on the endpoint functions you define in your FastAPI application, along with their type hints, docstrings, and other metadata.

Accessing interface use following link:
```bash
http://127.0.0.1:8000/docs
```

There is 1 testing Endpoint which it is for testing.
You can check `Root` section and test it.

![image](https://github.com/frdayvz85/python/assets/55210294/825dfd00-706b-436c-b2fe-8ab2b7349eae)

You can check Event APIs from ``Event`` section and test it:

![image](https://github.com/frdayvz85/python/assets/55210294/7609d150-8dfc-4547-8126-184d8ea03129)

```bash
Good Luck 🚀
```