Skip to main content

Python library that simplifies parsing and creating Toml configuration files.

Project description

toml_config

Python library that simplifies parsing and creating Toml configuration files. Wrapper on toml

installation

To install a module run the command:

pip install toml_config

Using

To get started, import the module. Create an instance of the Config class by passing as a parameter the path to an existing file or the path where this file will be created.And then you can read parameters from the file and write parameters to the file.

Example. Creating a file and writing values.

main.py:

from toml_config.core import Config

my_config = Config('app.config.toml')
my_config.add_section('app').set(key='value',other_key=[1,2,3])

app.config.toml:

[app]
key = "value"
other_key = [ 1, 2, 3,]

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_config-0.1.3.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

toml_config-0.1.3-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file toml_config-0.1.3.tar.gz.

File metadata

  • Download URL: toml_config-0.1.3.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for toml_config-0.1.3.tar.gz
Algorithm Hash digest
SHA256 f8e6905193b9db4b5f05fe7cbaa03395f48b2f9e577f956cbb132391fb06ba1e
MD5 3d78f35a25a6489badf894d59f683825
BLAKE2b-256 03e39177b5e06f8a6d1f3639ee24c6e787cb6c235bcd3618c015c1fb31468615

See more details on using hashes here.

File details

Details for the file toml_config-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: toml_config-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for toml_config-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b8e0ed651d88862bee92229841f75b842600eb6ae35dcb6480730b9950d51220
MD5 84fbb696632155baf41725db49c0f836
BLAKE2b-256 ee1ca27df589a4819a8d49b948131bfdb055372849fcfb3879514ee28623c104

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