Skip to content

Haiway

PyPI Python Version License GitHub Stars

Modern Python framework for functional programming with structured concurrency

Haiway brings functional programming principles to Python's async ecosystem, providing a robust foundation for building scalable, maintainable applications with immutable state management and automatic resource cleanup.

Why Haiway?

Building concurrent Python applications often involves complex state management, dependency injection frameworks, and careful resource handling. Haiway simplifies these challenges through:

🔒 Immutability First

Type-safe data structures that prevent race conditions and ensure predictable behavior in concurrent environments

Zero-Config DI

Context-based dependency injection without decorators, containers, or complex frameworks

🎯 Functional Design

Pure functions and explicit data flow make code easier to understand, test, and maintain

🔄 Structured Concurrency

Automatic task lifecycle management with guaranteed cleanup, even in error cases

Core Principles

🎯 Type Safety Throughout

Full type checking with modern Python features - unions, generics, protocols. Runtime validation ensures data integrity.

🧩 Composable Building Blocks

Small, focused components that combine into larger systems. No framework lock-in or magic.

🔄 Explicit Over Implicit

Dependencies are visible in type signatures. No hidden global state or surprising side effects.

🎭 Async-Native

Built for Python's async/await from the ground up. Includes utilities for retries, timeouts, and concurrent operations.

Getting Started

📥 Installation

pip install haiway
Set up your environment in minutes

🚀 Quick Start

Build your first Haiway application with our hands-on tutorial

📚 First Steps

Deep dive into core concepts with practical examples

Learn Haiway

Essential Concepts

  • State Management - Immutable data structures with validation and type safety
  • Functionalities - Organizing business logic with protocols and implementations
  • Packages - Structuring larger applications with modular components

Advanced Topics

For advanced usage patterns and implementation details, see the complete Guides section.

When to Use Haiway

Great for: - Async web services and APIs - Data processing pipelines - Applications requiring strong typing and validation - Systems with complex dependency graphs - Projects emphasizing testability and maintainability

⚠️ Consider alternatives for: - Simple scripts or one-off tools - CPU-bound numerical computing - Projects requiring mutable shared state

Resources

💻 GitHub

Source code, issues, and contributions

💬 Discussions

Community support and feature requests

Built by Miquido Powering innovation in AI and software development