Port from .NET to Python of the Neuroglia Framework
Project description
Neuroglia Python Framework
The framework is a very thin software layer built on top of FastAPI that provides developers with a set of coding features and tools that may be useful for any microservice (regardless of its role and domain/bounded context), such as:
- Implements all guidelines from https://12factor.net
- MVC Web App builder with fundamental abstractions
- Simple Dependency Injection mechanism, including automatic class discovery and instantiation
- Class-based API controller with automatic module discovery
- Modular Command/Query responsibility segregation
- Optional Event-sourcing for event-driven Domain modeling
- Clean layered Code https://levelup.gitconnected.com/clean-architecture-86c4f03e4771
- Pure Domain models, independent of persistence
- Application handlers (Command, Queries, Events, Tasks)
- Repository pattern
- Independent API controllers, endpoints and models (DTO's) vs Domain models and logic
- Native async Events ingestion, handling, emission (JSON CloudEvent) using ReactiveX programming with RxPy
- Data models mapping between Domain and Integration
- Easy extension for background task scheduling with apscheduler
- etc...
The code typically includes comments that help understand it.
The src/main.py file is the entry point that defines all dependencies, including the sub-folders where to dynamically load the API, Application, Persistence and Domain layers.
In turn, when booting, the web app dynamically discovers, identifies and instantiate dependencies then loads:
- API controllers and define the mapping between each endpoint and its corresponding Application handler
- Application handlers (incl. Commands, Queries, Events, Tasks) and services (any business logic)
- Integration dependencies (any API client service, persistence-layer clients, ) and models (API' DTO for requests and responses)
Documentation
Temporarily hosted at https://bvandewe.github.io/pyneuro/
Disclaimer
This project was the opportunity for me (cdavernas) to learn Python while porting some of the concepts and services of the .NET version of the Neuroglia Framework
Packaging
# Set `package-mode = true` in pyproject.toml
# Set the version tag in pyproject.toml
# Commit changes
# Create API Token in pypi.org...
# Configure credentials for pypi registry:
poetry config pypi-token.pypi {pypi-....mytoken}
# Build package locally
poetry build
# Publish package to pypi.org:
poetry publish
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 neuroglia_python-0.1.6.tar.gz.
File metadata
- Download URL: neuroglia_python-0.1.6.tar.gz
- Upload date:
- Size: 38.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.4 CPython/3.12.1 Darwin/24.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c99eec2114aa8489d34667d8e21377effec6a856a12f0a9dfcfe5be886dc261
|
|
| MD5 |
3a7081be582b0d9ce4d1963d4bb85378
|
|
| BLAKE2b-256 |
c846b7c45345bdca3664ef17453cd3e56493bf50a6be426f4bf0a1f3dcbabef6
|
File details
Details for the file neuroglia_python-0.1.6-py3-none-any.whl.
File metadata
- Download URL: neuroglia_python-0.1.6-py3-none-any.whl
- Upload date:
- Size: 57.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.4 CPython/3.12.1 Darwin/24.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4ff451e2e2bc0a624e259aee758d2c86e16c953d2904c113506b9b81e3c8f02
|
|
| MD5 |
feccb4b2c1eaf15309fd600306a398f2
|
|
| BLAKE2b-256 |
d8e6f4c64021d438a50c0eeaa9c845877c3e6e23988f9fdd380e6531e3484807
|