Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/uucidl/pyjsonlog
a log store for JSON datastructures
https://github.com/uucidl/pyjsonlog
Last synced: 23 days ago
JSON representation
a log store for JSON datastructures
- Host: GitHub
- URL: https://github.com/uucidl/pyjsonlog
- Owner: uucidl
- License: mit
- Created: 2014-06-01T08:41:08.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-06-01T10:01:05.000Z (over 10 years ago)
- Last Synced: 2024-10-04T13:27:56.119Z (about 1 month ago)
- Language: Python
- Size: 152 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- Changelog: ChangeLog
- License: LICENSE
Awesome Lists containing this project
README
* Abstract
A python package implementing a filesystem based store of JSON
datastructures, where older versions are never deleted.Travis-CI says [[https://travis-ci.org/uucidl/pyjsonlog.svg?branch=master]]
* Why should I use json-log-store?
When developing a python-based application or command line tool, you
can use this file store to store your data.Iterating on the solution or creating composite solutions made of
multiple tools can then be done with the confidence you will not lose
any data.* Application area
- Python applications
- Data can be serialized as JSON
- Mostly reads, few writes* Using
#+begin_src python
import os
from jsonlog import DataStore, DataStoreFSroot_dir = ""
os.makedirs(root_dir)
ds = DataStore(DataStoreFS(root_dir))# put first version in the store
os.makedirs(os.path.join(root_dir, 'my-item'))
ds.put('item', 'my-item', dict(version=0))# read and update the item
item = ds.get('my-item')
item['info'] = 'Hello, World'
ds.put('item', 'my-item', item)
#+end_srcThen you should be able to see in /my-item/:
#+begin_example
item-1.json
item-2.json
#+end_example* Contributing
Here are the steps to follow to get a working development environment:
Create a virtual environment and activate it
#+begin_example
$ virtualenv venv
$ . venv/bin/activate
#+end_exampleInstall development dependencies
#+begin_example
$ pip install -r requirements.txt dev_requirements.txt
#+end_exampleWith the virtual environment active, test your changes before submitting:
#+begin_example
$ nosetests -s tests
#+end_example* License
see [[LICENSE]]