Skip to content

Trying to emulate a basic social network´s API with python

Notifications You must be signed in to change notification settings

drtey/socialAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 

Repository files navigation

socialAPI

REST API developed with Python, FastAPI & PostgreSQL where you can register users, create and vote posts

Model Validation, JWT Authentication, ORM, Unit testing, password hashing, etc

Stack: SQLAlchemy, psycopg2, OAuth2, bcrypt, pydantic, JWT, FastAPI...

Run project

$ uvicorn app.main:app --reload

Build

Install dependencies

$ pip install -r requirements.txt

Create virtual environment

$ python3 -m venv <name_of_environment>
$ source <name_of_environment>/bin/activate

PostgreSQL

$ sudo apt install postgresql postgresql-contrib
$ sudo service postgresql start
$ sudo -u postgres psql
postgres=# CREATE DATABASE <name_of_db>;

To change default pass for "postgres" DB user (NOT UNIX User):

postgres=# \password postgres

Documentation

http://127.0.0.1:8000//docs & http://127.0.0.1:8000//redoc

Releases

No releases published

Packages

No packages published