Skip to main content

Aloha

License GitHub Workflow Status PyPI version PyPI Downloads Code Activity Recent Code Update

aloha-python is a modern project template (boilerplate) and a versatile utility library (aloha package) designed to build robust, containerized microservices in Python.


Please generously STAR★ our project or donate to us! GitHub Starts

  • To understand the package, read the 📚docs or Ask DeepWiki

  • To contribute or talk to a human: Open an Issue on GitHub Join the Discord Chat Join the Gitter Chat


🚀 Key Features

  • Configuration Management (aloha.config): Lazy-loaded settings (SETTINGS) using HOCON (Human-Optimized Config Object Notation), supporting environment profile overrides (PROFILE_ENV / FILES_CONFIG, with legacy ENV_PROFILE deprecated) and environment variable injection.
  • Concurrent-Safe Logging (aloha.logger): Multi-process safe daily rotating log file handler, console output, and automatic log paths configuration.
  • Database Operators (aloha.db): Pre-built SQLAlchemy-backed connections for PostgreSQL, MySQL, SQLite, DuckDB, MongoDB, Redis, Elasticsearch, and Kafka, with password resolution via a secure PasswordVault wrapper.
  • Encryption & Utilities (aloha.encrypt): Fast helpers for AES (ECB/CBC) encryption, RSA asymmetric key-pair generation/signatures, JWT encoding/decoding, and Base62 hashing.
  • Testing Harness (aloha.testing): Extended UnitTestCase and integration ServiceTestCase structures for testing HTTP endpoints.
  • Binary Code Protection (aloha compile): Utility compiler using Cython to package python source files (.py) into platform-native compiled dynamic libraries (.so/.pyd), protecting intellectual property.

📁 Repository Layout

  • src/: Application-specific codebase, configuration files (src/resource/config/), and unit/integration tests (src/tests/).
  • pkg/: The core aloha utility library source code.
  • tool/: Local CI/CD files and setup helpers (e.g. docker-compose configurations, lifecycle scripts).
  • doc/: Documentation files and AI Agent Skills.
  • notebook/: Jupyter notebooks for interactive analysis.

🛠️ Local Development Quick Start

Local development is fully containerized using Docker & Docker Compose to maintain environment consistency.

1. Launch Dev Container

Run the lifecycle helper script:

# Check port availability and spin up the development container
./tool/cicd/run-dev.sh up

# Open an interactive terminal inside the container
./tool/cicd/run-dev.sh enter

Note: Development ports (PORT_APP and PORT_WEB) are dynamically computed based on your User ID (UID) to avoid conflicts on shared servers.

2. Run Tests

Inside the running container terminal:

# Execute pytest suite
pytest src/

# Run tests with code coverage report
pytest --cov=src src/

3. Production Packaging

To build a production-ready Docker image with optional binary compilation enabled:

source tool/tool.sh
build_image app_common latest src/app-demo.Dockerfile

✍️ Coding Guidelines

When developing in this project, variables should place their type or primary characteristics/role prefix first:

  • Correct: name_service, port_service, svc_ingress, cfg_postgres.
  • Incorrect: service_name, service_port, ingress_service, postgres_config.

For details on local setups, CI/CD specifications, and sub-module APIs, inspect our agent instruction files:

Metadata

Release files for aloha 2026.921.1726

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aloha 2026.921.1726
File Size Uploaded
aloha-2026.921.1726.tar.gz 54.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aloha 2026.921.1726
File Interpreter ABI Platform
aloha-2026.921.1726-py3-none-any.whl Python 3 none any Details

Total release size: 134.6 kB

Release files / aloha-2026.921.1726.tar.gz

Download URL aloha-2026.921.1726.tar.gz
Size 54.0 kB
Tags Source
SHA-256 checksum
How to use checksums
86f0b505ea88fb531d112b9f94ce2d19df3dc175adf59fbdd7f6c60dee681638
BLAKE2b-256 checksum
How to use checksums
de6492bb2c86665a1deff0e0050efa8f44273ccfc6f2b45fa921e0b79f094add
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / aloha-2026.921.1726-py3-none-any.whl

Download URL aloha-2026.921.1726-py3-none-any.whl
Size 80.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9637949490c69cc11e7c24465e665b025b0d8b57dbee850799e4134a051d7c78
BLAKE2b-256 checksum
How to use checksums
13764e8d0bfb2121ff3906d244afa3a3951bf67fa6f6635a1f403923a3cc966e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

2026.921.1726 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page