The project implements application which adapts calls from one DIAL Core to calls to another DIAL Core.
Useful for local DIAL development against remote DIAL Core. See the example of such a setup.
This project requires Python ≥3.11 and Poetry ≥2.1.1 for dependency management.
-
Install Poetry. See the official installation guide.
-
(Optional) Specify custom Python or Poetry executables in
.env.dev. This is useful if multiple versions are installed. By default,pythonandpoetryare used.POETRY_PYTHON=path-to-python-exe POETRY=path-to-poetry-exe
-
Create and activate the virtual environment:
make init_env source .venv/bin/activate -
Install project dependencies (including linting, formatting, and test tools):
make install
The recommended IDE is VS Code. Open the project in VS Code and install the recommended extensions. VS Code is configured to use the Ruff formatter.
Alternatively you can use PyCharm that has built-in Ruff support.
Run the development server:
make serveAs of now, Windows distributions do not include the make tool. To run make commands, the tool can be installed using the following command (since Windows 10):
winget install GnuWin32.MakeFor convenience, the tool folder can be added to the PATH environment variable as C:\Program Files (x86)\GnuWin32\bin.
The command definitions inside Makefile should be cross-platform to keep the development environment setup simple.
Copy .env.example to .env and customize it for your environment:
| Variable | Default | Description |
|---|---|---|
| LOG_LEVEL | INFO | Log level. Use DEBUG for dev purposes and INFO in prod |
| WEB_CONCURRENCY | 1 | Number of workers for the server |
| DIAL_URL | URL of the local DIAL Core server used for development | |
| HEADERS_TO_PROXY | Accept |
Comma-separated list of headers to pass through to the upstream. |
Run the server in Docker:
make docker_serveRun the linting before committing:
make lintTo auto-fix formatting issues run:
make formatRun unit tests locally:
make testTo remove the virtual environment and build artifacts:
make clean