Configuration
Configuration
Section titled “Configuration”PyGo uses a pygo.toml file in the project root for configuration. There is no
dsl_version and no transpiler settings — the framework is native Go + Python.
Example
Section titled “Example”[project]name = "myapp"version = "0.1.0"description = "My PyGo application"
[framework]entrypoint_web = "app/modules/core/web/entry.go"entrypoint_python = "app/modules/core/app/main.py"python_path = "app"
[server]host = "127.0.0.1"port = 8080socket = "storage/.pygo.sock"
[python]interpreter = "python3"
[modules]internal = ["core", "auth", "i18n", "admin", "notifications", "ui"]installed = []
[database]default = "sqlite"
[i18n]locales_dir = "app/modules/core/app/locales"fallback = "en"Sections
Section titled “Sections”[project]
Section titled “[project]”| Field | Type | Description |
|---|---|---|
name |
string | Project name |
version |
string | Project version (semver) |
description |
string | Short description |
[framework]
Section titled “[framework]”| Field | Type | Description |
|---|---|---|
entrypoint_web |
string | Go file that boots the web layer |
entrypoint_python |
string | Python file that boots the domain runtime |
python_path |
string | Root package path for the Python runtime |
[server]
Section titled “[server]”| Field | Type | Default | Description |
|---|---|---|---|
host |
string | 127.0.0.1 |
Bind address |
port |
int | 8080 |
HTTP port |
socket |
string | storage/.pygo.sock |
UDS path used for Go↔Python calls |
[python]
Section titled “[python]”| Field | Type | Default | Description |
|---|---|---|---|
interpreter |
string | python3 |
Python interpreter command |
[modules]
Section titled “[modules]”| Field | Type | Description |
|---|---|---|
internal |
string[] | Built-in modules available to the project |
installed |
string[] | Modules installed from the registry |
[database]
Section titled “[database]”| Field | Type | Default | Description |
|---|---|---|---|
default |
string | sqlite |
Default database backend |
[i18n]
Section titled “[i18n]”| Field | Type | Default | Description |
|---|---|---|---|
locales_dir |
string | app/modules/core/app/locales |
Directory with locale files |
fallback |
string | en |
Fallback locale |
Environment variables
Section titled “Environment variables”Configuration can be overridden with environment variables:
export PYGO_SERVER_PORT=9090export PYGO_PYTHON_INTERPRETER=/usr/bin/python3.11