TaipanStack - Modular, secure, and scalable Python stack for robust development
Project description
๐ TaipanStack
The Modern Python Foundation
Launch secure, high-performance Python applications in seconds.
Features โข Quick Start โข Architecture โข DevSecOps โข API โข Contributing
โจ Why TaipanStack?
"Write less, build better."
TaipanStack is a battle-tested foundation for production-grade Python projects that combines security, performance, and developer experience into a single, cohesive toolkit.
๐ก๏ธ Security First
|
โก High Performance
|
๐ฏ Rust-Style Error Handling
|
๐ง Developer Experience
|
๐ Quick Start
Prerequisites
- Python 3.11+ (supports 3.11, 3.12, 3.13, 3.14)
- Poetry (install guide)
Installation
From PyPI
pip install taipanstack
From Source
# Clone the repository
git clone https://github.com/gabrielima7/TaipanStack.git
cd TaipanStack
# Install dependencies
poetry install --with dev
# Run quality checks
make all
Verify Installation
# Run tests with 100% coverage (664 tests)
make test
# Check architecture contracts
make lint-imports
# Run security scans
make security
# Run property-based fuzzing
make property-test
# Run performance benchmarks
make benchmark
๐ Architecture
TaipanStack follows a clean, layered architecture with strict dependency rules enforced by Import Linter.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Application โ
โ (src/app/main.py) โ
โโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โผ โผ โผ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Security โ โ Config โ โ Utils โ
โ guards, saniti- โ โ models, โ โ logging, retry โ
โ zers, validatorsโ โ generators โ โ metrics, fs โ
โโโโโโโโโโฌโโโโโโโโโ โโโโโโโโโโฌโโโโโโโโโ โโโโโโโโโโฌโโโโโโโโโ
โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Core โ
โ Result types, base patterns โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Project Structure
TaipanStack/
โโโ src/
โ โโโ app/ # Application entry point
โ โโโ taipanstack/
โ โโโ core/ # ๐ฏ Result types, functional patterns
โ โโโ config/ # โ๏ธ Configuration models & generators
โ โโโ security/ # ๐ก๏ธ Guards, sanitizers, validators
โ โโโ utils/ # ๐ง Logging, metrics, retry, filesystem
โโโ tests/ # โ
664 tests, 100% coverage
โโโ .semgrep/ # ๐ Custom SAST rules
โโโ .github/ # ๐ CI/CD + SBOM/SLSA workflows
โโโ Dockerfile # ๐ณ Hardened multi-stage container
โโโ pyproject.toml # ๐ Modern dependency management
๐ DevSecOps
TaipanStack integrates security and quality at every level:
| Category | Tools | Purpose |
|---|---|---|
| SAST | Bandit, Semgrep + custom rules | Static Application Security Testing |
| SCA | Safety, pip-audit | Dependency vulnerability scanning |
| SBOM | Syft (CycloneDX) | Software Bill of Materials |
| SLSA | Cosign (Sigstore) | Artifact signing & attestation |
| Types | Mypy (strict) | Compile-time type checking |
| Lint | Ruff | Lightning-fast linting & formatting |
| Arch | Import Linter | Dependency rule enforcement |
| Test | Pytest, Hypothesis, mutmut | Property-based & mutation testing |
| Perf | pytest-benchmark | Performance regression detection |
| Containers | Docker (Alpine, rootless) | Hardened-by-default images |
CI Pipeline
# Runs on every push/PR
โ Test Matrix โ Python 3.11-3.14 ร (Ubuntu, macOS, Windows)
โ Linux Distros โ Ubuntu, Debian, Fedora, openSUSE, Arch, Alpine
โ Code Quality โ Ruff check & format
โ Type Check โ Mypy strict mode
โ Security โ Bandit + Semgrep (custom rules)
โ Architecture โ Import Linter contracts
โ Benchmarks โ Performance regression (>5% = fail)
โ SBOM + SLSA โ Supply-chain attestation on release
๐ API Highlights
Result Types (Rust-Style Error Handling)
from taipanstack.core.result import Result, Ok, Err, safe
@safe
def divide(a: int, b: int) -> float:
return a / b
# Explicit error handling with pattern matching
match divide(10, 0):
case Ok(value):
print(f"Result: {value}")
case Err(error):
print(f"Error: {error}")
Security Guards
from taipanstack.security.guards import guard_path_traversal, guard_command_injection
# Prevent path traversal attacks
safe_path = guard_path_traversal(user_input, base_dir="/app/data")
# Prevent command injection
safe_cmd = guard_command_injection(
["git", "clone", repo_url],
allowed_commands=["git"]
)
Retry with Exponential Backoff
from taipanstack.utils.retry import retry
@retry(max_attempts=3, on=(ConnectionError, TimeoutError))
async def fetch_data(url: str) -> dict:
return await http_client.get(url)
Circuit Breaker
from taipanstack.utils.circuit_breaker import circuit_breaker
@circuit_breaker(failure_threshold=5, timeout=30)
def call_external_service() -> Response:
return service.call()
๐ณ Docker
# Build hardened image
docker build -t taipanstack:latest .
# Run (rootless, read-only)
docker run --rm --read-only taipanstack:latest
Security features: multi-stage build, Alpine base (<50MB), non-root appuser (UID 1000), healthcheck, no shell in runtime.
๐ ๏ธ Tech Stack
| Runtime | Quality | DevSecOps |
|---|---|---|
|
|
|
๐ค Contributing
Contributions are welcome! Please check our Contributing Guide for details on:
- ๐ Bug reports
- โจ Feature requests
- ๐ Documentation improvements
- ๐ง Pull requests
๐ License
This project is open-sourced under the MIT License.
Made with โค๏ธ for the Python community
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file taipanstack-0.3.0.tar.gz.
File metadata
- Download URL: taipanstack-0.3.0.tar.gz
- Upload date:
- Size: 44.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d66026e7687193661bc5e3f49394d44505016a7e3d98e5ac13e82716f5b2281
|
|
| MD5 |
ec1209e725ed6546d84b9eb804ce4d9d
|
|
| BLAKE2b-256 |
7d3df9ef9eef71db9f63f9a0f9a8b89e3e194fc74a867e37bbde76a5b7582f03
|
Provenance
The following attestation bundles were made for taipanstack-0.3.0.tar.gz:
Publisher:
publish.yml on gabrielima7/TaipanStack
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
taipanstack-0.3.0.tar.gz -
Subject digest:
8d66026e7687193661bc5e3f49394d44505016a7e3d98e5ac13e82716f5b2281 - Sigstore transparency entry: 999885113
- Sigstore integration time:
-
Permalink:
gabrielima7/TaipanStack@445f47c2c969507067f3ba007ce37a23a12f0538 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/gabrielima7
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@445f47c2c969507067f3ba007ce37a23a12f0538 -
Trigger Event:
release
-
Statement type:
File details
Details for the file taipanstack-0.3.0-py3-none-any.whl.
File metadata
- Download URL: taipanstack-0.3.0-py3-none-any.whl
- Upload date:
- Size: 51.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fafa00e01e9016cbc8f47b5d21f0faaa619106d84bfebcedad06bb86ccc34d27
|
|
| MD5 |
7ebb3b584505a27d73346f19b279a24b
|
|
| BLAKE2b-256 |
3c1f3338e9b0508af0f73e42b950ba9625e361ad6bef1a7f79aa979f5ad41847
|
Provenance
The following attestation bundles were made for taipanstack-0.3.0-py3-none-any.whl:
Publisher:
publish.yml on gabrielima7/TaipanStack
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
taipanstack-0.3.0-py3-none-any.whl -
Subject digest:
fafa00e01e9016cbc8f47b5d21f0faaa619106d84bfebcedad06bb86ccc34d27 - Sigstore transparency entry: 999885151
- Sigstore integration time:
-
Permalink:
gabrielima7/TaipanStack@445f47c2c969507067f3ba007ce37a23a12f0538 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/gabrielima7
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@445f47c2c969507067f3ba007ce37a23a12f0538 -
Trigger Event:
release
-
Statement type: