Loading repository data…
Loading repository data…
yahrdev / repository
This project is a backend application built with FastAPI and MySQL. It uses FastAPI Users (https://fastapi-users.github.io/fastapi-users/latest/) for user management and employs asynchronous programming for improved performance.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
This project is a backend application built with FastAPI and MySQL. It provides endpoints for user registration, login, adding posts, retrieving posts, and deleting posts. The application follows the MVC design pattern and uses SQLAlchemy for database interactions. It also uses FastAPI Users (https://fastapi-users.github.io/fastapi-users/latest/) for user management and employs asynchronous programming for improved performance.
email, passwordemail, passwordtext, tokenpostID.tokenpostID, token (to authenticate the request)Clone the repository:
git clone <repository_url>
cd fastapi_users_project
Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
Install the required dependencies:
pip install -r requirements.txt
Create a .env file in the project root with the following content:
DB_USER = your_db_user
DB_PASS = your_db_password
DB_HOST = localhost
DB_NAME = fastapiproj
DB_PORT = 3306
MODE = PROD
SECRET = your_secret_key
JWT_LIFETIME_MINUTES = 30
Set up the database:
mysql -u root -p
CREATE DATABASE fastapiproj;
Use Alembic to create the tables:
alembic revision --autogenerate -m "Initial migration"
alembic upgrade head
Start the FastAPI application:
uvicorn src.main:app --host 0.0.0.0 --port 8000
Access the application at http://localhost:8000. You can view the automatically generated API documentation at http://localhost:8000/docs.