The simplest example is simple. You may want to start there!
If you're using pip, you should create and activate a virtual environment before installing any example's dependencies:
python3 -m venv .venv
source .venv/bin/activateIf you're using Poetry instead, you can just install the dependencies directly, as shown below.
Each example is packaged as a regular Python package, with a pyproject.toml
file specifying its required dependencies. To run an example, it must first be
installed.
For example, to install dependencies and run the toy simple example (which
doesn't need to download any data) run:
# Using pip:
pip install -e python/examples/simple
# Using poetry:
cd python/examples/simple
poetry installNote: it is import to install example in editable mode, which is done using
the -e flag (short for --editable).
Once installed, the example can be run as a regular Python module:
python3 -m simple
# or, if you're using poetry:
poetry run simpleExamples also declare console script, so they can also be run directly:
simpleFeel free to open a PR to add a new example!
See the CONTRIBUTING.md file for details on how to contribute.