Setting Up Your Project

First we need to prepare a Python project. We will use a Python virtual environment, and the project configuration file pyproject.toml.

Important

Ligare requires a minimum Python version of 3.10.

Create a project directory, create a new virtual environment, and activate the virtual environment.

user@: $ mkdir my-ligare-app && cd my-ligare-app
user@: my-ligare-app $ python -m venv .venv
user@: my-ligare-app $ . .venv/bin/activate

Now we can create a minimal pyproject.toml file that lets us create our application, and install Ligare.programming.

user@: my-ligare-app $ cat > pyproject.toml << EOF
[project]
requires-python = ">= 3.10"

name = "my-ligare-app"
version = "0.0.1"

dependencies = [
   "Ligare.programming"
]

EOF

Once completed, our pyproject.toml should look like this.

[project]
requires-python = ">= 3.10"

name = "cli-app"
version = "0.0.1"

dependencies = ["Ligare.programming"]

With the virtual environment still active, we can now install everything necessary to create a Ligare application.

Note

We use -e here so changes to our application can run without requiring a reinstall.

user@: my-ligare-app $ pip install -e .