Dack is a file format that can be stored in any text file
Project description
Dack is a file format that can be stored in any text file, but will default to .cfg.
Dack primarily stores key value pairs or dictionaries. The syntax are thusly:
&>KEY:VALUE
Anything after &> and before : is a key.
Anything after the first : and before the next &> is a value.
The key may contain anything except &> or :, leading or trailing whitespace will by stripped.
The value may contain anything except &>, leading or trailing whitespace will by stripped.
If there is a &> without an associated : then it will be ignored, effectively acting as comments.
If the file contains duplicate key entries the first one will be used and the rest ignored with a warning.
This format has many benefits:
- Very simple and readable
- Very flexible and hard to break
- Doesn't feel tedious to type in
- Works with any text document filetype
- Highly portable, won't break being posted in markdown or on social media
Dack has 10 public functions that are outlined here:
dack.to_pydict will convert a string of the Dack format into a python dict.
dack.from_pydict will convert a python dict into a string of the Dack format.
dack.save dack.load will save or load a dict to or from a file using that file's path.
dack.saveas dack.savefile dack.loadfrom dack.loadfile are like overrides for the save and load functions;
saveas and loadfrom only need the name of the file, savefile and loadfile needs the file name with it's extension.
dack.savebatch will save a list of dictionaries as separate files in a directory.
dack.loadbatch will recursively load files in a directory and return a list of dictionaries.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dack-0.1.2.tar.gz.
File metadata
- Download URL: dack-0.1.2.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c225e51e1e50caa9653faeb7767f4b88a73af08f8765e43d00c31aa8209255b
|
|
| MD5 |
710ad3524bd4e064574cba54fb3fbc05
|
|
| BLAKE2b-256 |
106501481ea59cf07da87d092a81e878822e8d25970f3b9bf4d883cac0a19a55
|
Provenance
The following attestation bundles were made for dack-0.1.2.tar.gz:
Publisher:
python-publish.yml on Wirlocke/dack
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dack-0.1.2.tar.gz -
Subject digest:
9c225e51e1e50caa9653faeb7767f4b88a73af08f8765e43d00c31aa8209255b - Sigstore transparency entry: 1110981594
- Sigstore integration time:
-
Permalink:
Wirlocke/dack@0cd1d3cce2ab6e36174214c8cfa21626dbc0ed55 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/Wirlocke
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@0cd1d3cce2ab6e36174214c8cfa21626dbc0ed55 -
Trigger Event:
release
-
Statement type:
File details
Details for the file dack-0.1.2-py2.py3-none-any.whl.
File metadata
- Download URL: dack-0.1.2-py2.py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe58d315a1cb2f24790c4b6ea7c6d3bcdb397de2ae7c424b5fc21bd6af8f46b7
|
|
| MD5 |
471dc2f56404a9624a9fe2efa60e227f
|
|
| BLAKE2b-256 |
602fb31ad7279d50f450686532c060359820def187115908b2f09a67756dc62a
|
Provenance
The following attestation bundles were made for dack-0.1.2-py2.py3-none-any.whl:
Publisher:
python-publish.yml on Wirlocke/dack
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dack-0.1.2-py2.py3-none-any.whl -
Subject digest:
fe58d315a1cb2f24790c4b6ea7c6d3bcdb397de2ae7c424b5fc21bd6af8f46b7 - Sigstore transparency entry: 1110981691
- Sigstore integration time:
-
Permalink:
Wirlocke/dack@0cd1d3cce2ab6e36174214c8cfa21626dbc0ed55 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/Wirlocke
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@0cd1d3cce2ab6e36174214c8cfa21626dbc0ed55 -
Trigger Event:
release
-
Statement type: