Skip to content

Latest commit

 

History

History
40 lines (32 loc) · 1.35 KB

README.md

File metadata and controls

40 lines (32 loc) · 1.35 KB

Irrigation Pi Backend

A Python backend application using FastAPI.

Installation for Development

This installation section is meant for software engineers which like to do contributions to the project. If you are an end user who just wants to install Irrigation-Pi on your Raspberry Pi, you can ignore this section.

Poetry

Install Poetry on your machine, i.e.:

curl -sSL https://install.python-poetry.org | python3 -

Configure poetry to install virtual environments in project folders:

poetry config virtualenvs.in-project true

In project root install Python package dependencies with Poetry and create a virtual environment:

poetry install

Database

The application uses a SQLite database as the application meant to be run on an Raspberry Pi. Migrations are managed with Alembic.

After creating the virtual environment you are able to use the project's management CLI to install the database. Activate virtual environment, then install the SQLite database:

source .venv/bin/activate
irrigation-pi install database

Start the backend application:

irrigation-pi run backend

The backend application is running afterwards and is accessible on: http://0.0.0.0:8000/api