Markdown as plain-text data storage
Project description
markstore
Markdown as plain-text data storage
But Why?
Why use this when there are numerous alternatives for data storage and serialization?
Check if your use-case meets the following criteria:
- Primarily human readable (not necessarily, writable) plain-text, especially for non-programmers
- Easy consumption by version control
- Easy export, or a desire to prevent vendor lock-in to your application
What this is
A simple, json-like interface to serialize basic objects to and from a markdown file.
What this isn't
- A generic markdown processing/generator tool
- A configuration language
It is a non-goal of this library to be tolerant of human error. The intended use case is machine-to-machine serialization and the occasional export to a human.
Example
To File
import markstore
# Serialize
myObject = {
"myKey": "myData"
}
with open("out.md", mode='wb') as f:
markstore.dump(myObject, f)
# Deserialize
with open("out.md", mode='rb') as f:
myObject = markstore.load(f)
To String
import markstore
# Serialize
myObject = {
"myKey": "myData"
}
myStr = markstore.dumps(myObject)
# Deserialize
myObject = markstore.loads(myStr)
Markdown Object Specification
Lists
["one", "two", "three", ["four", "five"], "six"]
Translates to
- one
- two
- three
- - four
- five
- six
Dicts
{
"key1": "data1",
"key2": "data2",
"key3": {
"subkey1": "subdata1",
"subkey2": "subdata2"
}
}
Translates to
# key1
data1
# key2
data2
# key3
## subkey1
subdata1
## subkey2
subdata2
Combinations
{
"Key1":
"My Data",
"Data": [{
"Subkey1": "Subdata1"
}, {
"Subkey2": {
"Subkey2.1": "Subdata2.1",
"Subkey2.2": "Subdata2.2"
}
}],
"Key2":
"Other data"
}
# Key1
My Data
# Data
- ## Subkey1
Subdata1
- ## Subkey2
### Subkey2.1
Subdata2.1
### Subkey2.2
Subdata2.2
# Key2
Other data
Inner dictionary keys are always prefixed by an increasing number of #, even if the key is within a list
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 markstore-1.2.0.tar.gz.
File metadata
- Download URL: markstore-1.2.0.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bdfadca8a62f7c05f872fd1a331d34bea10f5e265a9a67a150a33b0faa0a3aa5
|
|
| MD5 |
3d80b4655d070da92ea70d42f96c7b1a
|
|
| BLAKE2b-256 |
c215c49427c0ca12683e8136a883d875bac525eb15be4a1963ffac2155dfa2ca
|
Provenance
The following attestation bundles were made for markstore-1.2.0.tar.gz:
Publisher:
dist.yaml on alagyn/markstore
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
markstore-1.2.0.tar.gz -
Subject digest:
bdfadca8a62f7c05f872fd1a331d34bea10f5e265a9a67a150a33b0faa0a3aa5 - Sigstore transparency entry: 953253643
- Sigstore integration time:
-
Permalink:
alagyn/markstore@227638249a4850dd2a9e8af775b794aa66f038c1 -
Branch / Tag:
refs/tags/v1.2.0 - Owner: https://github.com/alagyn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
dist.yaml@227638249a4850dd2a9e8af775b794aa66f038c1 -
Trigger Event:
release
-
Statement type:
File details
Details for the file markstore-1.2.0-py3-none-any.whl.
File metadata
- Download URL: markstore-1.2.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d024a1b3cac349b385c81a001b8284fd236fcbbef8d426c47f9e189c8cff7c6
|
|
| MD5 |
a45eae30700f5d4518ccb3da9480c249
|
|
| BLAKE2b-256 |
d260911e9ed0c1bbe6c3bdc5011f30479e1ed0e3d991fa2e2f7aca15673b2b6a
|
Provenance
The following attestation bundles were made for markstore-1.2.0-py3-none-any.whl:
Publisher:
dist.yaml on alagyn/markstore
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
markstore-1.2.0-py3-none-any.whl -
Subject digest:
1d024a1b3cac349b385c81a001b8284fd236fcbbef8d426c47f9e189c8cff7c6 - Sigstore transparency entry: 953253645
- Sigstore integration time:
-
Permalink:
alagyn/markstore@227638249a4850dd2a9e8af775b794aa66f038c1 -
Branch / Tag:
refs/tags/v1.2.0 - Owner: https://github.com/alagyn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
dist.yaml@227638249a4850dd2a9e8af775b794aa66f038c1 -
Trigger Event:
release
-
Statement type: