redisdol 0.0.8__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.
@@ -0,0 +1,17 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ insert_final_newline = true
7
+ trim_trailing_whitespace = true
8
+
9
+ [*.{py,toml,yml,yaml}]
10
+ indent_style = space
11
+ indent_size = 4
12
+
13
+ [*.md]
14
+ trim_trailing_whitespace = false
15
+
16
+ [Makefile]
17
+ indent_style = tab
@@ -0,0 +1 @@
1
+ *.ipynb linguist-documentation
@@ -0,0 +1,242 @@
1
+ name: Continuous Integration (uv)
2
+ on: [push, pull_request]
3
+
4
+ # Workflow-level env vars. redisdol's doctests run against a Redis server
5
+ # provided as a service container in the validation job (see the `services:`
6
+ # block below). redisdol connects to localhost:6379 by default, which is where
7
+ # the service container's port is published — so no extra connection env is
8
+ # needed. The conftest.py availability probe deselects the Redis-dependent
9
+ # doctests when no server is reachable (e.g. local runs without redis-server).
10
+ env:
11
+ PROJECT_NAME: redisdol
12
+
13
+ jobs:
14
+ # First job: Read configuration from pyproject.toml
15
+ setup:
16
+ name: Read Configuration
17
+ runs-on: ubuntu-latest
18
+ outputs:
19
+ project-name: ${{ steps.config.outputs.project-name }}
20
+ python-versions: ${{ steps.config.outputs.python-versions }}
21
+ pytest-args: ${{ steps.config.outputs.pytest-args }}
22
+ coverage-enabled: ${{ steps.config.outputs.coverage-enabled }}
23
+ exclude-paths: ${{ steps.config.outputs.exclude-paths }}
24
+ test-on-windows: ${{ steps.config.outputs.test-on-windows }}
25
+ tests-enabled: ${{ steps.config.outputs.tests-enabled }}
26
+ build-sdist: ${{ steps.config.outputs.build-sdist }}
27
+ build-wheel: ${{ steps.config.outputs.build-wheel }}
28
+ metrics-enabled: ${{ steps.config.outputs.metrics-enabled }}
29
+ metrics-config-path: ${{ steps.config.outputs.metrics-config-path }}
30
+ metrics-storage-branch: ${{ steps.config.outputs.metrics-storage-branch }}
31
+ metrics-python-version: ${{ steps.config.outputs.metrics-python-version }}
32
+ metrics-force-run: ${{ steps.config.outputs.metrics-force-run }}
33
+ ruff-enabled: ${{ steps.config.outputs.ruff-enabled }}
34
+ black-enabled: ${{ steps.config.outputs.black-enabled }}
35
+ mypy-enabled: ${{ steps.config.outputs.mypy-enabled }}
36
+ docs-enabled: ${{ steps.config.outputs.docs-enabled }}
37
+ publish-enabled: ${{ steps.config.outputs.publish-enabled }}
38
+ skip-ci-marker: ${{ steps.config.outputs.skip-ci-marker }}
39
+ publish-marker: ${{ steps.config.outputs.publish-marker }}
40
+
41
+ steps:
42
+ - uses: actions/checkout@v6
43
+
44
+ - name: Set up uv
45
+ uses: astral-sh/setup-uv@v7
46
+
47
+ - name: Set up Python
48
+ run: uv python install 3.11
49
+
50
+ - name: Read CI Config
51
+ id: config
52
+ uses: i2mint/wads/actions/read-ci-config@master
53
+ with:
54
+ pyproject-path: .
55
+
56
+ # Second job: Validation using the config
57
+ validation:
58
+ name: Validation
59
+ if: "!contains(github.event.head_commit.message, '[skip ci]')"
60
+ needs: setup
61
+ runs-on: ubuntu-latest
62
+ strategy:
63
+ matrix:
64
+ python-version: ${{ fromJson(needs.setup.outputs.python-versions) }}
65
+
66
+ # A Redis server for the doctests, brought INTO the CI runner as a service
67
+ # container. Its 6379 port is published to localhost:6379, exactly where
68
+ # redisdol connects by default. The health check gates the job's steps until
69
+ # Redis is answering `redis-cli ping`, so the doctests never race the server.
70
+ services:
71
+ redis:
72
+ image: redis:7
73
+ ports:
74
+ - 6379:6379
75
+ options: >-
76
+ --health-cmd "redis-cli ping"
77
+ --health-interval 5s
78
+ --health-timeout 3s
79
+ --health-retries 5
80
+
81
+ steps:
82
+ - uses: actions/checkout@v6
83
+
84
+ - name: Set up uv
85
+ uses: astral-sh/setup-uv@v7
86
+ with:
87
+ enable-cache: true
88
+
89
+ - name: Set up Python ${{ matrix.python-version }}
90
+ uses: i2mint/wads/actions/setup-python-uv@master
91
+ with:
92
+ python-version: ${{ matrix.python-version }}
93
+
94
+ - name: Install System Dependencies
95
+ uses: i2mint/wads/actions/install-system-deps@master
96
+ with:
97
+ pyproject-path: .
98
+
99
+ - name: Install Dependencies
100
+ uses: i2mint/wads/actions/install-deps-uv@master
101
+
102
+ - name: Format Source Code
103
+ if: needs.setup.outputs.ruff-enabled != 'false'
104
+ run: uvx ruff format .
105
+
106
+ - name: Format Source Code (black)
107
+ if: needs.setup.outputs.black-enabled == 'true'
108
+ run: uvx black .
109
+
110
+ - name: Lint Validation
111
+ if: needs.setup.outputs.ruff-enabled != 'false'
112
+ run: uvx ruff check --output-format=github ${{ needs.setup.outputs.project-name }}
113
+
114
+ - name: Type Check (mypy)
115
+ if: needs.setup.outputs.mypy-enabled == 'true'
116
+ run: uvx mypy ${{ needs.setup.outputs.project-name }}
117
+
118
+ - name: Run Tests
119
+ if: needs.setup.outputs.tests-enabled != 'false'
120
+ uses: i2mint/wads/actions/run-tests-uv@master
121
+ with:
122
+ root-dir: ${{ needs.setup.outputs.project-name }}
123
+ pytest-args: ${{ needs.setup.outputs.pytest-args }}
124
+ exclude-paths: ${{ needs.setup.outputs.exclude-paths }}
125
+ coverage: ${{ needs.setup.outputs.coverage-enabled }}
126
+
127
+ - name: Track Code Metrics
128
+ if: needs.setup.outputs.metrics-enabled == 'true'
129
+ uses: i2mint/umpyre/actions/track-metrics@master
130
+ continue-on-error: true
131
+ with:
132
+ github-token: ${{ secrets.GITHUB_TOKEN }}
133
+ config-path: ${{ needs.setup.outputs.metrics-config-path }}
134
+ storage-branch: ${{ needs.setup.outputs.metrics-storage-branch }}
135
+ python-version: ${{ needs.setup.outputs.metrics-python-version }}
136
+ force-run: ${{ needs.setup.outputs.metrics-force-run }}
137
+
138
+ # Publishing job
139
+ #
140
+ # Gated by [tool.wads.ci.publish] in pyproject.toml (read via the setup job):
141
+ # - skip-ci-marker : when publishing is enabled, a commit message containing
142
+ # this substring skips the publish job (default "[skip ci]").
143
+ # - publish-enabled : whether publishing runs at all (default true).
144
+ # - publish-marker : when publishing is disabled, a commit message containing
145
+ # this substring forces the publish job (default "[publish]").
146
+ # The publish-enabled check uses `== 'true'` (fail-closed): if an older wads
147
+ # without these outputs is installed by read-ci-config, publishing is skipped
148
+ # rather than run unintentionally.
149
+ publish:
150
+ name: Publish
151
+ permissions:
152
+ contents: write
153
+ if: "!contains(github.event.head_commit.message, needs.setup.outputs.skip-ci-marker) && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && (needs.setup.outputs.publish-enabled == 'true' || contains(github.event.head_commit.message, needs.setup.outputs.publish-marker))"
154
+ needs: [setup, validation]
155
+ runs-on: ubuntu-latest
156
+
157
+ steps:
158
+ # `actions/checkout@v6` defaults to persist-credentials: true, configuring
159
+ # HTTPS auth in .git/config using `secrets.GITHUB_TOKEN`. Together with the
160
+ # job-level `permissions: contents: write`, this is exactly what the
161
+ # post-publish push-back needs — no per-repo SSH deploy key required. Do
162
+ # NOT re-add a "Force SSH for git remote" step: rewriting origin to an
163
+ # SSH URL overrides these credentials and reintroduces the push-back
164
+ # failure on every repo lacking an SSH_PRIVATE_KEY deploy key.
165
+ - uses: actions/checkout@v6
166
+ with:
167
+ fetch-depth: 0
168
+ token: ${{ secrets.GITHUB_TOKEN }}
169
+
170
+ - name: Set up uv
171
+ uses: astral-sh/setup-uv@v7
172
+
173
+ - name: Set up Python
174
+ uses: i2mint/wads/actions/setup-python-uv@master
175
+ with:
176
+ python-version: ${{ fromJson(needs.setup.outputs.python-versions)[0] }}
177
+ create-venv: "false"
178
+
179
+ - name: Format Source Code
180
+ if: needs.setup.outputs.ruff-enabled != 'false'
181
+ run: uvx ruff format .
182
+
183
+ - name: Format Source Code (black)
184
+ if: needs.setup.outputs.black-enabled == 'true'
185
+ run: uvx black .
186
+
187
+ - name: Update Version Number
188
+ id: version
189
+ uses: i2mint/isee/actions/bump-version-number@master
190
+
191
+ - name: Build Distribution
192
+ uses: i2mint/wads/actions/build-dist-uv@master
193
+ with:
194
+ sdist: ${{ needs.setup.outputs.build-sdist }}
195
+ wheel: ${{ needs.setup.outputs.build-wheel }}
196
+
197
+ - name: Publish to PyPI
198
+ uses: i2mint/wads/actions/pypi-publish-uv@master
199
+ with:
200
+ pypi-token: ${{ secrets.PYPI_PASSWORD }}
201
+
202
+ - name: Commit Changes
203
+ uses: i2mint/wads/actions/git-commit@master
204
+ with:
205
+ commit-message: "**CI** Formatted code + Updated version to ${{ env.VERSION }} [skip ci]"
206
+ push: true
207
+
208
+ - name: Tag Repository
209
+ uses: i2mint/wads/actions/git-tag@master
210
+ with:
211
+ tag: ${{ env.VERSION }}
212
+ message: "Release version ${{ env.VERSION }}"
213
+ push: true
214
+
215
+ # Optional GitHub Pages (skipped when [tool.wads.ci.docs].enabled = false)
216
+ # Depends on validation (not publish) so docs still publish when the publish
217
+ # job is disabled via [tool.wads.ci.publish].enabled = false.
218
+ github-pages:
219
+ name: Publish GitHub Pages
220
+ permissions:
221
+ contents: write
222
+ pages: write
223
+ id-token: write
224
+ if: "!contains(github.event.head_commit.message, '[skip ci]') && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && needs.setup.outputs.docs-enabled != 'false'"
225
+ needs: [setup, validation]
226
+ runs-on: ubuntu-latest
227
+
228
+ steps:
229
+ # Check out first so install-system-deps can read [tool.wads.ops.*] from
230
+ # pyproject.toml. The epythet action self-checks-out again internally;
231
+ # apt-installed system deps persist across that re-checkout.
232
+ - uses: actions/checkout@v6
233
+
234
+ - name: Install System Dependencies
235
+ uses: i2mint/wads/actions/install-system-deps@master
236
+ with:
237
+ pyproject-path: .
238
+
239
+ - uses: i2mint/epythet/actions/publish-github-pages@master
240
+ with:
241
+ github-token: ${{ secrets.GITHUB_TOKEN }}
242
+ ignore: "tests/,scrap/,examples/"
@@ -0,0 +1,115 @@
1
+ docs/*
2
+ wads_configs.json
3
+ data/wads_configs.json
4
+ wads/data/wads_configs.json
5
+
6
+ # Byte-compiled / optimized / DLL files
7
+ __pycache__/
8
+ *.py[cod]
9
+ *$py.class
10
+
11
+
12
+ .DS_Store
13
+ # C extensions
14
+ *.so
15
+
16
+ # Distribution / packaging
17
+ .Python
18
+ build/
19
+ develop-eggs/
20
+ dist/
21
+ downloads/
22
+ eggs/
23
+ .eggs/
24
+ lib/
25
+ lib64/
26
+ parts/
27
+ sdist/
28
+ var/
29
+ wheels/
30
+ *.egg-info/
31
+ .installed.cfg
32
+ *.egg
33
+ MANIFEST
34
+ _build
35
+
36
+ # PyInstaller
37
+ # Usually these files are written by a python script from a template
38
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
39
+ *.manifest
40
+ *.spec
41
+
42
+ # Installer logs
43
+ pip-log.txt
44
+ pip-delete-this-directory.txt
45
+
46
+ # Unit test / coverage reports
47
+ htmlcov/
48
+ .tox/
49
+ .coverage
50
+ .coverage.*
51
+ .cache
52
+ nosetests.xml
53
+ coverage.xml
54
+ *.cover
55
+ .hypothesis/
56
+ .pytest_cache/
57
+
58
+ # Translations
59
+ *.mo
60
+ *.pot
61
+
62
+ # Django stuff:
63
+ *.log
64
+ local_settings.py
65
+ db.sqlite3
66
+
67
+ # Flask stuff:
68
+ instance/
69
+ .webassets-cache
70
+
71
+ # Scrapy stuff:
72
+ .scrapy
73
+
74
+ # Sphinx documentation
75
+ docs/_build/
76
+
77
+ # PyBuilder
78
+ target/
79
+
80
+ # Jupyter Notebook
81
+ .ipynb_checkpoints
82
+
83
+ # pyenv
84
+ .python-version
85
+
86
+ # celery beat schedule file
87
+ celerybeat-schedule
88
+
89
+ # SageMath parsed files
90
+ *.sage.py
91
+
92
+ # Environments
93
+ .env
94
+ .venv
95
+ env/
96
+ venv/
97
+ ENV/
98
+ env.bak/
99
+ venv.bak/
100
+
101
+ # Spyder project settings
102
+ .spyderproject
103
+ .spyproject
104
+
105
+ # Rope project settings
106
+ .ropeproject
107
+
108
+ # mkdocs documentation
109
+ /site
110
+
111
+ # mypy
112
+ .mypy_cache/
113
+
114
+ # PyCharm
115
+ .idea
redisdol-0.0.8/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,74 @@
1
+ Metadata-Version: 2.5
2
+ Name: redisdol
3
+ Version: 0.0.8
4
+ Summary: redis with a simple (dict-like or list-like) interface
5
+ Project-URL: Homepage, https://github.com/i2mint/redisdol
6
+ Author: Thor Whalen
7
+ License-Expression: Apache-2.0
8
+ License-File: LICENSE
9
+ Keywords: database,dict-like,dol,key-value,list-like,redis,storage
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Topic :: Database
15
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
16
+ Requires-Python: >=3.10
17
+ Requires-Dist: dol
18
+ Requires-Dist: redis
19
+ Provides-Extra: dev
20
+ Requires-Dist: fakeredis; extra == 'dev'
21
+ Requires-Dist: pytest-cov>=4.0; extra == 'dev'
22
+ Requires-Dist: pytest>=7.0; extra == 'dev'
23
+ Requires-Dist: ruff>=0.1.0; extra == 'dev'
24
+ Provides-Extra: docs
25
+ Requires-Dist: sphinx-rtd-theme>=1.0; extra == 'docs'
26
+ Requires-Dist: sphinx>=6.0; extra == 'docs'
27
+ Description-Content-Type: text/markdown
28
+
29
+
30
+ # redisdol
31
+ redis with a simple (dict-like or list-like) interface
32
+
33
+
34
+ To install: ```pip install redisdol```
35
+
36
+
37
+ Provides a `collections.abc.MutableMapping` (i.e. dict-like) interface to Redis.
38
+
39
+ Note that Redis automatically converts everything to bytes when writing, which means that
40
+ read and write are not inverse of each other in the base RedisPersister.
41
+ A serialization/deserialization layer can be added to make read and write consistent.
42
+
43
+ ```python
44
+ >>> from redisdol import RedisBytesPersister
45
+ >>> s = RedisBytesPersister() # plenty of params possible (all those of redis.Redis), but taking defaults.
46
+ >>>
47
+ >>> # clear the kehys we'll be using
48
+ >>> keys = ['_pyst_test_str', '_pyst_test_int', '_pyst_test_float']
49
+ >>> for k in keys:
50
+ ... del s[k]
51
+ >>>
52
+ >>> before_length = len(s)
53
+ >>>
54
+ >>> s['_pyst_test_str'] = 'hello'
55
+ >>> s['_pyst_test_str'] # note you won't be getting a str but bytes
56
+ b'hello'
57
+ >>>
58
+ >>> '_pyst_test_str' in s
59
+ >>>
60
+ >>> # numbers are converted to strings then bytes
61
+ >>> s['_pyst_test_int'] = 42
62
+ >>> assert s['_pyst_test_int'] == b'42'
63
+ >>> s['_pyst_test_float'] = 3.14
64
+ >>> assert s['_pyst_test_float'] == b'3.14'
65
+ >>>
66
+ >>> assert len(s) == before_length + 3
67
+ >>>
68
+ >>> '_pyst_test_float' in
69
+ >>>
70
+ >>> # clean up
71
+ >>> for k in keys:
72
+ ... del s[k]
73
+ >>>
74
+ ```