Skip to main content

Export Redis data to CSV format while retaining field data types

Project description

Redis CSV Exporter

Export Redis data to CSV or JSON format while retaining field data types.

Features

  • Export Redis hashes, lists, sets, sorted sets, strings, and streams
  • Automatic data type detection (integer, float, boolean, datetime, string)
  • Key parsing by delimiter
  • Pipeline-based fetching for performance
  • CSV or JSON output formats

Installation

pip install redis-csv-exporter

Usage

# Export hashes to CSV
redis-export --host localhost --port 6379 --pattern "policy:*" -o export.csv

# With authentication
redis-export --host redis.example.com --password secret --pattern "user:*" -o users.csv

# Export as JSON
redis-export --pattern "cache:*" --json --pretty -o cache.json

# Export specific data types
redis-export --pattern "data:*" --data-types hash list -o mixed.csv

Options

Option Description
--host Redis host (default: localhost)
--port Redis port (default: 6379)
--password Redis password
--db Redis database number (default: 0)
--ssl Use SSL connection
--pattern Key pattern to match (required)
--delimiter Key delimiter for parsing (default: :)
--data-types Redis types to export (default: hash)
--no-metadata Exclude TTL and exists columns
--json Export as JSON instead of CSV
--pretty Pretty-print JSON output
--verbose Show debug information

Development

# Clone and install in editable mode
pip install -e ".[dev]"

# Run tests
pytest

# Lint
ruff check src/

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_csv_exporter-1.0.0.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

redis_csv_exporter-1.0.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file redis_csv_exporter-1.0.0.tar.gz.

File metadata

  • Download URL: redis_csv_exporter-1.0.0.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for redis_csv_exporter-1.0.0.tar.gz
Algorithm Hash digest
SHA256 8b0c298b961b4db08b48208cba039bd26abfb90b34962d37e7dedcd2f0904ea1
MD5 ce3a01637d816efba851d8a07078df2d
BLAKE2b-256 c3c7ce6db3584aa94af4117865bb675d2165df3cee95a96fa1e34b183ae59db4

See more details on using hashes here.

File details

Details for the file redis_csv_exporter-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for redis_csv_exporter-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ad45304c13032fd3ae33759c5360f712fb6b88e340d3ce59aeeddb2529722c23
MD5 4aa41f396a97b81680687061aefac41a
BLAKE2b-256 45521c7b83326590d416aed3c3cc06f7d216098090d462eb00bd2db1a3b56e8f

See more details on using hashes here.

Supported by

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