uiclasses


Nameuiclasses JSON
Version 3.0.0 PyPI version JSON
download
home_pagehttps://github.com/gabrielfalcao/uiclasses
SummaryData-Modeling for User Interfaces
upload_time2023-08-04 22:12:22
maintainerGabriel Falcão
docs_urlNone
authorGabriel Falcao
requires_python>=3.6
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            UIClasses - Data-Modeling for User Interfaces
##############################################


.. image:: https://img.shields.io/pypi/dm/uiclasses
   :target: https://pypi.org/project/uiclasses

.. image:: https://img.shields.io/codecov/c/github/gabrielfalcao/uiclasses
   :target: https://codecov.io/gh/gabrielfalcao/uiclasses

.. image:: https://github.com/gabrielfalcao/uiclasses/actions/workflows/main.yml/badge.svg
   :target: https://github.com/gabrielfalcao/uiclasses/actions/workflows/main.yml

.. image:: https://img.shields.io/readthedocs/uiclasses
   :target: https://uiclasses.readthedocs.io/

.. image:: https://img.shields.io/github/license/gabrielfalcao/uiclasses?label=Github%20License
   :target: https://github.com/gabrielfalcao/uiclasses/blob/master/LICENSE

.. image:: https://img.shields.io/pypi/v/uiclasses
   :target: https://pypi.org/project/uiclasses

.. image:: https://img.shields.io/pypi/l/uiclasses?label=PyPi%20License
   :target: https://pypi.org/project/uiclasses

.. image:: https://img.shields.io/pypi/format/uiclasses
   :target: https://pypi.org/project/uiclasses

.. image:: https://img.shields.io/pypi/status/uiclasses
   :target: https://pypi.org/project/uiclasses

.. image:: https://img.shields.io/pypi/pyversions/uiclasses
   :target: https://pypi.org/project/uiclasses

.. image:: https://img.shields.io/pypi/implementation/uiclasses
   :target: https://pypi.org/project/uiclasses

.. image:: https://img.shields.io/snyk/vulnerabilities/github/gabrielfalcao/uiclasses
   :target: https://github.com/gabrielfalcao/uiclasses/network/alerts

.. image:: https://img.shields.io/github/v/tag/gabrielfalcao/uiclasses
   :target: https://github.com/gabrielfalcao/uiclasses/releases

- Powered by `Python 3 Data Classes <https://docs.python.org/3/library/dataclasses.html>`_.
- Objects optimized for user interfaces.
- Methods to traverse nested dicts, convert to and from json
- ModelList and ModelSet collections for robust manipulation of collections of models.
- No I/O happens in models.
- Collections can be easily cached to leverage responsive user interfaces.



Installation
============


.. code:: bash

   pip install uiclasses


Basic Usage
===========

.. code:: python

   from uiclasses import Model


   class BlogPost(Model):
       id: int
       title: str
       body: str


   post1 = BlogPost({"id": 1, "title": "title 1", "body": "body 1", "wimsical_extra_field": "lala land"})
   post2 = BlogPost(id=2, title="title 2", body="body 2", extradata='stored but invisible')

   published = BlogPost.List([post1, post2])

   print(published.format_pretty_table())


.. image:: https://github.com/gabrielfalcao/uiclasses/raw/master/docs/source/_static/screenshot-blog-list-pretty-table.png


.. code:: python

   print(published.format_robust_table())

.. image:: https://github.com/gabrielfalcao/uiclasses/raw/master/docs/source/_static/screenshot-blog-list-robust-table.png



Notes:
======


- This is not designed to be fast, when adding data to models their
  types might cast and validated, which is costly.
  - filtering collections by string values cause glob match

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/gabrielfalcao/uiclasses",
    "name": "uiclasses",
    "maintainer": "Gabriel Falc\u00e3o",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "gabriel@nacaolivre.org",
    "keywords": "",
    "author": "Gabriel Falcao",
    "author_email": "gabriel@nacaolivre.org",
    "download_url": "https://files.pythonhosted.org/packages/b7/93/c1400221f33224f8d5081a5a58ad523a5c8688fedba689297eaa9c2bf352/uiclasses-3.0.0.tar.gz",
    "platform": null,
    "description": "UIClasses - Data-Modeling for User Interfaces\n##############################################\n\n\n.. image:: https://img.shields.io/pypi/dm/uiclasses\n   :target: https://pypi.org/project/uiclasses\n\n.. image:: https://img.shields.io/codecov/c/github/gabrielfalcao/uiclasses\n   :target: https://codecov.io/gh/gabrielfalcao/uiclasses\n\n.. image:: https://github.com/gabrielfalcao/uiclasses/actions/workflows/main.yml/badge.svg\n   :target: https://github.com/gabrielfalcao/uiclasses/actions/workflows/main.yml\n\n.. image:: https://img.shields.io/readthedocs/uiclasses\n   :target: https://uiclasses.readthedocs.io/\n\n.. image:: https://img.shields.io/github/license/gabrielfalcao/uiclasses?label=Github%20License\n   :target: https://github.com/gabrielfalcao/uiclasses/blob/master/LICENSE\n\n.. image:: https://img.shields.io/pypi/v/uiclasses\n   :target: https://pypi.org/project/uiclasses\n\n.. image:: https://img.shields.io/pypi/l/uiclasses?label=PyPi%20License\n   :target: https://pypi.org/project/uiclasses\n\n.. image:: https://img.shields.io/pypi/format/uiclasses\n   :target: https://pypi.org/project/uiclasses\n\n.. image:: https://img.shields.io/pypi/status/uiclasses\n   :target: https://pypi.org/project/uiclasses\n\n.. image:: https://img.shields.io/pypi/pyversions/uiclasses\n   :target: https://pypi.org/project/uiclasses\n\n.. image:: https://img.shields.io/pypi/implementation/uiclasses\n   :target: https://pypi.org/project/uiclasses\n\n.. image:: https://img.shields.io/snyk/vulnerabilities/github/gabrielfalcao/uiclasses\n   :target: https://github.com/gabrielfalcao/uiclasses/network/alerts\n\n.. image:: https://img.shields.io/github/v/tag/gabrielfalcao/uiclasses\n   :target: https://github.com/gabrielfalcao/uiclasses/releases\n\n- Powered by `Python 3 Data Classes <https://docs.python.org/3/library/dataclasses.html>`_.\n- Objects optimized for user interfaces.\n- Methods to traverse nested dicts, convert to and from json\n- ModelList and ModelSet collections for robust manipulation of collections of models.\n- No I/O happens in models.\n- Collections can be easily cached to leverage responsive user interfaces.\n\n\n\nInstallation\n============\n\n\n.. code:: bash\n\n   pip install uiclasses\n\n\nBasic Usage\n===========\n\n.. code:: python\n\n   from uiclasses import Model\n\n\n   class BlogPost(Model):\n       id: int\n       title: str\n       body: str\n\n\n   post1 = BlogPost({\"id\": 1, \"title\": \"title 1\", \"body\": \"body 1\", \"wimsical_extra_field\": \"lala land\"})\n   post2 = BlogPost(id=2, title=\"title 2\", body=\"body 2\", extradata='stored but invisible')\n\n   published = BlogPost.List([post1, post2])\n\n   print(published.format_pretty_table())\n\n\n.. image:: https://github.com/gabrielfalcao/uiclasses/raw/master/docs/source/_static/screenshot-blog-list-pretty-table.png\n\n\n.. code:: python\n\n   print(published.format_robust_table())\n\n.. image:: https://github.com/gabrielfalcao/uiclasses/raw/master/docs/source/_static/screenshot-blog-list-robust-table.png\n\n\n\nNotes:\n======\n\n\n- This is not designed to be fast, when adding data to models their\n  types might cast and validated, which is costly.\n  - filtering collections by string values cause glob match\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Data-Modeling for User Interfaces",
    "version": "3.0.0",
    "project_urls": {
        "Documentation": "https://uiclasses.readthedocs.io/en/latest/",
        "Homepage": "https://github.com/gabrielfalcao/uiclasses",
        "Issue Tracker": "https://github.com/gabrielfalcao/uiclasses/issues",
        "Source Code": "https://github.com/gabrielfalcao/uiclasses",
        "Test Coverage": "https://codecov.io/gh/gabrielfalcao/uiclasses"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b793c1400221f33224f8d5081a5a58ad523a5c8688fedba689297eaa9c2bf352",
                "md5": "ed86d4a21dc68fd5354c5eeb835c3a60",
                "sha256": "78567a63e491c8d18c60310a8e47404a966be6c723c03f48e1b9b48814a8a0d6"
            },
            "downloads": -1,
            "filename": "uiclasses-3.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "ed86d4a21dc68fd5354c5eeb835c3a60",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 17233,
            "upload_time": "2023-08-04T22:12:22",
            "upload_time_iso_8601": "2023-08-04T22:12:22.585288Z",
            "url": "https://files.pythonhosted.org/packages/b7/93/c1400221f33224f8d5081a5a58ad523a5c8688fedba689297eaa9c2bf352/uiclasses-3.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-04 22:12:22",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "gabrielfalcao",
    "github_project": "uiclasses",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "lcname": "uiclasses"
}
        
Elapsed time: 0.16394s