dbzero-modelkit 0.1.2__tar.gz → 1.0.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.
- dbzero_modelkit-1.0.0/PKG-INFO +79 -0
- dbzero_modelkit-1.0.0/README.md +58 -0
- dbzero_modelkit-1.0.0/dbzero_modelkit.egg-info/PKG-INFO +79 -0
- {dbzero_modelkit-0.1.2 → dbzero_modelkit-1.0.0}/pyproject.toml +1 -1
- dbzero_modelkit-0.1.2/PKG-INFO +0 -43
- dbzero_modelkit-0.1.2/README.md +0 -22
- dbzero_modelkit-0.1.2/dbzero_modelkit.egg-info/PKG-INFO +0 -43
- {dbzero_modelkit-0.1.2 → dbzero_modelkit-1.0.0}/dbzero_modelkit/__init__.py +0 -0
- {dbzero_modelkit-0.1.2 → dbzero_modelkit-1.0.0}/dbzero_modelkit/active.py +0 -0
- {dbzero_modelkit-0.1.2 → dbzero_modelkit-1.0.0}/dbzero_modelkit/calendars.py +0 -0
- {dbzero_modelkit-0.1.2 → dbzero_modelkit-1.0.0}/dbzero_modelkit/language.py +0 -0
- {dbzero_modelkit-0.1.2 → dbzero_modelkit-1.0.0}/dbzero_modelkit/month_store.py +0 -0
- {dbzero_modelkit-0.1.2 → dbzero_modelkit-1.0.0}/dbzero_modelkit/object_lock.py +0 -0
- {dbzero_modelkit-0.1.2 → dbzero_modelkit-1.0.0}/dbzero_modelkit/queues.py +0 -0
- {dbzero_modelkit-0.1.2 → dbzero_modelkit-1.0.0}/dbzero_modelkit/rpc_integration.py +0 -0
- {dbzero_modelkit-0.1.2 → dbzero_modelkit-1.0.0}/dbzero_modelkit/time_utils.py +0 -0
- {dbzero_modelkit-0.1.2 → dbzero_modelkit-1.0.0}/dbzero_modelkit.egg-info/SOURCES.txt +0 -0
- {dbzero_modelkit-0.1.2 → dbzero_modelkit-1.0.0}/dbzero_modelkit.egg-info/dependency_links.txt +0 -0
- {dbzero_modelkit-0.1.2 → dbzero_modelkit-1.0.0}/dbzero_modelkit.egg-info/requires.txt +0 -0
- {dbzero_modelkit-0.1.2 → dbzero_modelkit-1.0.0}/dbzero_modelkit.egg-info/top_level.txt +0 -0
- {dbzero_modelkit-0.1.2 → dbzero_modelkit-1.0.0}/setup.cfg +0 -0
- {dbzero_modelkit-0.1.2 → dbzero_modelkit-1.0.0}/tests/test_active.py +0 -0
- {dbzero_modelkit-0.1.2 → dbzero_modelkit-1.0.0}/tests/test_calendars.py +0 -0
- {dbzero_modelkit-0.1.2 → dbzero_modelkit-1.0.0}/tests/test_language.py +0 -0
- {dbzero_modelkit-0.1.2 → dbzero_modelkit-1.0.0}/tests/test_month_store.py +0 -0
- {dbzero_modelkit-0.1.2 → dbzero_modelkit-1.0.0}/tests/test_object_lock.py +0 -0
- {dbzero_modelkit-0.1.2 → dbzero_modelkit-1.0.0}/tests/test_queues.py +0 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dbzero-modelkit
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Reusable dbzero-backed data model utilities
|
|
5
|
+
Author-email: Selltime <dev@selltime.ai>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/selltime/dbzero-modelkit
|
|
8
|
+
Project-URL: Repository, https://github.com/selltime/dbzero-modelkit
|
|
9
|
+
Classifier: Development Status :: 3 - Alpha
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Requires-Python: >=3.11
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
Requires-Dist: dbzero<0.4,>=0.3.0
|
|
17
|
+
Provides-Extra: dev
|
|
18
|
+
Requires-Dist: build>=1.0.0; extra == "dev"
|
|
19
|
+
Requires-Dist: pylint>=3.0; extra == "dev"
|
|
20
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
21
|
+
|
|
22
|
+
# dbzero-modelkit
|
|
23
|
+
|
|
24
|
+
Reusable model primitives for projects that store Python objects with
|
|
25
|
+
[dbzero](https://docs.dbzero.io/).
|
|
26
|
+
|
|
27
|
+
`dbzero-modelkit` provides small, focused building blocks for common model patterns:
|
|
28
|
+
sparse calendars, active-date windows, month-indexed storage, multilingual strings,
|
|
29
|
+
FIFO queues, and tag-based object locks. The package is application-neutral and is
|
|
30
|
+
intended to be imported by any Python project using dbzero.
|
|
31
|
+
|
|
32
|
+
## Installation
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pip install dbzero-modelkit
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Requirements:
|
|
39
|
+
|
|
40
|
+
- Python 3.9 or newer
|
|
41
|
+
- dbzero>=0.3.0
|
|
42
|
+
|
|
43
|
+
## Included Models
|
|
44
|
+
|
|
45
|
+
- `ActiveBase` and `ActiveIndex` for objects that are active only within a date or datetime range.
|
|
46
|
+
- `Calendar`, `MonthCalendar`, `get_month_index`, and `get_date_from_month_index` for sparse date-based values.
|
|
47
|
+
- `LanguageCode` and `ML_String` for primary text values with optional translations.
|
|
48
|
+
- `FiFoQueue` and `FQ_Item` for dbzero-backed FIFO queues.
|
|
49
|
+
- `MonthStore` for one-object-per-month storage with lazy item creation.
|
|
50
|
+
- `ObjectLock` for temporary tag-based locking of dbzero objects.
|
|
51
|
+
|
|
52
|
+
## Quick Start
|
|
53
|
+
|
|
54
|
+
Initialize dbzero before creating or loading dbzero-backed model objects:
|
|
55
|
+
|
|
56
|
+
```python
|
|
57
|
+
from datetime import date
|
|
58
|
+
|
|
59
|
+
import dbzero as db0
|
|
60
|
+
|
|
61
|
+
from dbzero_modelkit import Calendar, FiFoQueue
|
|
62
|
+
|
|
63
|
+
db0.init("./db0_data", read_write=True)
|
|
64
|
+
db0.open("main", "rw")
|
|
65
|
+
|
|
66
|
+
calendar = Calendar(base_year=2026)
|
|
67
|
+
calendar.set(date(2026, 1, 1), "available")
|
|
68
|
+
|
|
69
|
+
queue = FiFoQueue()
|
|
70
|
+
queue.push_back(kind="email", recipient="user@example.test")
|
|
71
|
+
|
|
72
|
+
assert calendar.get(date(2026, 1, 1)) == "available"
|
|
73
|
+
assert queue.pop_front(1) == [
|
|
74
|
+
{"kind": "email", "recipient": "user@example.test"},
|
|
75
|
+
]
|
|
76
|
+
|
|
77
|
+
db0.close()
|
|
78
|
+
```
|
|
79
|
+
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# dbzero-modelkit
|
|
2
|
+
|
|
3
|
+
Reusable model primitives for projects that store Python objects with
|
|
4
|
+
[dbzero](https://docs.dbzero.io/).
|
|
5
|
+
|
|
6
|
+
`dbzero-modelkit` provides small, focused building blocks for common model patterns:
|
|
7
|
+
sparse calendars, active-date windows, month-indexed storage, multilingual strings,
|
|
8
|
+
FIFO queues, and tag-based object locks. The package is application-neutral and is
|
|
9
|
+
intended to be imported by any Python project using dbzero.
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pip install dbzero-modelkit
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Requirements:
|
|
18
|
+
|
|
19
|
+
- Python 3.9 or newer
|
|
20
|
+
- dbzero>=0.3.0
|
|
21
|
+
|
|
22
|
+
## Included Models
|
|
23
|
+
|
|
24
|
+
- `ActiveBase` and `ActiveIndex` for objects that are active only within a date or datetime range.
|
|
25
|
+
- `Calendar`, `MonthCalendar`, `get_month_index`, and `get_date_from_month_index` for sparse date-based values.
|
|
26
|
+
- `LanguageCode` and `ML_String` for primary text values with optional translations.
|
|
27
|
+
- `FiFoQueue` and `FQ_Item` for dbzero-backed FIFO queues.
|
|
28
|
+
- `MonthStore` for one-object-per-month storage with lazy item creation.
|
|
29
|
+
- `ObjectLock` for temporary tag-based locking of dbzero objects.
|
|
30
|
+
|
|
31
|
+
## Quick Start
|
|
32
|
+
|
|
33
|
+
Initialize dbzero before creating or loading dbzero-backed model objects:
|
|
34
|
+
|
|
35
|
+
```python
|
|
36
|
+
from datetime import date
|
|
37
|
+
|
|
38
|
+
import dbzero as db0
|
|
39
|
+
|
|
40
|
+
from dbzero_modelkit import Calendar, FiFoQueue
|
|
41
|
+
|
|
42
|
+
db0.init("./db0_data", read_write=True)
|
|
43
|
+
db0.open("main", "rw")
|
|
44
|
+
|
|
45
|
+
calendar = Calendar(base_year=2026)
|
|
46
|
+
calendar.set(date(2026, 1, 1), "available")
|
|
47
|
+
|
|
48
|
+
queue = FiFoQueue()
|
|
49
|
+
queue.push_back(kind="email", recipient="user@example.test")
|
|
50
|
+
|
|
51
|
+
assert calendar.get(date(2026, 1, 1)) == "available"
|
|
52
|
+
assert queue.pop_front(1) == [
|
|
53
|
+
{"kind": "email", "recipient": "user@example.test"},
|
|
54
|
+
]
|
|
55
|
+
|
|
56
|
+
db0.close()
|
|
57
|
+
```
|
|
58
|
+
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dbzero-modelkit
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Reusable dbzero-backed data model utilities
|
|
5
|
+
Author-email: Selltime <dev@selltime.ai>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/selltime/dbzero-modelkit
|
|
8
|
+
Project-URL: Repository, https://github.com/selltime/dbzero-modelkit
|
|
9
|
+
Classifier: Development Status :: 3 - Alpha
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Requires-Python: >=3.11
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
Requires-Dist: dbzero<0.4,>=0.3.0
|
|
17
|
+
Provides-Extra: dev
|
|
18
|
+
Requires-Dist: build>=1.0.0; extra == "dev"
|
|
19
|
+
Requires-Dist: pylint>=3.0; extra == "dev"
|
|
20
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
21
|
+
|
|
22
|
+
# dbzero-modelkit
|
|
23
|
+
|
|
24
|
+
Reusable model primitives for projects that store Python objects with
|
|
25
|
+
[dbzero](https://docs.dbzero.io/).
|
|
26
|
+
|
|
27
|
+
`dbzero-modelkit` provides small, focused building blocks for common model patterns:
|
|
28
|
+
sparse calendars, active-date windows, month-indexed storage, multilingual strings,
|
|
29
|
+
FIFO queues, and tag-based object locks. The package is application-neutral and is
|
|
30
|
+
intended to be imported by any Python project using dbzero.
|
|
31
|
+
|
|
32
|
+
## Installation
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pip install dbzero-modelkit
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Requirements:
|
|
39
|
+
|
|
40
|
+
- Python 3.9 or newer
|
|
41
|
+
- dbzero>=0.3.0
|
|
42
|
+
|
|
43
|
+
## Included Models
|
|
44
|
+
|
|
45
|
+
- `ActiveBase` and `ActiveIndex` for objects that are active only within a date or datetime range.
|
|
46
|
+
- `Calendar`, `MonthCalendar`, `get_month_index`, and `get_date_from_month_index` for sparse date-based values.
|
|
47
|
+
- `LanguageCode` and `ML_String` for primary text values with optional translations.
|
|
48
|
+
- `FiFoQueue` and `FQ_Item` for dbzero-backed FIFO queues.
|
|
49
|
+
- `MonthStore` for one-object-per-month storage with lazy item creation.
|
|
50
|
+
- `ObjectLock` for temporary tag-based locking of dbzero objects.
|
|
51
|
+
|
|
52
|
+
## Quick Start
|
|
53
|
+
|
|
54
|
+
Initialize dbzero before creating or loading dbzero-backed model objects:
|
|
55
|
+
|
|
56
|
+
```python
|
|
57
|
+
from datetime import date
|
|
58
|
+
|
|
59
|
+
import dbzero as db0
|
|
60
|
+
|
|
61
|
+
from dbzero_modelkit import Calendar, FiFoQueue
|
|
62
|
+
|
|
63
|
+
db0.init("./db0_data", read_write=True)
|
|
64
|
+
db0.open("main", "rw")
|
|
65
|
+
|
|
66
|
+
calendar = Calendar(base_year=2026)
|
|
67
|
+
calendar.set(date(2026, 1, 1), "available")
|
|
68
|
+
|
|
69
|
+
queue = FiFoQueue()
|
|
70
|
+
queue.push_back(kind="email", recipient="user@example.test")
|
|
71
|
+
|
|
72
|
+
assert calendar.get(date(2026, 1, 1)) == "available"
|
|
73
|
+
assert queue.pop_front(1) == [
|
|
74
|
+
{"kind": "email", "recipient": "user@example.test"},
|
|
75
|
+
]
|
|
76
|
+
|
|
77
|
+
db0.close()
|
|
78
|
+
```
|
|
79
|
+
|
dbzero_modelkit-0.1.2/PKG-INFO
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: dbzero-modelkit
|
|
3
|
-
Version: 0.1.2
|
|
4
|
-
Summary: Reusable dbzero-backed data model utilities
|
|
5
|
-
Author-email: Selltime <dev@selltime.ai>
|
|
6
|
-
License-Expression: MIT
|
|
7
|
-
Project-URL: Homepage, https://github.com/selltime/dbzero-modelkit
|
|
8
|
-
Project-URL: Repository, https://github.com/selltime/dbzero-modelkit
|
|
9
|
-
Classifier: Development Status :: 3 - Alpha
|
|
10
|
-
Classifier: Intended Audience :: Developers
|
|
11
|
-
Classifier: Programming Language :: Python :: 3
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
-
Requires-Python: >=3.11
|
|
15
|
-
Description-Content-Type: text/markdown
|
|
16
|
-
Requires-Dist: dbzero<0.4,>=0.3.0
|
|
17
|
-
Provides-Extra: dev
|
|
18
|
-
Requires-Dist: build>=1.0.0; extra == "dev"
|
|
19
|
-
Requires-Dist: pylint>=3.0; extra == "dev"
|
|
20
|
-
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
21
|
-
|
|
22
|
-
# dbzero-modelkit
|
|
23
|
-
|
|
24
|
-
Reusable dbzero-backed model utilities copied from Selltime workspace projects.
|
|
25
|
-
|
|
26
|
-
This package currently contains standalone copies of common data-model helpers only. It does not yet replace implementations in `selltime`, `statek`, or `kangal`; integration into those projects is planned as separate follow-up work.
|
|
27
|
-
|
|
28
|
-
## Included Models
|
|
29
|
-
|
|
30
|
-
- `ActiveBase` and `ActiveIndex` for active-window objects.
|
|
31
|
-
- `Calendar`, `MonthCalendar`, `get_month_index`, and `get_date_from_month_index` for sparse date calendars.
|
|
32
|
-
- `LanguageCode` and `ML_String` for multilingual strings.
|
|
33
|
-
- `FiFoQueue` and `FQ_Item` for dbzero-backed FIFO queues.
|
|
34
|
-
- `MonthStore` for sparse month-indexed object storage.
|
|
35
|
-
- `ObjectLock` for tag-based object locking.
|
|
36
|
-
|
|
37
|
-
## Testing
|
|
38
|
-
|
|
39
|
-
Run tests from this directory:
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
python3 -m pytest -q
|
|
43
|
-
```
|
dbzero_modelkit-0.1.2/README.md
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# dbzero-modelkit
|
|
2
|
-
|
|
3
|
-
Reusable dbzero-backed model utilities copied from Selltime workspace projects.
|
|
4
|
-
|
|
5
|
-
This package currently contains standalone copies of common data-model helpers only. It does not yet replace implementations in `selltime`, `statek`, or `kangal`; integration into those projects is planned as separate follow-up work.
|
|
6
|
-
|
|
7
|
-
## Included Models
|
|
8
|
-
|
|
9
|
-
- `ActiveBase` and `ActiveIndex` for active-window objects.
|
|
10
|
-
- `Calendar`, `MonthCalendar`, `get_month_index`, and `get_date_from_month_index` for sparse date calendars.
|
|
11
|
-
- `LanguageCode` and `ML_String` for multilingual strings.
|
|
12
|
-
- `FiFoQueue` and `FQ_Item` for dbzero-backed FIFO queues.
|
|
13
|
-
- `MonthStore` for sparse month-indexed object storage.
|
|
14
|
-
- `ObjectLock` for tag-based object locking.
|
|
15
|
-
|
|
16
|
-
## Testing
|
|
17
|
-
|
|
18
|
-
Run tests from this directory:
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
python3 -m pytest -q
|
|
22
|
-
```
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: dbzero-modelkit
|
|
3
|
-
Version: 0.1.2
|
|
4
|
-
Summary: Reusable dbzero-backed data model utilities
|
|
5
|
-
Author-email: Selltime <dev@selltime.ai>
|
|
6
|
-
License-Expression: MIT
|
|
7
|
-
Project-URL: Homepage, https://github.com/selltime/dbzero-modelkit
|
|
8
|
-
Project-URL: Repository, https://github.com/selltime/dbzero-modelkit
|
|
9
|
-
Classifier: Development Status :: 3 - Alpha
|
|
10
|
-
Classifier: Intended Audience :: Developers
|
|
11
|
-
Classifier: Programming Language :: Python :: 3
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
-
Requires-Python: >=3.11
|
|
15
|
-
Description-Content-Type: text/markdown
|
|
16
|
-
Requires-Dist: dbzero<0.4,>=0.3.0
|
|
17
|
-
Provides-Extra: dev
|
|
18
|
-
Requires-Dist: build>=1.0.0; extra == "dev"
|
|
19
|
-
Requires-Dist: pylint>=3.0; extra == "dev"
|
|
20
|
-
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
21
|
-
|
|
22
|
-
# dbzero-modelkit
|
|
23
|
-
|
|
24
|
-
Reusable dbzero-backed model utilities copied from Selltime workspace projects.
|
|
25
|
-
|
|
26
|
-
This package currently contains standalone copies of common data-model helpers only. It does not yet replace implementations in `selltime`, `statek`, or `kangal`; integration into those projects is planned as separate follow-up work.
|
|
27
|
-
|
|
28
|
-
## Included Models
|
|
29
|
-
|
|
30
|
-
- `ActiveBase` and `ActiveIndex` for active-window objects.
|
|
31
|
-
- `Calendar`, `MonthCalendar`, `get_month_index`, and `get_date_from_month_index` for sparse date calendars.
|
|
32
|
-
- `LanguageCode` and `ML_String` for multilingual strings.
|
|
33
|
-
- `FiFoQueue` and `FQ_Item` for dbzero-backed FIFO queues.
|
|
34
|
-
- `MonthStore` for sparse month-indexed object storage.
|
|
35
|
-
- `ObjectLock` for tag-based object locking.
|
|
36
|
-
|
|
37
|
-
## Testing
|
|
38
|
-
|
|
39
|
-
Run tests from this directory:
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
python3 -m pytest -q
|
|
43
|
-
```
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dbzero_modelkit-0.1.2 → dbzero_modelkit-1.0.0}/dbzero_modelkit.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|