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.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| python_general_be_lib-0.12.0.tar.gz | 171.0 kB | Without provenance | Details for python_general_be_lib-0.12.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| python_general_be_lib-0.12.0-py3-none-any.whl | Python 3 | none | any | Details for python_general_be_lib-0.12.0-py3-none-any.whl |
Total release size: 259.1 kB
Release files / python_general_be_lib-0.12.0.tar.gz
| Download URL | python_general_be_lib-0.12.0.tar.gz |
|---|---|
| Size | 171.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1f329dc9924fed3eceb193ef818e5db179a38ca8f634a797042c5747418a6ee5
|
|
BLAKE2b-256 checksum How to use checksums |
ba90227808bf3cdb970b4cdaa3189d235879a5552d3bae444dc07a3bb0661574
|
| 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.0-py3-none-any.whl
| Download URL | python_general_be_lib-0.12.0-py3-none-any.whl |
|---|---|
| Size | 88.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fd503f9a176c5b21a656247fc58cb3efcd3a7bafe82efccf32a4c4e2d586a129
|
|
BLAKE2b-256 checksum How to use checksums |
2871e320e4634b233f6c0d018e5df1fbda1318fe347e93416dd2342e0f46305e
|
| 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.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.