simplebroker-redis 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.
- simplebroker_redis-0.1.0/.gitignore +94 -0
- simplebroker_redis-0.1.0/LICENSE +21 -0
- simplebroker_redis-0.1.0/PKG-INFO +45 -0
- simplebroker_redis-0.1.0/README.md +31 -0
- simplebroker_redis-0.1.0/pyproject.toml +43 -0
- simplebroker_redis-0.1.0/simplebroker_redis/__init__.py +6 -0
- simplebroker_redis-0.1.0/simplebroker_redis/_constants.py +6 -0
- simplebroker_redis-0.1.0/simplebroker_redis/core.py +1067 -0
- simplebroker_redis-0.1.0/simplebroker_redis/keys.py +82 -0
- simplebroker_redis-0.1.0/simplebroker_redis/plugin.py +536 -0
- simplebroker_redis-0.1.0/simplebroker_redis/pool.py +57 -0
- simplebroker_redis-0.1.0/simplebroker_redis/py.typed +1 -0
- simplebroker_redis-0.1.0/simplebroker_redis/runner.py +114 -0
- simplebroker_redis-0.1.0/simplebroker_redis/scripts.py +214 -0
- simplebroker_redis-0.1.0/simplebroker_redis/validation.py +153 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Accidental database files created by str(BrokerCore) coercion
|
|
2
|
+
<simplebroker.*>
|
|
3
|
+
.broker.*
|
|
4
|
+
# Python
|
|
5
|
+
__pycache__/
|
|
6
|
+
*.py[cod]
|
|
7
|
+
*$py.class
|
|
8
|
+
*.so
|
|
9
|
+
.Python
|
|
10
|
+
.code
|
|
11
|
+
.codex
|
|
12
|
+
docs/
|
|
13
|
+
extensions/simplebroker_redis/
|
|
14
|
+
bin/pytest-redis
|
|
15
|
+
build/
|
|
16
|
+
develop-eggs/
|
|
17
|
+
dist/
|
|
18
|
+
downloads/
|
|
19
|
+
eggs/
|
|
20
|
+
.eggs/
|
|
21
|
+
lib/
|
|
22
|
+
lib64/
|
|
23
|
+
parts/
|
|
24
|
+
sdist/
|
|
25
|
+
var/
|
|
26
|
+
wheels/
|
|
27
|
+
*.egg-info/
|
|
28
|
+
.installed.cfg
|
|
29
|
+
*.egg
|
|
30
|
+
MANIFEST
|
|
31
|
+
|
|
32
|
+
# Virtual environments
|
|
33
|
+
venv/
|
|
34
|
+
ENV/
|
|
35
|
+
env/
|
|
36
|
+
.venv
|
|
37
|
+
|
|
38
|
+
# IDEs
|
|
39
|
+
.vscode/
|
|
40
|
+
.idea/
|
|
41
|
+
*.swp
|
|
42
|
+
*.swo
|
|
43
|
+
*~
|
|
44
|
+
|
|
45
|
+
# Testing
|
|
46
|
+
.coverage
|
|
47
|
+
.coverage.*
|
|
48
|
+
coverage.xml
|
|
49
|
+
.pytest_cache/
|
|
50
|
+
htmlcov/
|
|
51
|
+
.tox/
|
|
52
|
+
.nox/
|
|
53
|
+
.mypy_cache/
|
|
54
|
+
.dmypy.json
|
|
55
|
+
dmypy.json
|
|
56
|
+
.ruff_cache/
|
|
57
|
+
.ruff/
|
|
58
|
+
.pytest_cache/
|
|
59
|
+
|
|
60
|
+
# SimpleBroker specific
|
|
61
|
+
*.db
|
|
62
|
+
*.db-shm
|
|
63
|
+
*.db-wal
|
|
64
|
+
.broker.db*
|
|
65
|
+
test.db
|
|
66
|
+
benchmark_pragma.py
|
|
67
|
+
|
|
68
|
+
# OS
|
|
69
|
+
.DS_Store
|
|
70
|
+
Thumbs.db
|
|
71
|
+
|
|
72
|
+
# Temporary files
|
|
73
|
+
*.tmp
|
|
74
|
+
*.bak
|
|
75
|
+
*.log
|
|
76
|
+
|
|
77
|
+
# Multi-agent
|
|
78
|
+
.claude/*
|
|
79
|
+
!.claude/
|
|
80
|
+
!.claude/skills/
|
|
81
|
+
!.claude/skills/**
|
|
82
|
+
!.agents/
|
|
83
|
+
!.agents/skills/
|
|
84
|
+
!.agents/skills/**
|
|
85
|
+
.mcp.json
|
|
86
|
+
agent_history/
|
|
87
|
+
.broker.db
|
|
88
|
+
.broker.db-shm
|
|
89
|
+
.broker.db-wal
|
|
90
|
+
weft/
|
|
91
|
+
.aider*
|
|
92
|
+
.codex*
|
|
93
|
+
.code*
|
|
94
|
+
.coder*
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Van Lindberg
|
|
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,45 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: simplebroker-redis
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Valkey/Redis backend extension for SimpleBroker
|
|
5
|
+
Author-email: Van Lindberg <van.lindberg@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Requires-Python: >=3.10
|
|
9
|
+
Requires-Dist: redis<7,>=5
|
|
10
|
+
Requires-Dist: simplebroker<4,>=3.5.0
|
|
11
|
+
Provides-Extra: dev
|
|
12
|
+
Requires-Dist: pytest>=7.0; extra == 'dev'
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
|
|
15
|
+
# simplebroker-redis
|
|
16
|
+
|
|
17
|
+
Valkey/Redis backend extension for SimpleBroker.
|
|
18
|
+
|
|
19
|
+
This package exposes the public SimpleBroker backend name `redis`. It targets
|
|
20
|
+
Valkey 7.x and Redis 7.x and the test suite runs against Valkey.
|
|
21
|
+
|
|
22
|
+
Durability depends on the server configuration. A Valkey or Redis deployment
|
|
23
|
+
without AOF/RDB persistence can lose messages on restart. Use SQLite or
|
|
24
|
+
Postgres when you need storage durability from the broker stack by default.
|
|
25
|
+
|
|
26
|
+
Regular broker commands use a redis-py `BlockingConnectionPool` owned by the
|
|
27
|
+
process-local Redis runner. Pub/Sub wake hints use a separate dedicated
|
|
28
|
+
connection because subscribed Redis connections cannot serve normal commands.
|
|
29
|
+
|
|
30
|
+
Pool defaults:
|
|
31
|
+
|
|
32
|
+
- `max_connections = 50`
|
|
33
|
+
- `pool_timeout = BROKER_BUSY_TIMEOUT / 1000`
|
|
34
|
+
|
|
35
|
+
The defaults can be overridden in project backend options:
|
|
36
|
+
|
|
37
|
+
```toml
|
|
38
|
+
[backend_options]
|
|
39
|
+
namespace = "simplebroker_redis_v1"
|
|
40
|
+
max_connections = 50
|
|
41
|
+
pool_timeout = 5.0
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Pool exhaustion is bounded by `pool_timeout` and surfaces as an operational
|
|
45
|
+
error from broker operations.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# simplebroker-redis
|
|
2
|
+
|
|
3
|
+
Valkey/Redis backend extension for SimpleBroker.
|
|
4
|
+
|
|
5
|
+
This package exposes the public SimpleBroker backend name `redis`. It targets
|
|
6
|
+
Valkey 7.x and Redis 7.x and the test suite runs against Valkey.
|
|
7
|
+
|
|
8
|
+
Durability depends on the server configuration. A Valkey or Redis deployment
|
|
9
|
+
without AOF/RDB persistence can lose messages on restart. Use SQLite or
|
|
10
|
+
Postgres when you need storage durability from the broker stack by default.
|
|
11
|
+
|
|
12
|
+
Regular broker commands use a redis-py `BlockingConnectionPool` owned by the
|
|
13
|
+
process-local Redis runner. Pub/Sub wake hints use a separate dedicated
|
|
14
|
+
connection because subscribed Redis connections cannot serve normal commands.
|
|
15
|
+
|
|
16
|
+
Pool defaults:
|
|
17
|
+
|
|
18
|
+
- `max_connections = 50`
|
|
19
|
+
- `pool_timeout = BROKER_BUSY_TIMEOUT / 1000`
|
|
20
|
+
|
|
21
|
+
The defaults can be overridden in project backend options:
|
|
22
|
+
|
|
23
|
+
```toml
|
|
24
|
+
[backend_options]
|
|
25
|
+
namespace = "simplebroker_redis_v1"
|
|
26
|
+
max_connections = 50
|
|
27
|
+
pool_timeout = 5.0
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Pool exhaustion is bounded by `pool_timeout` and surfaces as an operational
|
|
31
|
+
error from broker operations.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "simplebroker-redis"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Valkey/Redis backend extension for SimpleBroker"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = {text = "MIT"}
|
|
12
|
+
license-files = ["LICENSE"]
|
|
13
|
+
authors = [
|
|
14
|
+
{name = "Van Lindberg", email = "van.lindberg@gmail.com"},
|
|
15
|
+
]
|
|
16
|
+
dependencies = [
|
|
17
|
+
"simplebroker>=3.5.0,<4",
|
|
18
|
+
"redis>=5,<7",
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
[project.optional-dependencies]
|
|
22
|
+
dev = [
|
|
23
|
+
"pytest>=7.0",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
[project.entry-points."simplebroker.backends"]
|
|
27
|
+
redis = "simplebroker_redis.plugin:get_backend_plugin"
|
|
28
|
+
|
|
29
|
+
[tool.hatch.build]
|
|
30
|
+
include = [
|
|
31
|
+
"/simplebroker_redis/**/*.py",
|
|
32
|
+
"/simplebroker_redis/py.typed",
|
|
33
|
+
"/README.md",
|
|
34
|
+
"/LICENSE",
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
[tool.pytest.ini_options]
|
|
38
|
+
minversion = "7.0"
|
|
39
|
+
testpaths = ["tests"]
|
|
40
|
+
addopts = "-ra -q --strict-markers"
|
|
41
|
+
markers = [
|
|
42
|
+
"redis_only: tests that validate the Valkey/Redis extension package",
|
|
43
|
+
]
|