Skip to main content

Python library to parse config files that require indexing

Project description

A class to parse configuration files that require indexing.
To use this parser to its full potential create config files in the
following format for example:
server_1 = somename
ip_1 = 1.2.3.4

server_2 = someothername
ip_2 = 4.3.2.1

universal_key = something universal

You keep raising the indexed number as much as you want.
The way to use this library is to pick a config definition
that you know will be different for each index. In this case I would
use "server" as the "defining key" and that would make each server name
into its own dictionary and the key/value pairs for it would be the config
key/values that are associated with the same index number.

There are 3 lists that are created on each parse:
keys = this is a list of the keys that are not indexed
(used for universal purposes)
index_keys = this is a list of all the keys that are indexed
(this is generated based on the defining key)
all_keys = this is a list of all the keys combined

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

IndexConfigParser-1.0.tar.gz (1.8 kB view hashes)

Uploaded Source

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