scruby 0.1.0__py3-none-any.whl → 0.1.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of scruby might be problematic. Click here for more details.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: scruby
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: A fast key-value storage library.
|
|
5
5
|
Project-URL: Homepage, https://github.com/kebasyaty/scruby
|
|
6
6
|
Project-URL: Repository, https://github.com/kebasyaty/scruby
|
|
@@ -62,11 +62,11 @@ Description-Content-Type: text/markdown
|
|
|
62
62
|
<a href="https://github.com/kebasyaty/scruby/releases/" alt="GitHub release"><img src="https://img.shields.io/github/release/kebasyaty/scruby" alt="GitHub release"></a>
|
|
63
63
|
</p>
|
|
64
64
|
<p align="center">
|
|
65
|
-
|
|
65
|
+
Scruby is a fast key-value storage library that provides an ordered mapping from string keys to string values.
|
|
66
66
|
<br>
|
|
67
67
|
The library uses fractal-tree addressing.
|
|
68
68
|
<br>
|
|
69
|
-
The maximum size of the database is 16
|
|
69
|
+
The maximum size of the database is 16**32=340282366920938463463374607431768211456 branches,
|
|
70
70
|
each branch can store one or more keys.
|
|
71
71
|
<br>
|
|
72
72
|
The value of any key can be obtained in 32 steps, thereby achieving high performance.
|
|
@@ -76,15 +76,6 @@ Description-Content-Type: text/markdown
|
|
|
76
76
|
</p>
|
|
77
77
|
</div>
|
|
78
78
|
|
|
79
|
-
##
|
|
80
|
-
|
|
81
|
-
<p>
|
|
82
|
-
<a href="https://github.com/kebasyaty/scruby" alt="Project Status">
|
|
83
|
-
<img src="https://raw.githubusercontent.com/kebasyaty/scruby/v0/assets/project_status/project-status-pre-alpha.svg"
|
|
84
|
-
alt="Project Status">
|
|
85
|
-
</a>
|
|
86
|
-
</p>
|
|
87
|
-
|
|
88
79
|
## Documentation
|
|
89
80
|
|
|
90
81
|
Online browsable documentation is available at [https://kebasyaty.github.io/scruby/](https://kebasyaty.github.io/scruby/ "Documentation").
|
|
@@ -101,10 +92,29 @@ uv add scruby
|
|
|
101
92
|
|
|
102
93
|
## Usage
|
|
103
94
|
|
|
104
|
-
[It is recommended to look at examples here](https://github.com/kebasyaty/scruby/tree/main/examples "Examples").
|
|
105
|
-
|
|
106
95
|
```python
|
|
107
|
-
import
|
|
96
|
+
import anyio
|
|
97
|
+
from scruby import Scruby
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
async def main() -> None:
|
|
101
|
+
"""Example."""
|
|
102
|
+
|
|
103
|
+
db = Scruby()
|
|
104
|
+
await db.set_key("key name", "Some text")
|
|
105
|
+
await db.get_key("key name") # => "Some text"
|
|
106
|
+
await db.get_key("key missing") # => KeyError
|
|
107
|
+
await db.has_key("key name") # => True
|
|
108
|
+
await db.has_key("key missing") # => False
|
|
109
|
+
await db.delete_key("key name")
|
|
110
|
+
await db.delete_key("key missing") # => KeyError
|
|
111
|
+
# Full database deletion.
|
|
112
|
+
await db.napalm()
|
|
113
|
+
await db.napalm() # => FileNotFoundError
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
if __name__ == "__main__":
|
|
117
|
+
anyio.run(main)
|
|
108
118
|
```
|
|
109
119
|
|
|
110
120
|
## Changelog
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
scruby/__init__.py,sha256=5_WsWLxxGQ8LYi0XrZc7S5P3HmaP1wfvb9VUdrVxvmM,6694
|
|
2
|
+
scruby/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
scruby-0.1.2.dist-info/METADATA,sha256=eBxfCwrZ2OrBN4M2npu95MV0K8JSmzbMvgUhz1z2vI0,5906
|
|
4
|
+
scruby-0.1.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
5
|
+
scruby-0.1.2.dist-info/licenses/LICENSE,sha256=2zZINd6m_jNYlowdQImlEizyhSui5cBAJZRhWQURcEc,1095
|
|
6
|
+
scruby-0.1.2.dist-info/RECORD,,
|
scruby-0.1.0.dist-info/RECORD
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
scruby/__init__.py,sha256=5_WsWLxxGQ8LYi0XrZc7S5P3HmaP1wfvb9VUdrVxvmM,6694
|
|
2
|
-
scruby/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
scruby-0.1.0.dist-info/METADATA,sha256=e0KkEerqyZngnSbMbXpV4BYcdz7gpye_m3alBOmIq4E,5694
|
|
4
|
-
scruby-0.1.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
5
|
-
scruby-0.1.0.dist-info/licenses/LICENSE,sha256=2zZINd6m_jNYlowdQImlEizyhSui5cBAJZRhWQURcEc,1095
|
|
6
|
-
scruby-0.1.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|