git clone [email protected]:taleldayekh/talel.io-backend.git
pyenv (Python Version Management) can be used for easily managing Python versions globally on the system and locally for a project.
Install pyenv with:
brew install pyenv
Set the project specific Python version defined in the Pipfile
by navigating to the project root and running:
pyenv local <version>
talel.io-backend
uses Pipenv for managing the projects virtual environment and dependencies.
Install Pipenv with:
brew install pipenv
Activate the virtual environment for talel.io-backend
by navigating to the project root and running:
pipenv shell
⚠️ Dependency installation will fail if PostgreSQL is not installed on the system.
Install PostgreSQL:
brew install postgresql@<version>
Install dependencies and dev dependencies by navigating to the project root and running:
pipenv install --dev
The development database runs in a Docker container and requires Docker Desktop installed and running.
Install Docker Desktop:
brew install --cask docker
Start development database container:
make start-dev-dbs
This will start a PostgreSQL database configured for development and run the most recent migrations.
Stop development database container:
make stop-dev-dbs
Before serving the API ensure there is a .env
present in the project root containing the same values as in .env.example
.
Serve backend API:
make serve-api
This will run the development server on port 5000
.
To maintain consistency across the codebase, coding standards that conforms to the PEP 8 style guide are enforced with:
To help detect coding errors the following static code analysis tools are used:
Run formatters:
make fix
Run code analysis:
make type-check
make lint
Full API reference documentation is available on the Wiki page.