summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md6
1 files changed, 4 insertions, 2 deletions
diff --git a/README.md b/README.md
index 9cfc571..25737d2 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,8 @@
A simple ORM-like utility for operating on local YAML files via Python dataclasses.
+## Usage
+
Define a dataclass:
```python
@@ -16,7 +18,7 @@ class User:
key: ClassVar[str] = "name"
```
-Note the `key` field which is used to denote that `name` should be used as the primary key field.
+Note the special `key` field which is used to denote that `name` should be used as the primary key field.
Instantiate a new object:
@@ -30,7 +32,7 @@ Save it to file:
from ymlstash import YmlStash
stash = YmlStash(User, "path/to/db")
-stash.save("yuval", user)
+stash.save(user)
```
Load from file: