Name | meritous JSON |
Version |
1.2.2
JSON |
| download |
home_page | None |
Summary | Simple Python Models |
upload_time | 2024-07-31 05:26:32 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | None |
keywords |
model
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
[![PyPI](https://img.shields.io/pypi/v/meritous?style=for-the-badge)](https://pypi.org/project/meritous/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/meritous?style=for-the-badge)
![PyPI - License](https://img.shields.io/pypi/l/meritous?style=for-the-badge)
[![Codecov](https://img.shields.io/codecov/c/github/errant/meritous?style=for-the-badge)](https://app.codecov.io/github/errant/meritous)
[![Code Climate maintainability](https://img.shields.io/codeclimate/maintainability/errant/meritous?style=for-the-badge)](https://codeclimate.com/github/errant/meritous)
# Meritous
Meritous is an absurdly simply approach to "Models" in Python.
It came about because there is no modern, framework agnostic approach to modelling data.
On the face of it the usage is very trivial; but the intent is that Meritous is a building block for more complex data models. Essentially, it provides a simple Model class which can contain data to be used in Python applications. It then sets out a standard practice for transforming that data for storage or transport.
- [Documentation](https://meritous.readthedocs.io/en/latest/)
## Installation
```bash
pip install meritous
```
## Basic Usage
```python
from meritous.core import Model
from meritous.core.properties import UUIDProperty, StrProperty, DateProperty
from datetime import date
class EventModel(Model):
_schema = {
"id" : UUID4Property(),
"title" : StrProperty(),
"date" : DateProperty(),
"description" : StrProperty(),
}
event = EventModel()
event.title = 'Sample Event'
event.date = date.fromisoformat('2023-01-10')
print(event.id)
print(event.title)
print(event.date)
```
Raw data
{
"_id": null,
"home_page": null,
"name": "meritous",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "model",
"author": null,
"author_email": "Tom Morton <tom@errant.me.uk>",
"download_url": "https://files.pythonhosted.org/packages/26/c9/0daf61ef116cd2f7ff459889a04a237f1908855a4a180c5a974c915f0fe7/meritous-1.2.2.tar.gz",
"platform": null,
"description": "[![PyPI](https://img.shields.io/pypi/v/meritous?style=for-the-badge)](https://pypi.org/project/meritous/)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/meritous?style=for-the-badge)\n![PyPI - License](https://img.shields.io/pypi/l/meritous?style=for-the-badge)\n[![Codecov](https://img.shields.io/codecov/c/github/errant/meritous?style=for-the-badge)](https://app.codecov.io/github/errant/meritous)\n[![Code Climate maintainability](https://img.shields.io/codeclimate/maintainability/errant/meritous?style=for-the-badge)](https://codeclimate.com/github/errant/meritous)\n\n# Meritous\n\n\nMeritous is an absurdly simply approach to \"Models\" in Python.\n\nIt came about because there is no modern, framework agnostic approach to modelling data.\n\nOn the face of it the usage is very trivial; but the intent is that Meritous is a building block for more complex data models. Essentially, it provides a simple Model class which can contain data to be used in Python applications. It then sets out a standard practice for transforming that data for storage or transport.\n\n- [Documentation](https://meritous.readthedocs.io/en/latest/)\n\n## Installation\n\n```bash\npip install meritous\n```\n\n## Basic Usage\n\n```python\nfrom meritous.core import Model\nfrom meritous.core.properties import UUIDProperty, StrProperty, DateProperty\n\nfrom datetime import date\n\nclass EventModel(Model):\n\n _schema = {\n \"id\" : UUID4Property(),\n \"title\" : StrProperty(),\n \"date\" : DateProperty(),\n \"description\" : StrProperty(),\n }\n\n\nevent = EventModel()\nevent.title = 'Sample Event'\nevent.date = date.fromisoformat('2023-01-10')\nprint(event.id)\nprint(event.title)\nprint(event.date)\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "Simple Python Models",
"version": "1.2.2",
"project_urls": {
"GitHub": "https://github.com/errant/meritous/",
"Home": "https://meritous.readthedocs.io/en/latest/"
},
"split_keywords": [
"model"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "13e67fd440bd64e0164210a9d0041306b14876f20005bbf9fa5a233565d4c302",
"md5": "bfc2b23bd11547480a9d935b26eca8c3",
"sha256": "2ca97260bd1a8360da881b38e602b73b32b85afaace16334f2334be3ecdda99a"
},
"downloads": -1,
"filename": "meritous-1.2.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bfc2b23bd11547480a9d935b26eca8c3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 6923,
"upload_time": "2024-07-31T05:26:31",
"upload_time_iso_8601": "2024-07-31T05:26:31.040129Z",
"url": "https://files.pythonhosted.org/packages/13/e6/7fd440bd64e0164210a9d0041306b14876f20005bbf9fa5a233565d4c302/meritous-1.2.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "26c90daf61ef116cd2f7ff459889a04a237f1908855a4a180c5a974c915f0fe7",
"md5": "4100d14c180527f8d4c404b4e0bb4e78",
"sha256": "690a13c1fc47c791d1a40b6f508be929dfc1b7cbfd89801b5f10a6eecd4afb21"
},
"downloads": -1,
"filename": "meritous-1.2.2.tar.gz",
"has_sig": false,
"md5_digest": "4100d14c180527f8d4c404b4e0bb4e78",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 14727,
"upload_time": "2024-07-31T05:26:32",
"upload_time_iso_8601": "2024-07-31T05:26:32.587134Z",
"url": "https://files.pythonhosted.org/packages/26/c9/0daf61ef116cd2f7ff459889a04a237f1908855a4a180c5a974c915f0fe7/meritous-1.2.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-31 05:26:32",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "errant",
"github_project": "meritous",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "meritous"
}