Skip to content

mehdiwka/himessenger-backend

Repository files navigation

Getting Started

To start the application:

  1. Ensure you have Python 3.10 installed. Check your Python version using:

    python --version
  2. Install the required libraries for this project:

    pip install -r requirements
  3. Set up your database migrations by installing Alembic, a database migration tool:

    pip install alembic

    Then, initialize your project for Alembic:

    alembic init alembic

    Edit your alembic.ini file to add your database URL:

    sqlalchemy.url = postgresql+psycopg2:https://user:pass@localhost/dbname

    Replace driver:https://user:pass@localhost/dbname with your actual SQLAlchemy URL.

    In alembic/env.py, update the target_metadata variable:

    from models import Base
    target_metadata = Base.metadata

    Make sure myBase is your SQLAlchemy Base object used to declare your model classes.

    Then, generate your Alembic migration:

    alembic revision --autogenerate -m "Created tables" 
    alembic upgrade head  # Apply the migration
  4. Start the FastAPI application with Uvicorn:

    uvicorn main:app --reload

Please feel free to modify or remove any instructions according to your application's requirements.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published