Skip to main content

python-general-be-lib

Libreria backend general purpose per progetti Python: repository CRUD e spaziali su SQLAlchemy / GeoAlchemy2, eccezioni FastAPI, modelli base Pydantic, autenticazione Keycloak e utility di logging.

  • Distribuzione PyPI: python-general-be-lib
  • Pacchetto importabile: general
  • Python richiesto: 3.12+
pip install python-general-be-lib
pip install 'python-general-be-lib[auth]'     # con l'autenticazione Keycloak (pyjwt[crypto])
from sqlalchemy import create_engine

from general.interface.repository import CrudRepository

engine = create_engine("postgresql://user:pass@localhost/db")
repo = CrudRepository(entity=User, model=UserModel, engine=engine)

repo.insert(models=[UserModel(name="Mario", email="mario@example.com")])
repo.find(active=True, order_by="name", asc=True)

Cosa contiene

Area Componenti
Repository ORM CrudRepository, GeometryRepository, ManyToManyRepository, ViewRepository
Layer Core (senza ORM) CrudMetadata, GeomMetadata — CRUD e query spaziali su Table riflesse
Motore di filtraggio StatementManager + BaseHandler, JsonHandler, ILikeHandler, JsonILikeHandler, OrHandler, IntervalHandler
Basi Base (declarative base estesa), ExtBaseModel, CamelExtBaseModel
Paginazione PaginatorRequestModel, PaginatorResponseModel
Eccezioni ExceptionInterface e sottoclassi HTTP (400/401/403/404/422/500/503)
Autenticazione (extra [auth]) KeycloakAuth, AuthContextMiddleware, JWTModel, RoleChecker — verifica dei token Keycloak via JWKS, dependency FastAPI, ruoli
Contesto current_user, current_jwt — utente e claim della richiesta, per l'audit
Logging init_logger, decorator @log

Documentazione

Documento Contenuto
CHANGELOG.md Modifiche per versione, con le note di migrazione
general/README.md Panoramica della libreria: struttura, contratto sulle sessioni, handler, operazioni spaziali
general/DOCS.md Riferimento completo, metodo per metodo

Metadata

Release files for python-general-be-lib 0.13.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-general-be-lib 0.13.0
File Size Uploaded Provenance Actions
python_general_be_lib-0.13.0.tar.gz 192.8 kB Without provenance Details for python_general_be_lib-0.13.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for python-general-be-lib 0.13.0
File Interpreter ABI Platform Actions
python_general_be_lib-0.13.0-py3-none-any.whl Python 3 none any Details for python_general_be_lib-0.13.0-py3-none-any.whl

Total release size: 289.7 kB

Release files / python_general_be_lib-0.13.0.tar.gz

Download URL python_general_be_lib-0.13.0.tar.gz
Size 192.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3ae43404f5292fdfc66bf2622f24eeb25a04c4c70da5d8689f7b366691db612a
BLAKE2b-256 checksum
How to use checksums
39b233155cf8215e094293d6faad10f695535966a5d8b703c2f4c4933b55d471
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / python_general_be_lib-0.13.0-py3-none-any.whl

Download URL python_general_be_lib-0.13.0-py3-none-any.whl
Size 96.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
664b18a9a172602a9c7ed175ae7b9f77b70e32fc58a94ea1194834040c71bec9
BLAKE2b-256 checksum
How to use checksums
195ec02b7e4c7d0e60fcab8c424c1ded67423e95c420f4020b684050b51ed449
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Security for python-general-be-lib 0.13.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.13.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page