Skip to main content

Pickled database that provide Object-Relational Mapper.

Project description

Pickled database that provide Object-Relational Mapper.

Actions Status GitHub issues GitHub stars GitHub license Downloads Supported Versions

Motivation

Glassjar is a database that provides a storage mechanism based on pickled Python objects with ORM.

Installation

glassjar can be installed by running pip install glassjar.

Example

>>> from glassjar.model import Model
>>>
>>> class Item(Model):
...     name: str
...     attrs: dict
...
>>> item = Item.records.create(name="item", attrs={"color": "red", "shape":"rectangle"})
>>> item.as_dict()
{'name': 'item', 'attrs': {'color': 'red', 'shape': 'rectangle'}}
>>> item2 = Item.records.create(name="item 2", attrs={"color": "blue", "shape":"triangle"})
>>> Item.records.first()
Item(name='item', attrs={'color': 'red', 'shape': 'rectangle'})
>>> Item.records.last()
Item(name='item 2', attrs={'color': 'blue', 'shape': 'triangle'})
>>>

Check out our documentation to learn more!

Project details


Download files

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

Source Distribution

glassjar-0.1.1.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

glassjar-0.1.1-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file glassjar-0.1.1.tar.gz.

File metadata

  • Download URL: glassjar-0.1.1.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for glassjar-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d7ddd5cd4b18a7d05d8b557ee1a50b37947242b72489922974afa5a24a356203
MD5 5bf7c22e60b2827ef40829e95feb9a5a
BLAKE2b-256 89bcbc833ddafc28881b2366613ea0725b9dc379aae324c693fecabd687b6cc2

See more details on using hashes here.

File details

Details for the file glassjar-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: glassjar-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for glassjar-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f52be133f576654fe4495ebf9a7b58caa227fc912836e61169d9612d85a4b692
MD5 1dab4a0d21bb17a20ce27a43efe596d9
BLAKE2b-256 c7098faee56a146d3735fb107065349ef20cb04971f502a8b32d8ae457b480dc

See more details on using hashes here.

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