Skip to main content

Dot notation for configuration files.

Project description


This package is a simple layer on top of the built-in configparser module.
The advantage of dotini is the option of using dot notation to access
settings in a configuration file, provided the settings and section names are
valid variable names. This is aesthetically pleasing.

With the dotini module imported, use the read() function to parse a config-
uration file. This is done using configparser, for more details regarding
file format and rules, see the official documentation for configparser.

Once the configuration file has been read, it’s settings can be accessed with
dot notation for settings with valid variable names. Settings without valid
variable names can still be accessed with square brackets.

import dotini
settings =‘settings.ini’)

As mentioned previously, to be able to use the dot notation access, settings
should be made with variable safe names.

Setting values are read in as strings, and there is no automatic type conversion
when they are stored or accessed. Type conversion is up to you!

Example Configuration File
name = ‘thomas’
pass = ‘samoht’

speed = 10
cores = 4

Project details

Download files

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

Files for dotini, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size dotini-0.0.1-py3-none-any.whl (3.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size dotini-0.0.1.tar.gz (2.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page