<p align="center">
<img src="https://raw.githubusercontent.com/wazofski/pystorz/master/logo.png" width="300" alt="storz" />
</p>
**pystorz** is an *object store framework* built in python. It consists of a set of modules implementing the [Store](https://github.com/wazofski/pystorz/tree/master/pystorz/store) interface and features a simple [object modeling language](https://github.com/wazofski/pystorz/tree/master/pystorz/mgen) used to generate golang object class meta for interacting with `Store` APIs.
**pystorz** modules provide functionality to store, modify and retrieve modeled objects from various sources (TBD). Such modules can be composed together to chain `Store` functionality into more complex logical modules. Combining modules allows handling object changes and manipulating data in complex ways *within or across* services, making multi-level server complexity achievable with ease. The Store modules are fully compatible with each other and can be composed in any combination since they all implement or expose the same [Store](https://github.com/wazofski/pystorz/tree/master/pystorz/store) interface.
Original storz was written in go. You can check it out here:
[https://github.com/wazofski/gostorz](https://github.com/wazofski/gostorz)
This is a python port of the original storz.
Still in development.
## Quick Start Guide
### Installation
```
pip install pystorz
```
## Model example
You can find a saomple model in the tests folder.
[https://github.com/wazofski/pystorz/blob/master/tests/model/sample.yml](https://github.com/wazofski/pystorz/blob/master/tests/model/sample.yml)
You can define simple structures and reference them as fields in other structures.
You need to define Objects that will become your root level modeled objects. You can then create, update, delete and retrieve these from using a store.
Only a SQLite store is implemented at the moment.
More to come.
Check out the go version (link above) for more information.
## Usage
```
from pystorz.mgen import builder
# run the code gen to
builder.Generate("path/to/model.yml")
# this will make a generated folder in the project home directory
# you can then import the generated model
from generated import model
# initialize a store
stor = SqliteStore(
Schema(),
SqliteConnector("path/to/your/sqlite3.db"))
world = model.WorldFactory()
world.External().SetName("hello")
created_world = stor.Create(world)
world.External().SetDescription("hello world")
updated_world = stor.Update(world.Metadata().Identity(), world)
# ...
```
Raw data
{
"_id": null,
"home_page": "https://github.com/wazofski/pystorz",
"name": "pystorz",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": null,
"author": "wazofski",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/e2/c9/870ba1e266d9c04dabc75c2b75a73b3c6e1c2c5ec011de5088d658f34207/pystorz-0.6.9.tar.gz",
"platform": null,
"description": "<p align=\"center\">\n<img src=\"https://raw.githubusercontent.com/wazofski/pystorz/master/logo.png\" width=\"300\" alt=\"storz\" />\n</p>\n\n**pystorz** is an *object store framework* built in python. It consists of a set of modules implementing the [Store](https://github.com/wazofski/pystorz/tree/master/pystorz/store) interface and features a simple [object modeling language](https://github.com/wazofski/pystorz/tree/master/pystorz/mgen) used to generate golang object class meta for interacting with `Store` APIs.\n\n**pystorz** modules provide functionality to store, modify and retrieve modeled objects from various sources (TBD). Such modules can be composed together to chain `Store` functionality into more complex logical modules. Combining modules allows handling object changes and manipulating data in complex ways *within or across* services, making multi-level server complexity achievable with ease. The Store modules are fully compatible with each other and can be composed in any combination since they all implement or expose the same [Store](https://github.com/wazofski/pystorz/tree/master/pystorz/store) interface.\n\nOriginal storz was written in go. You can check it out here:\n[https://github.com/wazofski/gostorz](https://github.com/wazofski/gostorz)\n\nThis is a python port of the original storz.\nStill in development.\n\n## Quick Start Guide\n\n### Installation\n```\npip install pystorz\n```\n\n## Model example\n\nYou can find a saomple model in the tests folder.\n[https://github.com/wazofski/pystorz/blob/master/tests/model/sample.yml](https://github.com/wazofski/pystorz/blob/master/tests/model/sample.yml)\n\nYou can define simple structures and reference them as fields in other structures.\n\nYou need to define Objects that will become your root level modeled objects. You can then create, update, delete and retrieve these from using a store.\n\nOnly a SQLite store is implemented at the moment.\n\nMore to come.\nCheck out the go version (link above) for more information.\n\n## Usage\n```\n from pystorz.mgen import builder\n\n # run the code gen to \n builder.Generate(\"path/to/model.yml\")\n # this will make a generated folder in the project home directory\n\n # you can then import the generated model\n from generated import model\n\n # initialize a store\n stor = SqliteStore(\n Schema(),\n SqliteConnector(\"path/to/your/sqlite3.db\"))\n\n world = model.WorldFactory()\n world.External().SetName(\"hello\")\n\n created_world = stor.Create(world)\n world.External().SetDescription(\"hello world\")\n updated_world = stor.Update(world.Metadata().Identity(), world)\n \n # ...\n\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "Python package for the Storz object store framework.",
"version": "0.6.9",
"project_urls": {
"Homepage": "https://github.com/wazofski/pystorz"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "60c2fa4ba574e697368b04af1d8fa0d359270ffe7c66bcf5ba42b87d1a59358c",
"md5": "7b1a2773e666f76a984468b14ef19301",
"sha256": "21f723015c94750899803f7c28b86993c1d45fe1ee85cb5a0c1a69372b068500"
},
"downloads": -1,
"filename": "pystorz-0.6.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7b1a2773e666f76a984468b14ef19301",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 38876,
"upload_time": "2025-10-21T21:20:11",
"upload_time_iso_8601": "2025-10-21T21:20:11.715706Z",
"url": "https://files.pythonhosted.org/packages/60/c2/fa4ba574e697368b04af1d8fa0d359270ffe7c66bcf5ba42b87d1a59358c/pystorz-0.6.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "e2c9870ba1e266d9c04dabc75c2b75a73b3c6e1c2c5ec011de5088d658f34207",
"md5": "f98a073ac0025848188fe01ef76906ef",
"sha256": "5a79c37960d48df626425e14a727f108bb0865c6978677a341d183bf4bc4808d"
},
"downloads": -1,
"filename": "pystorz-0.6.9.tar.gz",
"has_sig": false,
"md5_digest": "f98a073ac0025848188fe01ef76906ef",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 30051,
"upload_time": "2025-10-21T21:20:12",
"upload_time_iso_8601": "2025-10-21T21:20:12.953616Z",
"url": "https://files.pythonhosted.org/packages/e2/c9/870ba1e266d9c04dabc75c2b75a73b3c6e1c2c5ec011de5088d658f34207/pystorz-0.6.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-21 21:20:12",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "wazofski",
"github_project": "pystorz",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "PyYAML",
"specs": []
},
{
"name": "jinja2",
"specs": []
},
{
"name": "black",
"specs": []
},
{
"name": "jsonpath-python",
"specs": []
},
{
"name": "cherrypy",
"specs": []
},
{
"name": "requests",
"specs": []
},
{
"name": "mysql-connector-python",
"specs": []
},
{
"name": "sqlparse",
"specs": []
},
{
"name": "flask",
"specs": []
},
{
"name": "pytest",
"specs": []
},
{
"name": "pymongo",
"specs": []
}
],
"lcname": "pystorz"
}