Safitty is a wrapper on JSON/YAML configs for Python.
Designed with a focus on safe data reading and writing for deep-nested dictionaries and lists.
Installation
pip install -U safitty
Features
- Safe
getfor dictionaries and lists - Safe
setfor dictionaries and lists - Multiple keys at one
get/setcall. - Several strategies, includes: Get the most deep non-null value by your keys, Get the last non-null container and more
- Value transformations to classes
Quickstart
import safitty
# Loads config YAML or JSON
config = safitty.load("/path/to/config.yml")
# Getting value from the config
safitty.get(config, "very", "deep", "call", default="This is the default value")
# Setting value into
safitty.set(config, "clients", 0, "address", value="localhost:8888")
More examples in the getting-started notebook.
Metadata
Release files for safitty 1.3
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 |
|---|---|---|---|---|
| safitty-1.3.tar.gz | 9.6 kB | Without provenance | Details for safitty-1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| safitty-1.3-py3-none-any.whl | Python 3 | none | any | Details for safitty-1.3-py3-none-any.whl |
Total release size: 20.9 kB
Release files / safitty-1.3.tar.gz
| Download URL | safitty-1.3.tar.gz |
|---|---|
| Size | 9.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ab5a6e1931e2dea4fa4222d16d97691a005055ac1385b535c2cd30e39940b892
|
|
BLAKE2b-256 checksum How to use checksums |
9ce5f8eb5ec0000b91c0ea11b3bedba35e0993bce23711918b37a3bd3d8bc5a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.7
|
Release files / safitty-1.3-py3-none-any.whl
| Download URL | safitty-1.3-py3-none-any.whl |
|---|---|
| Size | 11.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
df35a3f60869e407d35c948542a5b8b2c037c97462c1da99aac3fcce1877afb1
|
|
BLAKE2b-256 checksum How to use checksums |
37ea51fedb7c8802b09d557a04db13661939bb483f40e1450958961ce50f15d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.7
|
Security for safitty 1.3
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.