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.8.tar.gz (22.4 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.8-py2.py3-none-any.whl (23.5 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: toml_file-1.0.8.tar.gz
  • Upload date:
  • Size: 22.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for toml_file-1.0.8.tar.gz
Algorithm Hash digest
SHA256 4de6d125122e405795d0428481dd10c82baec4a5bfde67ed257d531dc520d421
MD5 e9ca5cb2600f86930535249533bd05e0
BLAKE2b-256 d1af57371c761f70fd7213de25954025da91d1cd9fcfcdcb3156fd18a1ab11aa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: toml_file-1.0.8-py2.py3-none-any.whl
  • Upload date:
  • Size: 23.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for toml_file-1.0.8-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 81e55cdfc7ece3ff6e48a691329db25b3d19262e6cb3c991b1a77c0f6cf591f8
MD5 bc417604ba45793e51168089c5e8605e
BLAKE2b-256 3fb34f2d34b849e9eff2e84c9d0f35318eedf6d5e92f511015c1723cf981cdeb

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