https://github.com/anuja-rahul/modde-demo-api
demo api made for MODDE trials.
https://github.com/anuja-rahul/modde-demo-api
api fastapi postgresql python sqlalchemy
Last synced: about 2 months ago
JSON representation
demo api made for MODDE trials.
- Host: GitHub
- URL: https://github.com/anuja-rahul/modde-demo-api
- Owner: anuja-rahul
- License: apache-2.0
- Created: 2024-07-15T17:54:26.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-25T13:37:35.000Z (almost 2 years ago)
- Last Synced: 2025-02-21T14:17:51.640Z (over 1 year ago)
- Topics: api, fastapi, postgresql, python, sqlalchemy
- Language: Python
- Homepage:
- Size: 61.5 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README







# MODDE demo api





## Prerequisites
- [python ≥ 3.10](https://www.python.org/downloads/)
- [postgresSQL ≥ 16.0](https://www.postgresql.org/download/)
[//]: # (```mermaid)
[//]: # ()
[//]: # (```)
## Getting Started
1. Clone this repository
```bash
git clone https://github.com/anuja-rahul/python-fastAPI.git
```
2. Create a Virtual environment
```bash
python -m venv venv
```
3. Activate the venv
```bash
activate venv
```
4. Install the packages
```bash
pip install -r requirements.txt
```
5. Setting up the env variables: *`required: .env`*
ex: *for dev env*
```bash
SECRET_KEY="Your Secret Key"
ALGORITHM="HS256"
ACCESS_TOKEN_EXPIRE_MINUTES="60"
HOST="localhost"
DBNAME="Your DB name"
PORT="8000"
USER="Your Username"
PASSWORD="Your password"
```
- Note: If you have openssl, to generate a `SECRET_KEY` you can run :
```bash
openssl rand -hex 32
```
6. Start the uvicorn server
```bash
uvicorn app.main:app --reload
```
## Documentation
- After starting the uvicorn server visit
for *`Swagger UI`*:
```bash
http://localhost:8000/docs
```
or for *`Redoc`*:
```bash
http://localhost:8000/redoc
```
