RevoU-FSSE-2 / Week-21-defficharlina

Week-21-defficharlina created by GitHub Classroom

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Twitter-like API using Flask

This project build a version of Twitter-like API using Flask includes of registration, posting tweets, following/unfollowing users, and retrieving user profiles.

Flask

Flask is a micro web framework written in Python. It is classified as a microframework because it does not require particular tools or libraries. It has no database abstraction layer, form validation, or any other components where pre-existing third-party libraries provide common functions.

API Endpoints

Registration

  • URL: /auth/registration

  • Method: POST

  • Request Body:

    • username (string): The username.
    • password (string): The password.
    • bio (string): The short 'about me' summary.

Login

  • URL: /auth/login

  • Method: POST

  • Request Body:

    • username (string): The username.
    • password (string): The password.

    User Profile

  • URL: /user

  • Method: GET

    Post a Tweet

  • URL: /post/tweet

  • Method: POST

  • Request Body:

    • tweet (string): The twitter message displayed on a user's profile page.

    Following

  • URL: /follow/id

  • URL: /unfollow/id

  • Method: POST

SQLAlchemy Database using Supabase

  • User Table

  • Tweet Table

  • Followers Table

File .env

DATABASE_URL="postgresql://postgres:Deff1ch4rl1n4@db.nqvqyweykpusjmqbksug.supabase.co:5432/postgres"
SECRET_KEY="defficharlina"

About

Week-21-defficharlina created by GitHub Classroom


Languages

Language:Python 100.0%