Skip to main content

Python Library for NoSQL database record versioning

Project description

****
NoSQL Versioning
****

A Python library for NoSQL record versioning.

Installation
============

To install the latest release on `PyPi <https://pypi.python.org/pypi/nosql_versioning/0.1>`_,
simply run:

::

pip install nosql_versioning

Or to install the latest development version, run:

::

git clone https://github.com/xinhuang/nosql_versioning.git
cd nosql_versioning
python setup.py install

Quick Tutorial
==============

.. code:: pycon

>>> from nosql_versioning import database
>>>
>>> version, Record = database()
>>>
>>> @version()
>>> class Recordv0(object):
>>> def __init__(self, jobj):
>>> self.old_name = jobj['old_name']
>>>
>>> @version(1)
>>> class Recordv1(object):
>>> def __init__(self, jobj):
>>> self.new_name = jobj['new_name']
>>>
>>> @staticmethod
>>> def migrate(jobj):
>>> jobj['new_name'] = jobj['old_name']
>>> del jobj['old_name']
>>>
>>> rec = Record('{"__ver": 0, "old_name": 1}')


Licensing
=========

This project is released under the terms of the MIT Open Source License. View
*LICENSE.txt* for more information.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

nosql_versioning-0.1.2-py3-none-any.whl (4.6 kB view hashes)

Uploaded Python 3

Supported by

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