Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/itsronalds/coworkreserveapi
API for a reservation system built with FastAPI
https://github.com/itsronalds/coworkreserveapi
fastapi mysql orm sqlalchemy
Last synced: about 1 month ago
JSON representation
API for a reservation system built with FastAPI
- Host: GitHub
- URL: https://github.com/itsronalds/coworkreserveapi
- Owner: itsronalds
- Created: 2024-09-10T14:45:27.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-09-13T22:10:23.000Z (4 months ago)
- Last Synced: 2024-11-08T13:04:18.948Z (3 months ago)
- Topics: fastapi, mysql, orm, sqlalchemy
- Language: Python
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CoworkReserveAPI
API for a reservation system built with FastAPI
## Requirements
- Python v3.9+
- MySQL database## Install SQL Database
In the **database** folder, there is a file called **cowork_db.sql**, you must import the file into your database engine to initialize the database.
## Create Virtual Environment (venv)
```$
# On Windows
python -m venv venv
```## Use Virtual Environment
At the root of the project:
```$
# On Windows
venv\Scripts\Activate
```## Install Dependencies
```$
pip install -r requirements.txt
```## Set Up .env File
Create “.env” file in the root of the project with the following variables:
```$
# File: .envDATABASE_URI='mysql+pymysql://:@localhost:3306/cowork_db'
TOKEN_SECRET='a secret'
```## Run the Project
```$
py main.py
```## Open API (Doc)
To see all the API endpoints and perform tests, please click on the following link: **http://localhost:8000/docs**
**Note**: If you run the project on another port you should change it in the URL.