一键导入
aloha-python
Guides on Python development standards, importing and using the aloha package, HOCON configuration, and running aloha-based applications.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Guides on Python development standards, importing and using the aloha package, HOCON configuration, and running aloha-based applications.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | aloha-python |
| description | Guides on Python development standards, importing and using the aloha package, HOCON configuration, and running aloha-based applications. |
This skill provides coding standards, modular application structures, and usage guidelines for the aloha Python package within the aloha-python boilerplate structure.
When developing Python code in this codebase, adhere to the following naming conventions:
name_service, port_service, svc_ingress, cfg_postgres.service_name, service_port, ingress_service, postgres_config.db_sync.The aloha package is divided into several specialized sub-modules. See their respective reference documents for detailed APIs and usage examples:
aloha.config): HOCON configuration loading, environment profile handling (ENV_PROFILE), and settings loading via SETTINGS.aloha.logger): Safe concurrent multi-process logging, console handlers, and custom logger setups.aloha.encrypt): AES encryption, RSA keys generation & signing/verifying, JWT encoding/decoding, and dictionary/object hashing helpers.aloha.testing): Base UnitTestCase class with pre-configured settings/loggers, and ServiceTestCase for testing HTTP API endpoints.aloha.db): Secure DB operations through SQLAlchemy-backed operators (e.g. PostgresOperator), with password resolution via PasswordVault.aloha compile): Compiling normal .py files into binary dynamic library files using Cython for intellectual property protection.aloha-based ApplicationYour application's main entry point should be a function (e.g., main()) within a module inside the src/ directory.
src/main.pysrc/main.py acts as a generic module runner. Run modules using:
python3 src/main.py <module_path>.<function_name>
Example:
python3 src/main.py my_app.main
This command resolves and executes the main() function in src/my_app/main.py.
For IP protection, you can build your package into compiled dynamic library files (such as .so files on Linux/macOS) using Cython.
aloha compile --base=<source_dir> --dist=<output_dir> --keep='<files_to_keep>'
For full instructions, parameter reference, and package structural requirements (e.g. __init__.py usage), see the Binary Compilation reference.
deploy-DEV.conf, deploy-PROD.conf) and loading them using HOCON include syntax in main.conf.FileHandler in parallel/multi-process tasks; always use aloha.logger.LOG or named loggers from get_logger().PasswordVault.