db4me
Basic sqlalchemy helpers
Installation
python -m pip install db4me
Usage
Include the database settings into your model and, at application start-up time, create the connection based on these settings.
from pydantic_settings import BaseSettings
from db4me import AllDatabaseSettings, get_engine
class AppSettings(BaseSettings):
# ...
database: AllDatabaseSettings = Field(
description="Database settings.",
)
# ...
settings = AppSettings()
engine = get_engine(settings.database)
Development
Start by creating a virtual environment and installing the dependencies.
If you have a make command available, you can run make init after
the virtual environment is created and activated. Otherwise, you can run
the following commands:
python -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e .[dev]
On Windows, to be able to serve the documentation, you may also need to
install the cairo2 package:
pip install pipwin
pipwin install cairocffi
Metadata
Release files for db4me 0.1.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 |
|---|---|---|---|---|
| db4me-0.1.0.tar.gz | 10.6 kB | Without provenance | Details for db4me-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| db4me-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for db4me-0.1.0-py3-none-any.whl |
Total release size: 17.6 kB
Release files / db4me-0.1.0.tar.gz
| Download URL | db4me-0.1.0.tar.gz |
|---|---|
| Size | 10.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cecd9392a620467b7f1bc6a0ef19b5a8ba2c4865fa12da387b6c0c90f469c82f
|
|
BLAKE2b-256 checksum How to use checksums |
46bde22c649abb3ffa3d7bc1bc800e6b5511ac1c1336e6329cfaa81e4a0c32b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Release files / db4me-0.1.0-py3-none-any.whl
| Download URL | db4me-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
328159bb4de3267566da1d94a9d89262dc53f239b5ae17cbe5bebde2436b3f08
|
|
BLAKE2b-256 checksum How to use checksums |
14ae2d654239a857e709f84627ee8cbe8605b878e5f3adb4dffb45070c552a87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Security for db4me 0.1.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.