Metadata-Version: 2.1
Name: json-repository
Version: 0.2.0
Summary: A simple json repository
Home-page: https://github.com/mandrewcito/json_repository
Author: mandrewcito
Author-email: anbaalo@gmail.com
License: UNKNOWN
Keywords: json repository typed
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown

# json_repository

![travis build](https://img.shields.io/travis/:mandrewcito/:json_repository.svg)
![Pypi](https://img.shields.io/pypi/v/json-repository.svg)
![Pypi - downloads month](https://img.shields.io/pypi/dm/json-repository.svg)


# Install

[https://pypi.org/project/json-repository/](Pypi)
pip install json-repository

# Examples

You can also go to [tests](test/sample/foobar_test.py) to check a good how-to!

## Creating custom repository

```python
class Foo(object):
    foo = None
    bar = None
    id = None

class FoobarRepository(BaseJsonRepository):
  def __init__(self):
    super(FoobarRepository, self).__init__(Foo)
```

## using created repository

```python
  with FoobarRepository() as repo:
    for entity in repo.get_all():
      repo.delete(entity)
    repo.context.commit()
```


