sqlsettingslib
Python lib: Store settings in a database
What is this library for?
In some projects you might want to store some variables for longer than you run the program. When restarting the program you might still want some settings to be the same. Those settings could be stored in a database. This lib does all the complicated part for you.
Usage
from sqlsettingslib import Setting
# Define the path for your database
path = "path/to/sqlsettingslib.sqlite3"
# Create a sqlsettingslib object:
s = Setting(path)
# Add some sqlsettingslib
s.add_setting(
text_id="user_name",
readable_name="User name",
description="A name for the user",
value="MyCoolUserName"
)
print(s["user_name"])
# -> "MyCoolUserName"
s["user_name"] = "AnotherCoolName"
print(s["user_name"])
# -> "AnotherCoolName"
s.update_setting(
text_id="user_name",
description="A unique name for the user."
)
print(s.get_setting(detail="description")[0])
# -> "A unique name for the user."
Metadata
Release files for sqlsettingslib 0.0.9
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 |
|---|---|---|---|---|
| sqlsettingslib-0.0.9.tar.gz | 3.2 kB | Without provenance | Details for sqlsettingslib-0.0.9.tar.gz |
Release files / sqlsettingslib-0.0.9.tar.gz
| Download URL | sqlsettingslib-0.0.9.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
447f806712ac9c8d73bdbd0c5327a96d5324db4f734b6c1a7cb40bb351b82df3
|
|
BLAKE2b-256 checksum How to use checksums |
769344c9f4f42d9eeee17b06e3b35642a6c8deb1e42f32ced35ab91b756c7541
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
|
Security for sqlsettingslib 0.0.9
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.