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 coverage (97%+ coverage)
make test
# Check architecture contracts
make lint-imports
# Run security scans
make security
๐ 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/ # โ
Comprehensive test suite (97%+ coverage)
โโโ pyapp/ # ๐ฆ Standalone executable builder
โโโ .github/ # ๐ CI/CD workflows
โโโ pyproject.toml # ๐ Modern dependency management
๐ DevSecOps
TaipanStack integrates security and quality at every level:
| Category | Tools | Purpose |
|---|---|---|
| SAST | Bandit, Semgrep | Static Application Security Testing |
| SCA | Safety | Dependency vulnerability scanning |
| Types | Mypy (strict) | Compile-time type checking |
| Lint | Ruff | Lightning-fast linting & formatting |
| Arch | Import Linter | Dependency rule enforcement |
| Test | Pytest, Hypothesis | Property-based testing |
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
โ Architecture โ Import Linter contracts
๐ 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()
๐ ๏ธ Tech Stack
| Runtime | Quality | DevOps |
|---|---|---|
|
|
|
๐ค 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.2.8.tar.gz.
File metadata
- Download URL: taipanstack-0.2.8.tar.gz
- Upload date:
- Size: 43.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.12.3 Linux/6.17.0-14-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ea485e29932ab7882f2b4ba019ceca72236c18e52cf36c9dafb44010cb9e46c
|
|
| MD5 |
a6fbcfe4b7b32e2c16c90805aa2b4e3c
|
|
| BLAKE2b-256 |
13c49cb4ae8d80658cf420b45f06f0b9fe91759d5210303d993c674d2068ebb4
|
File details
Details for the file taipanstack-0.2.8-py3-none-any.whl.
File metadata
- Download URL: taipanstack-0.2.8-py3-none-any.whl
- Upload date:
- Size: 50.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.12.3 Linux/6.17.0-14-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e217671d90166a4b06e1e926add2db266e72b06629fd0799901196f61147229e
|
|
| MD5 |
7700eb4b7946e7f18677b4cf4d4645eb
|
|
| BLAKE2b-256 |
319d6fdced22980f7780c430a0c705d116c684341cb90ee5af42c0e9a0b9ef24
|