Skip to main content

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 the version tag in pyproject.toml
# Commit changes

poetry build

poetry publish --repository gitlab -u __token__ -p pypi-

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

neuroglia_python-0.1.3.tar.gz (38.2 kB view details)

Uploaded Source

Built Distribution

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

neuroglia_python-0.1.3-py3-none-any.whl (56.8 kB view details)

Uploaded Python 3

File details

Details for the file neuroglia_python-0.1.3.tar.gz.

File metadata

  • Download URL: neuroglia_python-0.1.3.tar.gz
  • Upload date:
  • Size: 38.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.12.9 Darwin/24.3.0

File hashes

Hashes for neuroglia_python-0.1.3.tar.gz
Algorithm Hash digest
SHA256 7462cfe7ea9651e32e7620c19c937a9d4d6d81c502f043cd6c15f458fb259d83
MD5 f5b4871e5a150691942b05961455388c
BLAKE2b-256 482fd7c57afcff266f1b02002ddb3ce0f4a1446ca1bbedc6fd6e670c209fe59e

See more details on using hashes here.

File details

Details for the file neuroglia_python-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: neuroglia_python-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 56.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.12.9 Darwin/24.3.0

File hashes

Hashes for neuroglia_python-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f47eb1ec95c4f3c4cc0b79243d75719e3344c57b42ec35df5af08a160f46e1c3
MD5 1a284ff85316a7efdb2dcc4744830fe4
BLAKE2b-256 b3981753f35b1e89221a14295e5416417012f39ea57bbaa9b3d09ee03fb2ccdf

See more details on using hashes here.

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