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.12.1

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.12.1
File Size Uploaded Provenance Actions
python_general_be_lib-0.12.1.tar.gz 172.3 kB Without provenance Details for python_general_be_lib-0.12.1.tar.gz

Built distribution (wheel)

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

Total release size: 260.8 kB

Release files / python_general_be_lib-0.12.1.tar.gz

Download URL python_general_be_lib-0.12.1.tar.gz
Size 172.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8c2e0a43a8c04abe6bcb9e2c9d4113508c35e73ad26a2764ddfb884a5e6f5986
BLAKE2b-256 checksum
How to use checksums
0163b37588e11079a53431419110f07c6f3cd207288bd17d642c93fa0b874188
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.12.1-py3-none-any.whl

Download URL python_general_be_lib-0.12.1-py3-none-any.whl
Size 88.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f7dded5ff694c1120114ff01079f4eb5a20730735a6b4bea7a869f66980db613
BLAKE2b-256 checksum
How to use checksums
cd45fc00658b563d9daf1f9dc18277b7ba2fa0da6188196115cec009ee3afb94
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.12.1

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.12.1 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