Skip to main content

CLI utility and library for creating encrypted redis dump.

Project description

Redis Dumper

PyPI - Python Version PyPI - Downloads PyPi Package Version GitHub Workflow Status (branch) GitHub

CLI utility and library for creating encrypted redis dump.

Install

pip install redis_dumper

Use in CLI

redis_dumper [OPTIONS] COMMAND [ARGS]...

Use in your code

Examples:

import io
import aioredis
import redis_dumper


REDIS_ADDR = 'redis://10.0.0.1:6379'
PASSWORD = 'qwerty'
FILE_PATH = 'mydump.rdump'


async def dump_to_file_example():
    await redis_dumper.dump_to_file(REDIS_ADDR, PASSWORD, FILE_PATH)


async def dump_to_bytesio_example():
    dump = await redis_dumper.dump_to_bytesio(REDIS_ADDR, PASSWORD)


async def restore_from_file_example():
    await redis_dumper.restore_from_file(REDIS_ADDR, PASSWORD, FILE_PATH)


async def restore_from_bytesio_example(dump: io.BytesIO):
    await redis_dumper.restore_from_bytesio(REDIS_ADDR, PASSWORD, dump)


# you can also use the already created aioredis.Redis instance
async def example_with_created_redis():
    redis = await aioredis.create_redis(REDIS_ADDR)
    dump = await redis_dumper.dump_to_bytesio(redis, PASSWORD)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

redis_dumper-0.1.0.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distribution

redis_dumper-0.1.0-py3-none-any.whl (5.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page