This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

The highly logical way to populate Redis with random data

Project Description

You’ll need redis-py: http://github.com/andymccurdy/redis-py

Say you want to SET ten thousand keys, with randomly generated values.

Here’s all you need to do:

First, create a Vulcan object like so:

from vulcan import Vulcan

s = Vulcan(10000)

The default is to populate with strings, but to be explicit you could do:

s = Vulcan(10000, ‘strings’)

For lists, sets, sorted sets, or hashes:

lists = Vulcan(10000, ‘lists’)

sets = Vulcan(10000, ‘sets’)

zsets = Vulcan(10000, ‘zsets’)

hashes = Vulcan(10000, ‘hashes’)

Now just:

s.populate()

That will clear out database 5 (or 6 or 7 or 8 or 9, respectively), and populate it with your random data. You’re all set.

The keys are given random integer key names, and the values and scores are also given random integers. Next version, I’ll likely add in some other options for random values (probably Star Trek-based).

That’s all there is to it. You are now bursting with Redis data. Live long, and prosper. V/_

Release History

Release History

This version
History Node

0.1.1

History Node

0.1.0

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
vulcan-0.1.1.tar.gz (2.3 kB) Copy SHA256 Checksum SHA256 Source Apr 6, 2010

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting