Skip to main content

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.

CI Python Coverage Code Style Type Checked License Security PyPI


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

  • Path traversal protection
  • Command injection guards
  • Input sanitizers & validators
  • Secret detection integration

โšก High Performance

  • uvloop async event loop
  • orjson fast JSON serialization
  • Pydantic v2 validation
  • Optimized for production

๐ŸŽฏ Rust-Style Error Handling

  • Ok/Err Result types
  • Explicit error propagation
  • Pattern matching support
  • No silent failures

๐Ÿ”ง Developer Experience

  • Pre-configured quality tools
  • Comprehensive test suite
  • Architecture enforcement
  • Zero-config setup

๐Ÿš€ 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
  • Pydantic v2
  • Orjson
  • Uvloop
  • Structlog
  • Result
  • Ruff
  • Mypy
  • Bandit
  • Pytest
  • Hypothesis
  • GitHub Actions
  • Dependabot
  • Pre-commit
  • Poetry
  • Import Linter

๐Ÿค 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

โฌ† Back to Top

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

taipanstack-0.2.9.tar.gz (43.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

taipanstack-0.2.9-py3-none-any.whl (50.5 kB view details)

Uploaded Python 3

File details

Details for the file taipanstack-0.2.9.tar.gz.

File metadata

  • Download URL: taipanstack-0.2.9.tar.gz
  • Upload date:
  • Size: 43.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for taipanstack-0.2.9.tar.gz
Algorithm Hash digest
SHA256 0c81a2cb039c76cde6403b06bb7ab0f89281165cc06f7cf6aea4cc9e2e225aea
MD5 8e30d2fb36e678f436e9381e37e529ec
BLAKE2b-256 ee539cce71d6f418a7d9baa93380ec7de3da3e2777776d98e41ae5da35940196

See more details on using hashes here.

Provenance

The following attestation bundles were made for taipanstack-0.2.9.tar.gz:

Publisher: publish.yml on gabrielima7/TaipanStack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file taipanstack-0.2.9-py3-none-any.whl.

File metadata

  • Download URL: taipanstack-0.2.9-py3-none-any.whl
  • Upload date:
  • Size: 50.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for taipanstack-0.2.9-py3-none-any.whl
Algorithm Hash digest
SHA256 7cff4a4efa06327b4bb1e3e372f9bdc5986aa730b020419320343bb5a652b5bd
MD5 36c2a27da8e3b5527bd06423ae94c0f2
BLAKE2b-256 79aaf964331b6db48febdea97caf6ead998db6833ec0089f694ac433e6447795

See more details on using hashes here.

Provenance

The following attestation bundles were made for taipanstack-0.2.9-py3-none-any.whl:

Publisher: publish.yml on gabrielima7/TaipanStack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page