summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuval Adam <_@yuv.al>2024-05-07 21:01:24 +0200
committerYuval Adam <_@yuv.al>2024-05-07 21:01:24 +0200
commit58949c361a8170e46a279e4c1824c0a9414a26d1 (patch)
tree99c431be89cdaaf353fdebb5ea3453c98ec5d66d
parent7dfd130b1c0bd909b604e2273792f840be4decee (diff)
Update README
-rw-r--r--README.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/README.md b/README.md
index 25737d2..6b9b07a 100644
--- a/README.md
+++ b/README.md
@@ -35,6 +35,14 @@ stash = YmlStash(User, "path/to/db")
stash.save(user)
```
+This will create a `yuval.yml` file in the stash root directory.
+
+When saving to file, a `key` field must be present on the dataclass, otherwise an explicit `key` must be passed:
+
+```python
+stash.save(obj, key="custom-key")
+```
+
Load from file:
```python