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.1.tar.gz (21.9 kB view details)

Uploaded Source

Built Distribution

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

toml_file-1.0.1-py2.py3-none-any.whl (22.5 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: toml_file-1.0.1.tar.gz
  • Upload date:
  • Size: 21.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for toml_file-1.0.1.tar.gz
Algorithm Hash digest
SHA256 482e4b292f3eff846392adfb22727c2b3fcc88a8b678f540469699e0b7db7cbb
MD5 950bf13cf4e9ea3a3e62831875773ae7
BLAKE2b-256 87168afb98b6dc019ab945f5f9057d650b6019720b5a3bbd67f01158c131d19d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: toml_file-1.0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 22.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for toml_file-1.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 309d1a26b0121f02f8a9049f00fe8523e3a47db82e1fb5972959721bd071c378
MD5 77d5f7030d2f91e6dcc2cbc78a39828e
BLAKE2b-256 83bc62a0a3128d35eb40a8461d1038bbeae8ee6719963bf2b0155bc27d6ab73e

See more details on using hashes here.

Supported by

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