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

ripozo-cassandra

ripozo-cassandra is a ripozo-extension that provides a Manager that integrates cqlengine (and thereby Cassandra) with ripozo. It provides convience functions for generating resources. In particular it focues on creating shortcuts for CRUD+L type operations. It fully implements the BaseManager class that is provided in the ripozo package.

Example

This is the minimal example of creating ripozo managers with ripozo-cassandra and integrating them with a resource. As you can see in the example, there are only three functional lines of code.

from cqlengine.models import Model
from cqlengine import columns, connection
from cqlengine.management import create_keyspace, sync_table, delete_keyspace

from ripozo_cassandra import CQLManager

from uuid import uuid4

# Define your model
class Person(Model):
    id = columns.UUID(primary_key=True, default=lambda:uuid4())
    first_name = columns.Text()
    last_name = columns.Text()

# Setup cqlengine and sync the person table
keyspace_name = 'mykeyspace'
connection.setup(['192.168.56.102'], keyspace_name)
create_keyspace(keyspace_name)
sync_table(Person)

# This is where you define your manager
class PersonManageR(CQLManager):
    model = Person  # Assign the cqlengin model to the manager
    fields = ('id', 'first_name', 'last_name',) # Specify the fields to use for this manager

# This is the ripozo specific part.
# This creates a resource class that can be given
# to a dispatcher (e.g. the flask-ripozo package's FlaskDispatcher)
class PersonResource(ResourceBase):
    manager = PersonManager
    pks = ['id']

    # A retrieval method that will operate on the '/api/person' route
    # It retrieves the id, first_name, and last_name properties
    @apimethod(methods=['GET'])
    def get_person(cls, request):
        properties = self.manager.retrieve(request.url_params)
        return cls(properties=properties)
Release History

Release History

0.2.1

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.0b1

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
ripozo-cassandra-0.2.1.tar.gz (4.8 kB) Copy SHA256 Checksum SHA256 Source Jun 30, 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