https://github.com/ziul/dskity
Modular Application (Plugin System) API
https://github.com/ziul/dskity
fastapi modularization python uv
Last synced: 2 months ago
JSON representation
Modular Application (Plugin System) API
- Host: GitHub
- URL: https://github.com/ziul/dskity
- Owner: Ziul
- License: gpl-3.0
- Created: 2026-04-25T18:11:05.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2026-04-25T20:22:51.000Z (2 months ago)
- Last Synced: 2026-04-25T21:24:56.533Z (2 months ago)
- Topics: fastapi, modularization, python, uv
- Language: Python
- Homepage: https://pypi.org/project/dskity/
- Size: 91.8 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DSkity
[](https://github.com/Ziul/dskity/actions)
[](https://github.com/Ziul/dskity/releases)
[](https://pypi.org/project/dskity/)
[](https://pypi.org/project/dskity/)
[](https://github.com/Ziul/dskity/blob/main/LICENSE)
[](https://github.com/Ziul/dskity/issues)
[](https://codecov.io/gh/Ziul/dskity)
A small, modular Python framework for building services with pluggable transports and modules.
**Key features:**
- Lightweight module system with a single `TransportClients` object (HTTP, gRPC, MQTT).
- Simple key-value backends (in-memory, Redis, Consul) with a unified interface.
- FastAPI-based HTTP transport and optional gRPC/MQTT clients.
- CI workflow with PyPI publishing support via GitHub Actions and OIDC.
**Table of Contents**
- **Overview**
- **Getting Started**
- **Configuration**
- **Running Locally**
- **Testing**
- **CI & Publishing**
- **Contributing**
## Overview
DSkity provides a minimal foundation to register independent modules that receive a single `TransportClients` object containing references to available transport clients (HTTP app, gRPC client, MQTT client). The design keeps optional dependencies lazy-loaded and avoids hard runtime requirements for gRPC or MQTT unless they are used.
## Getting Started
Prerequisites:
- Python 3.11+ (project tests are configured for modern Python versions)
- Optional: Redis or Consul if you plan to use those KV backends
Install project dependencies (development):
```bash
python -m pip install --upgrade pip
pip install -e .[dev]
```
## Configuration
Configuration is handled via the `DSkitySettings` pydantic settings model in `src/dskity/config`. You can provide a YAML or environment variables to configure transports and KV backends.
## Running Locally
Run the FastAPI app (when present) or import `dskity.bootstrap` to construct an application instance.
Example (development):
```bash
dskity
```
## Testing
Run the test suite with pytest:
```bash
pytest -q
```
## Module API
Modules must implement a `register(self, clients: TransportClients, config: DSkitySettings | dict) -> None` method. Use `clients.http` to access the FastAPI app (if available), `clients.grpc` for the gRPC client, and `clients.mqtt` for MQTT.
## Contributing
Contributions are welcome. Typical workflow:
```bash
git checkout -b feature/my-change
pytest
git push --set-upstream origin feature/my-change
```
Open a pull request for review. Please follow existing code style and update tests when adding or changing behavior.
## License
See `pyproject.toml` / `PKG-INFO` for license information.