Skip to main content

TOML file reader - python module to read/write toml configuration files

Project description

TOML file reader - python module to read/write toml configuration files

  • Files can be loaded and saved completed with comments and formating

  • Configuration files can be templated and values validated on load or value changes

Two interaces:

Simple dictionaries {key: value}
  • data dictionary with nested dictionary with {key: value}

  • template dictionary with comments/type information

  • template allows type, min/max and other validators to be set and stores comments

  • use load/save functions to open/save to file.

Config object interface:
  • allows seamless use of template/data via custom dictlike interface

  • use cfg = Config(filename) to open

  • access subtables/keys via exteneded key indexing e.g. cfg[‘Table1.subtable.key’] = 1

  • if a template has been set any value will be validated when it is set.

  • if a template has been set any missing values will return the defualt and be created.

  • use cfg.save(filename) to save

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

toml_file-1.0.7.tar.gz (22.1 kB view details)

Uploaded Source

Built Distribution

toml_file-1.0.7-py2.py3-none-any.whl (23.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file toml_file-1.0.7.tar.gz.

File metadata

  • Download URL: toml_file-1.0.7.tar.gz
  • Upload date:
  • Size: 22.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for toml_file-1.0.7.tar.gz
Algorithm Hash digest
SHA256 9a10abf67331ba3d52bff2c65474a7f1bccf398aa236757e8af14b528bca566f
MD5 a10cff40f65659e4bc0fb88f23403403
BLAKE2b-256 c65789a7930cbf5d749fbc8bf16db79f9405b649c5f5015e33bfb8467d90b1cc

See more details on using hashes here.

File details

Details for the file toml_file-1.0.7-py2.py3-none-any.whl.

File metadata

  • Download URL: toml_file-1.0.7-py2.py3-none-any.whl
  • Upload date:
  • Size: 23.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for toml_file-1.0.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 69b9409aa04556a5ee78ae1eae4ff1c3d2f77cb0e4fcc10a440da30afff780bd
MD5 de1c1a12ca9e3bce07fc9b44f75041e5
BLAKE2b-256 e6c7312e007e9da1ba89a0d521cdd52d24c68469b559fb09336d19c4520f6ee6

See more details on using hashes here.

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