This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Project Description
A class to parse configuration files that require indexing.
This class returns a dictionary that you can call to retrieve items
from your config file.

To use this parser to its full potential create config files in the
following format for example:

(Example config file)

# Home server
server_1 = somename
ip_1 = 1.2.3.4
location_1 = san jose

# Remote server
server_2 = someothername
ip_2 = 4.3.2.1
location_2 = boston

# Universal configs
universal_key = something universal
my_username = kyle


You can 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

Examples:

import IndexConfigParser

(The following code will print the dictionaries of each index key)
icp = IndexConfigParser.IndexConfigParser("/home/kyle/config.cfg", "server")
for key in icp.index_keys:
print "The dictionary for %s is: " %key
print icp[key]

(The following is how to call a specific key in the index key dict)
icp = IndexConfigParser.IndexConfigParser("/home/kyle/config.cfg", "server")
var = "somename"
icp[var]["ip"]
(Using the example config file above this would return "1.2.3.4")
Release History

Release History

1.2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
IndexConfigParser-1.2.tar.gz (2.0 kB) Copy SHA256 Checksum SHA256 any Dumb Binary Jul 9, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting