A powerful, model based Cassandra wrapper for Python.
Project description
Maelstrom
=========
.. image:: https://travis-ci.org/gradfly/maelstrom.svg?branch=develop
:target: https://travis-ci.org/gradfly/maelstrom
A model based database library for Apache Cassandra built on top of DataStax Python Driver. This library has tested support for Python 2.7.
Installation
------------
Installing through pip is recommended::
$ pip install py-maelstrom
You must have setuptools installed prior to installation. To install the package manually please refer to our installation guide.
Get Started
-----------
Example usage of Maelstrom:
.. code-block:: python
from uuid import uuid4
from maelstrom import connect, close, Base
cassandra.connect([ip1, ip2])
class User(Base):
__tablename__ = "users"
defaults = {
'id' = uuid4(),
'name' = '',
'email' = '',
}
lookups = ["email"]
def __init__(self, *args, **kwargs):
self.update_data(**self.defaults)
Base.__init__(self, *arks, **kwargs)
new_user = User(name = "Joe", email="example@email.com")
new_user.commit()
get_user = Account.get_by_lookup("example@email.com")
cassandra.close()
Documentation
-------------
TODO
License
-------
Copyright 2014 Matt Morse, Joe Peacock and contributors
Maelstrom is licensed under the [MIT License](https://github.com/gradfly/maelstrom/README.md).
=========
.. image:: https://travis-ci.org/gradfly/maelstrom.svg?branch=develop
:target: https://travis-ci.org/gradfly/maelstrom
A model based database library for Apache Cassandra built on top of DataStax Python Driver. This library has tested support for Python 2.7.
Installation
------------
Installing through pip is recommended::
$ pip install py-maelstrom
You must have setuptools installed prior to installation. To install the package manually please refer to our installation guide.
Get Started
-----------
Example usage of Maelstrom:
.. code-block:: python
from uuid import uuid4
from maelstrom import connect, close, Base
cassandra.connect([ip1, ip2])
class User(Base):
__tablename__ = "users"
defaults = {
'id' = uuid4(),
'name' = '',
'email' = '',
}
lookups = ["email"]
def __init__(self, *args, **kwargs):
self.update_data(**self.defaults)
Base.__init__(self, *arks, **kwargs)
new_user = User(name = "Joe", email="example@email.com")
new_user.commit()
get_user = Account.get_by_lookup("example@email.com")
cassandra.close()
Documentation
-------------
TODO
License
-------
Copyright 2014 Matt Morse, Joe Peacock and contributors
Maelstrom is licensed under the [MIT License](https://github.com/gradfly/maelstrom/README.md).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
maelstrom-py-0.1.0.tar.gz
(9.4 kB
view hashes)