Skip to main content

Data-Modeling for User Interfaces

Project description
  • Powered by Python 3 Data Classes.
  • 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.


pip install uiclasses

Basic Usage

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])



  • 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

Download files

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

Source Distribution

uiclasses-2.4.0.tar.gz (16.6 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page