This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Introduction

Sandsnake is a sorted index implemented in python and uses redis as a backend. It was originally implemented to be used as an indexing system for Sunspear.

Requirements

Required

Requirements should be handled by setuptools, but if they are not, you will need the following Python packages:

  • nydus
  • redis
  • dateutil

Optional

  • hiredis

sandsnake.create_sandsnake_backend

Creates an sandsnake object that allows to to store and retrieve indexes:

>>> from sandsnake import create_sandsnake_backend
>>>
>>> sandsnake = create_sandsnake_backend({
>>>     'backend': 'sandsnake.backends.redis.Redis',
>>>     'settings': {
>>>         'defaults': {
>>>             'host': 'localhost',
>>>             'port': 6379,
>>>             'db': 0,
>>>         },
>>>         'hosts': [{'db': 0}, {'db': 1}, {'host': 'redis.example.org'}]
>>>     },
>>> })

Internally, the Redis sandsnake backend uses nydus to distribute your indexes data over your cluster of redis instances.

There are two required arguements:

  • backend: full path to the backend class, which should extend sandsnake.backends.base.BaseSandsnakeBackend
  • settings: settings required to initialize the backend. For the Redis backend, this is a list of hosts in your redis cluster.

Example Usage

Redis

from sandsnake import create_sandsnake_backend
import datetime

sandsnake = create_sandsnake_backend({
    "backend": "sandsnake.backends.redis.Redis",
    "settings": {
        "hosts": [{"db": 5}]
    },
})

#add a value of "abc" to the ``index`` for an ``object``
sandsnake.add("user:1", "homefeed", "abc")
sandsnake.add("user:1", ["homefeed", "recogfeed"], "abc")
Release History

Release History

0.1.3

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
sandsnake-0.1.3.tar.gz (15.0 kB) Copy SHA256 Checksum SHA256 Source Apr 25, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development 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