Getting Started¶
Note
The config.yaml and environment variable examples on this page use examples from Tranqu Server.
Prerequisites¶
Before installing Python Project Template, ensure that the following tools are installed.
Development Environment¶
| Tool | Version | Description |
|---|---|---|
| Python | >=3.14 | Python programming language |
| uv | >=0.10 | Python package and project manager |
Clone the repository:
Info
To use ouqu-tp as a transpiler, staq is required. If staq is not installed, it will be automatically installed the first time you use ouqu-tp. The installation of staq takes several minutes.
Setting Up the Python Environment¶
To install dependencies:
Configurations¶
Tranqu Server uses two configuration files:
Info
You can use environment variables as values in the above YAML files.
config.yaml¶
This is the main configuration file for Tranqu Server.
proto: # Settings for Tranqu Server as a gRPC server
max_workers: 10 # Maximum number of workers (default: 10)
address: "[::]:50051" # Address and port for RPCs (default: "[::]:50051")
logging.yaml¶
This is the logging configuration file for Tranqu Server.
It is written in YAML format.
Within Tranqu Server, it is loaded as a dict, and then the logging.config.dictConfig function is called to apply the configuration.
If you use the default settings of config.yaml, the logs directory is required.
Hello World Application¶
To start Hello World Application, run the following command:
-cor--config: Specifies the path to the main configuration file.-lor--logging: Specifies the path to the logging configuration file.
When cloned from GitHub, the worker in config.yaml uses the environment variable ${WORKERS},
and the address uses the environment variable ${ADDRESS}.
In this case, the Tranqu Server is started with the following command.