Skip to content

Seniatical/EzyCore

Repository files navigation


A highly customisable cache manager for python

Why choose EzyCore

  • Enforces use of proper structured data thanks to PyDantic
  • Comes with out of box support for many popular databases such as SQLite3 and more!
  • Built on strict ABC classes, supports flexibility and community made objects!
  • Fast efficient and easy to use

Installation

pip install git+https://github.com/Seniatical/EzyCore

Basic Example

from ezycore import Config, Manager, Model


class Message(Model):
    id: int
    content: str
    author: str

    _config: Config = {'search_by': 'id'}

manager = Manager(locations=['messages'], models={'messages': Message})
manager['messages'].add({'id': 123, 'content': 'Foo', 'author': 'Foo'})

print(manager['messages'].get(123))
# Message(id=123, content='Foo', author='Foo')

View more examples over here!

Documentation

Learn more about about our module by visiting our docs here!