meritous


Namemeritous JSON
Version 1.2.1 PyPI version JSON
download
home_pageNone
SummarySimple Python Models
upload_time2024-04-20 09:58:02
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseNone
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/0c/af/4e00b178b88bc28e5978309d10667fdb3dd8bb600e0b9d09dba829a5d21d/meritous-1.2.1.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.1",
    "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": "64ffa724194ac18f76340b28a7b6b4e0c130dfcaffcfa09a04a6821445a9fb1b",
                "md5": "76a2d406f9f739531569b5956e76dc3f",
                "sha256": "3aef8d6919b15591797d78a9ba32d7a01bc399c458de08a1d055a9814c6de6f3"
            },
            "downloads": -1,
            "filename": "meritous-1.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "76a2d406f9f739531569b5956e76dc3f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 6869,
            "upload_time": "2024-04-20T09:57:59",
            "upload_time_iso_8601": "2024-04-20T09:57:59.939455Z",
            "url": "https://files.pythonhosted.org/packages/64/ff/a724194ac18f76340b28a7b6b4e0c130dfcaffcfa09a04a6821445a9fb1b/meritous-1.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "0caf4e00b178b88bc28e5978309d10667fdb3dd8bb600e0b9d09dba829a5d21d",
                "md5": "a0955bf4e7b6986ac03db66143b1f5b9",
                "sha256": "c6a867a69b7ccdd2826c87e6d7f71c446635303720fecf192ca2c405113d65f0"
            },
            "downloads": -1,
            "filename": "meritous-1.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "a0955bf4e7b6986ac03db66143b1f5b9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 14670,
            "upload_time": "2024-04-20T09:58:02",
            "upload_time_iso_8601": "2024-04-20T09:58:02.207462Z",
            "url": "https://files.pythonhosted.org/packages/0c/af/4e00b178b88bc28e5978309d10667fdb3dd8bb600e0b9d09dba829a5d21d/meritous-1.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-20 09:58:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "errant",
    "github_project": "meritous",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "meritous"
}
        
Elapsed time: 0.22695s