Application focused on the adoption of animals, this allows users to enter and adopt the pet you like, you can also apply to adopt the pet or be a temporary home.
- Clone the repository
git clone https://github.com/No-Country-simulation/c19-57-n-python-react.git
- Select branch
git chekout branch
- Install requirements
pip install -r <paht/path>requirements.txt
- Configure database credentials
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
engine = create_engine("mysql+pymysql://<user>:<password>@localhost/<name_database>")
localsesion = sessionmaker(autoflush=False, autocommit=False, bind=engine)
base = declarative_base()
- Execute application
uvicorn Backend.main:main_app --reload
The application is based on the RESTful (Representational State Transfer) architectural model, which performs operations on resources:
- GET
- POST
- PUT
- DELETE
It is an entity-relationship model
Make changes to the models and execute them in the database.
Install Alembic:
pip install alembic
Init Alembic:
alembic init alembic
Configure alembic.ini:
sqlalchemy.url = driver://user:password@localhost/dbname
Create a migration:
alembic revision --autogenerate -m "Cambiar nombre de columna"
Execute migration:
alembic upgrade head