Skip to main content
Unittests Badge Docs Badge

multilevel_py

Multilevel_py is a library that simplifies the construction of classification hierarchies over more than two levels. The framework depends on python3 only and implements a “deep instantiation” mechanism using pythons metaprogramming facilities. In academia, the addressed topic is also discussed under the term “Multilevel (Meta-) Modelling”. Since there is no corresponding framework in the python community until this point, multilevel_py was built to fill this gap.

Installing

Install and update using pip:

# Python only
pip install multilevel_py

# with graphical syntax
pip install multilevel_py[viz]

Note that for using the graphical syntax, an installation of the underlying visualisation engine graphviz is required.

A Simple Example

The following code constructs a classification structure that spans three levels.

from multilevel_py.constraints import is_int_constraint, is_str_constraint
from multilevel_py.core import create_clabject_prop, Clabject

Breed = Clabject(name="Breed")
yearReg = create_clabject_prop(n="yearReg", t=1, f=0, i_f=True, c=[is_int_constraint])
age = create_clabject_prop(n="age", t=2, f=0, i_f=True, c=[is_int_constraint])
Breed.define_props([yearReg, age])

Collie = Breed(name="Collie", init_props={"yearReg": 1888})
lassie = Collie(name="Lassie", init_props={"age": 7}, declare_as_instance=True)

Visualisation

Using the viz module, the following graph can be rendered for the previous example:

Visulisation of the collie example

Download files

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

Source Distribution

multilevel_py-0.3.0.tar.gz (25.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

multilevel_py-0.3.0-py3-none-any.whl (27.4 kB view details)

Uploaded Python 3

File details

Details for the file multilevel_py-0.3.0.tar.gz.

File metadata

  • Download URL: multilevel_py-0.3.0.tar.gz
  • Upload date:
  • Size: 25.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for multilevel_py-0.3.0.tar.gz
Algorithm Hash digest
SHA256 a9d5e6ee9b8f4918f42dc3d7e5aa76f7388ed273e66cd78e9afc74f819a0851c
MD5 d4b8260f5fbbb812e29f549d45ae830b
BLAKE2b-256 6b4295977d1ac4e0a45295bbda7cd4ed3a379c6c629cb63f92d5bec70506cff3

See more details on using hashes here.

File details

Details for the file multilevel_py-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: multilevel_py-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 27.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for multilevel_py-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0413ac0c4aef0baf8c7dd2120e7100f8cb1d3dd568b7cae16934d0c5c6801fd2
MD5 118e858b7c199152f35071efc79160c2
BLAKE2b-256 30bac3e3ecf2aa7cab4d307765bceed5a7a6d18f514b5477baaf832c3f6ce59f

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 files

0.2.0

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page