aioredis-models
A wrapper over aioredis that models Redis data as simple data structures.
Supported data structures
- Keys
- Strings
- Lists
- Hash maps
- Sets
- Double hash maps
Requirements
- Python 3.6+
- aioredis requirements
Documentation
Detailed documentation is available at https://aioredis-models.readthedocs.io/.
Usage
Construction of all data structures requires at least an aioredis.Redis instance
and a key. For example, to create a RedisString:
from aioredis-models import RedisString
redis_string = RedisString(redis, 'my-string')
Once a model has been constructed, various functions can be used to interact with it.
import aioredis
from aioredis-models import RedisString
async def do_work(redis_string: RedisString):
stored_value = await redis_string.get()
print(stored_value)
Contributing
The library is currently in very early stages of development and there is a lot of room for growth.
As such, contributions are welcome. To contribute, create a pull request into the main branch.
Make sure the tests pass and there are no linting errors. Also, please update documentation, if
needed.
Testing
The easiest way to run the tests is through docker-compose and Docker:
docker-compose up --build unit-test
To run directly on the host:
pip3 install -r requirements.txt
tox -e unit-py39
End-to-end tests can also be run with docker-compose:
docker-compose up --build e2e-test
Linting
Similar to testing, linting rules can be run through:
docker-compose up --build lint
To run directly on the host:
pip3 install -r requirements.txt
pylint aioredis_models
Documentation
Documentation can get regenerated by starting the generate-docs service in docker-compose:
docker-compose up --build generate-docs
To run directly on the host:
pip3 install -r requirements.txt
sphinx-apidoc -f -o docs/source aioredis_models && (cd docs && make html)
License
This library is offered under the MIT license.
Metadata
Release files for aioredis-models 3.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aioredis-models-3.0.0.tar.gz | 12.7 kB | Without provenance | Details for aioredis-models-3.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aioredis_models-3.0.0-py3-none-any.whl | Python 3 | none | any | Details for aioredis_models-3.0.0-py3-none-any.whl |
Total release size: 30.0 kB
Release files / aioredis-models-3.0.0.tar.gz
| Download URL | aioredis-models-3.0.0.tar.gz |
|---|---|
| Size | 12.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4622ddd984e9148dc4d9e204487bbd258f5a5044490c7ba19105f49da4422fae
|
|
BLAKE2b-256 checksum How to use checksums |
255fa1c97b5fa5e45d8c67a966867addf500c80afaf7b085685c269a14265ce4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
|
Release files / aioredis_models-3.0.0-py3-none-any.whl
| Download URL | aioredis_models-3.0.0-py3-none-any.whl |
|---|---|
| Size | 17.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bd12cb84e4683151d65780fa31512dee8e632bfcbe924bc30365ceb38dc3169b
|
|
BLAKE2b-256 checksum How to use checksums |
51915a17d611fac4f92cecd2ca0b4bcc6ef6ed1f7e0366af6f2473ac7f2a3bfb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
|
Security for aioredis-models 3.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.