droplet-db 0.1.0__tar.gz
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.
- droplet_db-0.1.0/LICENSE +21 -0
- droplet_db-0.1.0/PKG-INFO +75 -0
- droplet_db-0.1.0/README.md +58 -0
- droplet_db-0.1.0/pyproject.toml +33 -0
- droplet_db-0.1.0/setup.cfg +4 -0
- droplet_db-0.1.0/src/droplet/__init__.py +1 -0
- droplet_db-0.1.0/src/droplet/database.py +855 -0
- droplet_db-0.1.0/src/droplet/exporter.py +57 -0
- droplet_db-0.1.0/src/droplet/serializer.py +233 -0
- droplet_db-0.1.0/src/droplet/types.py +27 -0
- droplet_db-0.1.0/src/droplet_db.egg-info/PKG-INFO +75 -0
- droplet_db-0.1.0/src/droplet_db.egg-info/SOURCES.txt +19 -0
- droplet_db-0.1.0/src/droplet_db.egg-info/dependency_links.txt +1 -0
- droplet_db-0.1.0/src/droplet_db.egg-info/top_level.txt +1 -0
- droplet_db-0.1.0/tests/test_data.py +122 -0
- droplet_db-0.1.0/tests/test_delete.py +345 -0
- droplet_db-0.1.0/tests/test_get.py +211 -0
- droplet_db-0.1.0/tests/test_init_database.py +69 -0
- droplet_db-0.1.0/tests/test_serializer.py +40 -0
- droplet_db-0.1.0/tests/test_set.py +432 -0
- droplet_db-0.1.0/tests/test_utilities.py +356 -0
droplet_db-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Veron
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: droplet-db
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A lightweight, file-backed key-value database for Python
|
|
5
|
+
Author: Veron Goggans
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Repository, https://github.com/VeronGoggans/Droplet
|
|
8
|
+
Project-URL: Issues, https://github.com/VeronGoggans/Droplet/issues
|
|
9
|
+
Keywords: database,key-value,embedded,storage,binary
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Classifier: Topic :: Database
|
|
13
|
+
Requires-Python: >=3.10
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
License-File: LICENSE
|
|
16
|
+
Dynamic: license-file
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+

|
|
20
|
+
# Droplet
|
|
21
|
+
|
|
22
|
+
**Small. Simple. Persistent.**
|
|
23
|
+
|
|
24
|
+
Droplet is a lightweight, file-backed key-value database for Python, designed to provide simple, persistent data storage without the complexity of a traditional database.
|
|
25
|
+
|
|
26
|
+
Droplet stores your data locally in a single file and provides a small, straightforward API.
|
|
27
|
+
|
|
28
|
+
## Features
|
|
29
|
+
|
|
30
|
+
* 🔑 Key-value storage
|
|
31
|
+
* 💾 Persistent file-based storage
|
|
32
|
+
* 🐍 Built for Python
|
|
33
|
+
* 📦 Support for common Python types
|
|
34
|
+
* 🔄 CRUD operations
|
|
35
|
+
* 📝 Export data to JSON
|
|
36
|
+
|
|
37
|
+
## Example
|
|
38
|
+
|
|
39
|
+
```python
|
|
40
|
+
from droplet import Droplet
|
|
41
|
+
|
|
42
|
+
db = Droplet()
|
|
43
|
+
|
|
44
|
+
db.open()
|
|
45
|
+
|
|
46
|
+
db.set("name", "Droplet")
|
|
47
|
+
db.set("type", "key/value")
|
|
48
|
+
|
|
49
|
+
print(db.get("name"))
|
|
50
|
+
print(db.get("type"))
|
|
51
|
+
|
|
52
|
+
db.close()
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Vision
|
|
56
|
+
|
|
57
|
+
Droplet is intended to stay **small, simple, and useful**.
|
|
58
|
+
|
|
59
|
+
Droplet aims to be a lightweight database for Python projects that need persistent local storage without wanting to introduce a full database server or a complicated database layer.
|
|
60
|
+
|
|
61
|
+
**Planned features include:**
|
|
62
|
+
|
|
63
|
+
* Transactions
|
|
64
|
+
* Import from JSON support
|
|
65
|
+
* TTL / expiring values
|
|
66
|
+
|
|
67
|
+
## Status
|
|
68
|
+
|
|
69
|
+
Droplet is currently an **early-stage project under active development**. The API and file format may change as the project evolves.
|
|
70
|
+
|
|
71
|
+
More documentation and examples will be added as the project matures.
|
|
72
|
+
|
|
73
|
+
## License
|
|
74
|
+
|
|
75
|
+
MIT
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
|
|
2
|
+

|
|
3
|
+
# Droplet
|
|
4
|
+
|
|
5
|
+
**Small. Simple. Persistent.**
|
|
6
|
+
|
|
7
|
+
Droplet is a lightweight, file-backed key-value database for Python, designed to provide simple, persistent data storage without the complexity of a traditional database.
|
|
8
|
+
|
|
9
|
+
Droplet stores your data locally in a single file and provides a small, straightforward API.
|
|
10
|
+
|
|
11
|
+
## Features
|
|
12
|
+
|
|
13
|
+
* 🔑 Key-value storage
|
|
14
|
+
* 💾 Persistent file-based storage
|
|
15
|
+
* 🐍 Built for Python
|
|
16
|
+
* 📦 Support for common Python types
|
|
17
|
+
* 🔄 CRUD operations
|
|
18
|
+
* 📝 Export data to JSON
|
|
19
|
+
|
|
20
|
+
## Example
|
|
21
|
+
|
|
22
|
+
```python
|
|
23
|
+
from droplet import Droplet
|
|
24
|
+
|
|
25
|
+
db = Droplet()
|
|
26
|
+
|
|
27
|
+
db.open()
|
|
28
|
+
|
|
29
|
+
db.set("name", "Droplet")
|
|
30
|
+
db.set("type", "key/value")
|
|
31
|
+
|
|
32
|
+
print(db.get("name"))
|
|
33
|
+
print(db.get("type"))
|
|
34
|
+
|
|
35
|
+
db.close()
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Vision
|
|
39
|
+
|
|
40
|
+
Droplet is intended to stay **small, simple, and useful**.
|
|
41
|
+
|
|
42
|
+
Droplet aims to be a lightweight database for Python projects that need persistent local storage without wanting to introduce a full database server or a complicated database layer.
|
|
43
|
+
|
|
44
|
+
**Planned features include:**
|
|
45
|
+
|
|
46
|
+
* Transactions
|
|
47
|
+
* Import from JSON support
|
|
48
|
+
* TTL / expiring values
|
|
49
|
+
|
|
50
|
+
## Status
|
|
51
|
+
|
|
52
|
+
Droplet is currently an **early-stage project under active development**. The API and file format may change as the project evolves.
|
|
53
|
+
|
|
54
|
+
More documentation and examples will be added as the project matures.
|
|
55
|
+
|
|
56
|
+
## License
|
|
57
|
+
|
|
58
|
+
MIT
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[tool.setuptools.packages.find]
|
|
6
|
+
where = ["src"]
|
|
7
|
+
|
|
8
|
+
[project]
|
|
9
|
+
name = "droplet-db"
|
|
10
|
+
version = "0.1.0"
|
|
11
|
+
description = "A lightweight, file-backed key-value database for Python"
|
|
12
|
+
readme = "README.md"
|
|
13
|
+
requires-python = ">=3.10"
|
|
14
|
+
license = "MIT"
|
|
15
|
+
authors = [
|
|
16
|
+
{ name = "Veron Goggans" }
|
|
17
|
+
]
|
|
18
|
+
keywords = [
|
|
19
|
+
"database",
|
|
20
|
+
"key-value",
|
|
21
|
+
"embedded",
|
|
22
|
+
"storage",
|
|
23
|
+
"binary"
|
|
24
|
+
]
|
|
25
|
+
classifiers = [
|
|
26
|
+
"Programming Language :: Python :: 3",
|
|
27
|
+
"Operating System :: OS Independent",
|
|
28
|
+
"Topic :: Database"
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
[project.urls]
|
|
32
|
+
Repository = "https://github.com/VeronGoggans/Droplet"
|
|
33
|
+
Issues = "https://github.com/VeronGoggans/Droplet/issues"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from .database import Droplet
|