Utility for generating Redis dump (.rdb) files from Python native objects
## Installation
You can install this package using `pip`
pip install rdbgenerate
## Version support
`rdbgenerate` is written for Python 3.
## Generated `.rdb` files
The `.rdb` files generated by `rdbgenerate`:
- do not use compression to reduce size, unlike Redis itself which uses
smart encoding formats to keep file size down
- do not include auxiliary information such as database size hints,
additional version information, etc.
## Usage
Once installed, use `rdb_generate` to write `.rdb` files.
$ python
>>> from rdbgenerate import rdb_generate
>>> rdb_generate(
'dump.rdb',
db0={
b"a": b"0",
b"b": {b"1"},
b"c": [b"1", b"2", b"3"],
b"d": {b"x": b"y"}
},
db1={
b"California": b"dreamin'"
}
)
>>> quit()
$ redis-server
### Encodings
This package supports strings that are Python `bytes` objects. It does *not* support regular Python strings.
Python strings can be converted to `bytes` via
>>> s = "California"
>>> b = s.encode('utf8')
>>> print(b)
b"California"
For more information on string encoding in Python 3, see https://docs.python.org/3/howto/unicode.html .
Metadata
Release files for rdbgenerate 0.1.2
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 |
|---|---|---|---|---|
| rdbgenerate-0.1.2.tar.gz | 21.0 kB | Without provenance | Details for rdbgenerate-0.1.2.tar.gz |
Release files / rdbgenerate-0.1.2.tar.gz
| Download URL | rdbgenerate-0.1.2.tar.gz |
|---|---|
| Size | 21.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2e5d09134f5f3138350e6a80775d721ee1cbcb2216c7d353eaad9b507627494f
|
|
BLAKE2b-256 checksum How to use checksums |
5ba8566efd9f2c5229b383621ef635d003b22348a23f464e4b25aac7f7fa3964
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for rdbgenerate 0.1.2
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.