parsariyahi / social_media_app

a basic social media with flask

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

basic Web social media app

about the project

this project is based on instagram logic

its a web app written with Flask

this project is a personal student learning project

written with

how to use

install the requirements

pip install -r requirements.txt

put your database configs in app/src/consts/CONSTS.py and edit the SECRET_KEY const

"""
this project is using mysql
but because of SQLAlchemy
you can use your favorite dbms
"""

DBMS='<your db provider>' 
DB_HOST='<your host>'
DB_NAME='<your db name>'
DB_USER='<your user>'
DB_PASSWORD='<your users password>'

"""
:pattern <dbms>://<username>:<password>@host/<database name>
"""

#this will create engine pattern for SQLAlchemy
SQLALCHEMY_DATABASE_URI=f"{DBMS}://{DB_USER}:{DB_PASSWORD}@{DB_HOST}/{DB_NAME}"
SECRET_KEY = '<some random strings>'

for the fist time, uncomment these lines in app/app.py to initialize database tables

app = Flask(__name__)
app.secret_key = SECRET_KEY

app.config['SQLALCHEMY_DATABASE_URI'] = SQLALCHEMY_DATABASE_URI
db.init_app(app)

""" 
uncomment these lines,
to create the database tables
"""
db.drop_all(app=app) #<--- this
db.create_all(app=app) #<--- this

then run this command

python app/app.py

About

a basic social media with flask

License:MIT License


Languages

Language:CSS 95.5%Language:HTML 3.5%Language:Python 0.9%