Skip to main content

"""A basic application class which other applications can inherit."""

Project description

The psionapp package provides a basis for configuration and user definition.

The package exposes two classes: ApplicationClass and ApplicationUser.

ApplicationClass

An ApplicationClass object will be identified by an application id. You can instantiate a class object with the following parameters:

  • use_user_ini (bool). If True this will create a .ini file in the system appropriate config directory. Initially a file will be created for the current system user's user name. This will store user-level configuration values.

  • use_config_ini (bool). If True this will create a config.ini file in the system appropriate config directory. This will store application-level configuration values.

  • use_var_dir (bool). If True this will create an application id directory in the system appropriate var data directory.

  • user_class (ApplicationUser). Used in conjunction with use_user_ini. The ApplicationUser class will define the config parameters.

  • attributes (see Attribute definition)

ApplicationUser

An ApplicationUser class will be identified by a user name. It will define the attributes that will form that user's configuration values.

Attribute definition

Attibutes must be defined in the form:

attributes = {
    'string_data': ('general', 'string', 'abc'),
    'int_data': ('general', 'int', 2),
    'bool_data': ('display', 'bool', True),
    'float_data': ('display', 'float', 1.23456),
}

where the attributes dict key is the attribute name, and the three tuple values are:

  1. the section in the config file where the attribute will appear;
  2. the data type of the attribute;
  3. the default value of the attribute.

Version 0.0.0 - 30 July 2020

Created and uploaded


Version 0.0.1 - 1 August 2020

  • Added version and all
  • Added App level attributes
  • Added README

Project details


Download files

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

Source Distribution

psionapp-0.0.1.tar.gz (8.2 kB view hashes)

Uploaded Source

Built Distribution

psionapp-0.0.1-py3-none-any.whl (10.2 kB view hashes)

Uploaded Python 3

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