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 `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


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.5.tar.gz (38.4 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.5-py3-none-any.whl (57.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for neuroglia_python-0.1.5.tar.gz
Algorithm Hash digest
SHA256 4390f4987b4ce68de417207d0c9b34cc8c1318647eb783488828c101cc91e0ea
MD5 5281206ef0347bef62cf60a0f7b94ecf
BLAKE2b-256 21557aabc5828ef15a0887f6212eac655273bb53c565461b6b82cf80dfd7978e

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for neuroglia_python-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 4f23fb39038c988391d3561fc6dc0dc4d445c7d162da0252229282c9e2f2d534
MD5 1e400365fc74fb739990e038c4d35959
BLAKE2b-256 b4580da34f4640c2a25e56a71ae82feb1c1aba9228b9b00317313f459c904227

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