Skip to main content

iommi is a high level framework built on django

Project description

https://travis-ci.org/TriOptima/iommi.svg?branch=master https://codecov.io/gh/TriOptima/iommi/branch/master/graph/badge.svg https://repl.it/badge/github/boxed/iommi-repl.it

iommi is a Django-based framework that magically create pages, forms and tables with advanced out-of-the-box functionality based on your applications models - without sacrificing flexibility and control.

Major features:

  • A system to project django model definitions into more high level definitions

  • Forms: view models, data validation, and parsing

  • Queries: filtering lists/query sets

  • Tables: view models for lists/query sets, html tables, and CSV reports

  • Pages: compose pages from parts like forms, tables and html fragments

All the components are written with the same philosophy of:

  • Everything has a name

  • Traversing a namespace is done with __ when . can’t be used in normal python syntax

  • Callables for advanced usage, values for the simple cases

  • Late binding

  • Declarative/programmatic hybrid API

  • Prepackaged commonly used patterns (that can still be customized!)

  • Single point customization with no boilerplate

  • Escape hatches included

See philosophy for explanations of all these.

Example:

class IndexPage(Page):
    title = html.h1('Supernaut')
    welcome_text = 'This is a discography of the best acts in music!'

    artists = Table(auto__model=Artist, page_size=5)
    albums = Table(
        auto__model=Album,
        page_size=5,
    )
    tracks = Table(auto__model=Album, page_size=5)


urlpatterns = [
    path('', IndexPage().as_view()),
]

This creates a page with three separate tables, a header and some text:

docs/README-screenshot.png

For more examples, see the examples project.

Usage

See usage.

Running tests

We use hammett for tests, so pip install hammett then run hammett.

There’s a make test-live target for running tests interactively. You first need to pip install watchdog pyyaml argh.

For running the full tests on all supported environments: install tox then make test-all.

License

BSD

Documentation

https://docs.iommi.rocks

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

iommi-1.0.2.tar.gz (77.9 kB view details)

Uploaded Source

File details

Details for the file iommi-1.0.2.tar.gz.

File metadata

  • Download URL: iommi-1.0.2.tar.gz
  • Upload date:
  • Size: 77.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.7

File hashes

Hashes for iommi-1.0.2.tar.gz
Algorithm Hash digest
SHA256 39e0ae8d717a8be8704dc239d4299cc8195422cf1a909c56a9f7649cea5e8e3b
MD5 b202ee088b16bde301aa805f8d96e357
BLAKE2b-256 cf2de7fced3814b403b148fc9b1fafc58917963d5bd484277e705bf1dfbe4610

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page