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.14.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.14.0
File Size Uploaded Provenance Actions
python_general_be_lib-0.14.0.tar.gz 198.9 kB Without provenance Details for python_general_be_lib-0.14.0.tar.gz

Built distribution (wheel)

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

Total release size: 298.1 kB

Release files / python_general_be_lib-0.14.0.tar.gz

Download URL python_general_be_lib-0.14.0.tar.gz
Size 198.9 kB
Tags Source
SHA-256 checksum
How to use checksums
352fd1d5807d2ae3a7716ba9a878ff0cd682931c8c45411ed332acdfecff9cf4
BLAKE2b-256 checksum
How to use checksums
8a0d50b1d8daf65e51f716d38fb712fe50df378b24933634809483cbb748ff68
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.14.0-py3-none-any.whl

Download URL python_general_be_lib-0.14.0-py3-none-any.whl
Size 99.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
591427b8ed0238057b279caaf416859c6a3c82522a66a819969781137cfaf8ec
BLAKE2b-256 checksum
How to use checksums
a1184c698695144b9b1b6c05f229795958d857d4da95899518e0d0cbb8586f06
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.14.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.14.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