Name | waku JSON |
Version |
0.2.0
JSON |
| download |
home_page | None |
Summary | Microframework for building modular and loosely coupled applications |
upload_time | 2025-01-12 11:08:16 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.11 |
license | None |
keywords |
architecture
decoupled
framework
modular
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# waku
<p align="left">
<sup><i>waku</i> [<b>枠</b>] <i>means framework in Japanese.</i></sup>
<br/>
</p>
<div align="center">
[![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
[![Python version](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff/)
[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
[![PyPI](https://img.shields.io/pypi/v/waku.svg)](https://pypi.python.org/pypi/waku)
[![Downloads](https://static.pepy.tech/badge/waku/month)](https://pepy.tech/projects/waku)
[![License](https://img.shields.io/pypi/l/waku.svg)](https://github.com/waku-py/waku/blob/master/LICENSE)
</div>
`waku` *is a microframework for building modular and loosely coupled applications.*
## Overview
`waku` helps you build maintainable Python applications by providing:
- Clean architecture patterns
- Dependency injection
- Module system
- Extension system
- Command/Query handling (CQRS)
## Features
### 🏗️ Modular Architecture
- Build modular monoliths with clear boundaries
- Enforce loose coupling between components
- Validate dependency graphs automatically
- Control module visibility and access
### 🔌 Extensible Plugin System
- Built-in extension mechanism
- Lifecycle hooks for modules and applications
- Custom extension points
- Rich ecosystem of built-in extensions
### 💉 Flexible Dependency Injection
- Framework-agnostic DI implementation
- Providers with different lifetimes (singleton, scoped, transient)
- Easy testing and mocking
### 🎮 Command Query Responsibility Segregation (CQRS)
- Built-in CQRS extension
- Command/Query requests handling
- Event handling
- Middleware support
## Quick Start
### Installation
```sh
# Using pip
pip install waku
# Using UV (recommended)
uv add waku
# Using poetry
poetry add waku
```
### Basic Example
```python
import asyncio
from waku import Application, ApplicationConfig, Module
from waku.di import Scoped, Injected, inject
from waku.di.contrib.aioinject import AioinjectDependencyProvider
# Define your providers
class UserService:
async def get_user(self, user_id: str) -> dict[str, str]:
return {"id": user_id, "name": "John Doe"}
# Create a module
user_module = Module(
name="users",
providers=[
Scoped(UserService),
],
exports=[UserService],
)
# Create the application
application = Application(
name="my_app",
config=ApplicationConfig(
dependency_provider=AioinjectDependencyProvider(),
modules=[user_module],
),
)
# Define entrypoints
# In real world this can be FastAPI routes, etc.
@inject
async def handler(user_service: Injected[UserService]) -> dict[str, str]:
return await user_service.get_user(user_id='123')
# Run the application
# In real world this would be run by a 3rd party framework like FastAPI
async def main() -> None:
dp = application.dependency_provider
async with application, dp.context():
result = await handler()
print(result)
if __name__ == '__main__':
asyncio.run(main())
```
## Documentation
For detailed documentation, visit our [documentation site](https://waku-py.github.io/waku/).
### Key Topics
- [Getting Started](https://waku-py.github.io/waku/getting-started)
- [Module System](https://waku-py.github.io/waku/modules)
- [Dependency Injection](https://waku-py.github.io/waku/dependency-injection)
- [Extensions](https://waku-py.github.io/waku/extensions)
- [CQRS](https://waku-py.github.io/waku/cqrs)
- [Integrations](https://waku-py.github.io/waku/integrations)
## Contributing
We welcome contributions! Please see our [Contributing Guide](./CONTRIBUTING.md) for details.
### Development Setup
See out contributing guide for [development setup](./CONTRIBUTING.md#development-setup).
## License
This project is licensed under the [MIT License](./LICENSE).
Raw data
{
"_id": null,
"home_page": null,
"name": "waku",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "architecture, decoupled, framework, modular",
"author": null,
"author_email": "Daniil Kharkov <fadeddexofan@gmail.com>, Doctor <thirvondukr@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/94/66/41743279eaf11f8f9a5b2a80c4562eb97a3c79876ad8bfb535d1e01b6d8d/waku-0.2.0.tar.gz",
"platform": null,
"description": "# waku\n\n<p align=\"left\">\n <sup><i>waku</i> [<b>\u67a0</b>] <i>means framework in Japanese.</i></sup>\n <br/>\n</p>\n\n<div align=\"center\">\n\n[![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)\n[![Python version](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff/)\n[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)\n\n[![PyPI](https://img.shields.io/pypi/v/waku.svg)](https://pypi.python.org/pypi/waku)\n[![Downloads](https://static.pepy.tech/badge/waku/month)](https://pepy.tech/projects/waku)\n[![License](https://img.shields.io/pypi/l/waku.svg)](https://github.com/waku-py/waku/blob/master/LICENSE)\n\n</div>\n\n`waku` *is a microframework for building modular and loosely coupled applications.*\n\n## Overview\n\n`waku` helps you build maintainable Python applications by providing:\n- Clean architecture patterns\n- Dependency injection\n- Module system\n- Extension system\n- Command/Query handling (CQRS)\n\n## Features\n\n### \ud83c\udfd7\ufe0f Modular Architecture\n- Build modular monoliths with clear boundaries\n- Enforce loose coupling between components\n- Validate dependency graphs automatically\n- Control module visibility and access\n\n### \ud83d\udd0c Extensible Plugin System\n- Built-in extension mechanism\n- Lifecycle hooks for modules and applications\n- Custom extension points\n- Rich ecosystem of built-in extensions\n\n### \ud83d\udc89 Flexible Dependency Injection\n- Framework-agnostic DI implementation\n- Providers with different lifetimes (singleton, scoped, transient)\n- Easy testing and mocking\n\n### \ud83c\udfae Command Query Responsibility Segregation (CQRS)\n- Built-in CQRS extension\n- Command/Query requests handling\n- Event handling\n- Middleware support\n\n## Quick Start\n\n### Installation\n\n```sh\n# Using pip\npip install waku\n\n# Using UV (recommended)\nuv add waku\n\n# Using poetry\npoetry add waku\n```\n\n### Basic Example\n\n```python\nimport asyncio\n\nfrom waku import Application, ApplicationConfig, Module\nfrom waku.di import Scoped, Injected, inject\nfrom waku.di.contrib.aioinject import AioinjectDependencyProvider\n\n# Define your providers\nclass UserService:\n async def get_user(self, user_id: str) -> dict[str, str]:\n return {\"id\": user_id, \"name\": \"John Doe\"}\n\n# Create a module\nuser_module = Module(\n name=\"users\",\n providers=[\n Scoped(UserService),\n ],\n exports=[UserService],\n)\n\n# Create the application\napplication = Application(\n name=\"my_app\",\n config=ApplicationConfig(\n dependency_provider=AioinjectDependencyProvider(),\n modules=[user_module],\n ),\n)\n\n# Define entrypoints\n# In real world this can be FastAPI routes, etc.\n@inject\nasync def handler(user_service: Injected[UserService]) -> dict[str, str]:\n return await user_service.get_user(user_id='123')\n\n\n# Run the application\n# In real world this would be run by a 3rd party framework like FastAPI\nasync def main() -> None:\n dp = application.dependency_provider\n async with application, dp.context():\n result = await handler()\n\n print(result)\n\n\nif __name__ == '__main__':\n asyncio.run(main())\n```\n\n## Documentation\n\nFor detailed documentation, visit our [documentation site](https://waku-py.github.io/waku/).\n\n### Key Topics\n- [Getting Started](https://waku-py.github.io/waku/getting-started)\n- [Module System](https://waku-py.github.io/waku/modules)\n- [Dependency Injection](https://waku-py.github.io/waku/dependency-injection)\n- [Extensions](https://waku-py.github.io/waku/extensions)\n- [CQRS](https://waku-py.github.io/waku/cqrs)\n- [Integrations](https://waku-py.github.io/waku/integrations)\n\n## Contributing\n\nWe welcome contributions! Please see our [Contributing Guide](./CONTRIBUTING.md) for details.\n\n### Development Setup\n\nSee out contributing guide for [development setup](./CONTRIBUTING.md#development-setup).\n\n## License\n\nThis project is licensed under the [MIT License](./LICENSE).\n",
"bugtrack_url": null,
"license": null,
"summary": "Microframework for building modular and loosely coupled applications",
"version": "0.2.0",
"project_urls": {
"Changelog": "https://github.com/waku-py/waku/blob/master/CHANGELOG.md",
"Issues": "https://github.com/waku-py/waku/issues",
"Repository": "https://github.com/waku-py/waku"
},
"split_keywords": [
"architecture",
" decoupled",
" framework",
" modular"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "41496806f3613c83a1be9652d49c3c1398d5b219c2eee8e5f19ab8ebfcd90834",
"md5": "fc310c0f81a07f9d53d3bd75e65d55b2",
"sha256": "965420e21b3a54a1b39c6d4df8e9b28be6ab79f555ba3f0af2dfd99546928bc8"
},
"downloads": -1,
"filename": "waku-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fc310c0f81a07f9d53d3bd75e65d55b2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 30997,
"upload_time": "2025-01-12T11:08:15",
"upload_time_iso_8601": "2025-01-12T11:08:15.342807Z",
"url": "https://files.pythonhosted.org/packages/41/49/6806f3613c83a1be9652d49c3c1398d5b219c2eee8e5f19ab8ebfcd90834/waku-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "946641743279eaf11f8f9a5b2a80c4562eb97a3c79876ad8bfb535d1e01b6d8d",
"md5": "36c88e2103aaeaea28e1e178193e3f1c",
"sha256": "98e62393d6121768cd5ee336b6c4f26b43da7aa25867a73ef9af6186cefae870"
},
"downloads": -1,
"filename": "waku-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "36c88e2103aaeaea28e1e178193e3f1c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 22375,
"upload_time": "2025-01-12T11:08:16",
"upload_time_iso_8601": "2025-01-12T11:08:16.812108Z",
"url": "https://files.pythonhosted.org/packages/94/66/41743279eaf11f8f9a5b2a80c4562eb97a3c79876ad8bfb535d1e01b6d8d/waku-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-12 11:08:16",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "waku-py",
"github_project": "waku",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "waku"
}