Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anuja-rahul/python-fastapi
Simple API made using python for a social media platform.
https://github.com/anuja-rahul/python-fastapi
api fastapi python sql
Last synced: about 8 hours ago
JSON representation
Simple API made using python for a social media platform.
- Host: GitHub
- URL: https://github.com/anuja-rahul/python-fastapi
- Owner: anuja-rahul
- License: apache-2.0
- Created: 2024-06-20T15:22:10.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-08-14T18:08:43.000Z (3 months ago)
- Last Synced: 2024-08-14T19:57:17.977Z (3 months ago)
- Topics: api, fastapi, python, sql
- Language: Python
- Homepage:
- Size: 154 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![Python](https://img.shields.io/badge/-python-000?style=for-the-badge&logo=python)
![FAST API](https://img.shields.io/badge/-fast_api-000?style=for-the-badge&logo=fastapi)
![POSTMAN](https://img.shields.io/badge/-postman-000?style=for-the-badge&logo=postman)
![PYDANTIC](https://img.shields.io/badge/-pydantic-000?style=for-the-badge&logo=pydantic)
![POSTGRES](https://img.shields.io/badge/-postgresql-000?style=for-the-badge&logo=postgresql)
![SQLALCHEMY](https://img.shields.io/badge/-sqlalchemy-000?style=for-the-badge&logo=sqlalchemy)
![JWT](https://img.shields.io/badge/-JWT-000?style=for-the-badge&logo=json-web-tokens)# Python-fastAPI
![GitHub](https://img.shields.io/github/forks/anuja-rahul/python-fastAPI?style&logo=github)
![GitHub](https://img.shields.io/github/license/anuja-rahul/python-fastAPI?style&logo=github)
![GitHub](https://img.shields.io/github/stars/anuja-rahul/python-fastAPI?style&logo=github)
![Contributors](https://img.shields.io/github/contributors/anuja-rahul/python-fastAPI?style&logo=github)
![Watchers](https://img.shields.io/github/watchers/anuja-rahul/python-fastAPI?style&logo=github)
[![Project-Status](https://img.shields.io/badge/Project%20Status-deploying-orange.svg)](https://github.com/anuja-rahul/portfolio-nextjs)
## Prerequisites
- [python ≥ 3.10](https://www.python.org/downloads/)
- [postgreSQL ≥ 16.0](https://www.postgresql.org/download/)## 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
```
![Readme Card](https://github-readme-stats.vercel.app/api/pin/?username=anuja-rahul&repo=python-fastAPI&theme=nightowl)