This repository contains the scripts to initialize the database from the json file mentioned in the data folder.
Install for development for the first time:
make installThis will install the dependencies and the package in editable mode. This will also install the sail-client dependency in the virtul environment. The virtual environment is created in the .venv folder and can be activated using:
source $(poetry env info --path)/bin/activateor
source .venv/bin/activateTo exit the virtual environment:
deactivatepoetry buildThis will create a wheel file in the dist folder which can be installed using pip.
pip install dist/database-initialization-0.1.0-py3-none-any.whldatabase-initialization --hostname http://127.0.0.1:8000 --configuration configuration.jsonfrom database-initialization import initialize_database
initialize_database(
hostname="http://127.0.0.1:8000",
configuration="configuration.json",
)