This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

A little orm for config file, do transformation to/from python object

Examples

example.ini:

[Section1]
bool_field = True
int_field = 123
#int_default_field = 567
float_field = 456.7
string_field = hello, world

[Section2]
ip_field = 127.0.0.1
ipport_field = 127.0.0.1:12345
ipport_list_field = 127.0.0.1:12345, 127.0.0.2:12346

    [Section3]
    choice_field = release

example.py:

from ormconfig import *
import sys

class MyConfig(Config):
    class Section1(Section):
        bool_field = BoolField()
        int_field = IntField()
        int_default_field = IntField(default='default value 6')
        float_field = FloatField()
        string_field = StringField()
    class Section2(Section):
        ip_field = IPField()
        ipport_field = IPPortField()
        ipport_list_field = ListField(IPPortField())
    class Section3(Section):
                    choice_field = ChoiceField(StringField(), ['debug', 'release'], 'debug')

try:
    config = MyConfig.load('example.ini')
except Error as e:
    print('Failed to load file: %s' % str(e))
    sys.exit(1)

print(config.Section1.bool_field)
print(config.Section1.int_field)
print(config.Section1.int_default_field)
print(config.Section1.float_field)
print(config.Section1.string_field)
print(config.Section2.ip_field)
print(config.Section2.ipport_field)
print(config.Section2.ipport_list_field)
    print(config.Section3.choice_field)

output:

True
123
default value 6
456.7
hello, world
127.0.0.1
('127.0.0.1', 12345)
[('127.0.0.1', 12345), ('127.0.0.2', 12346)]
    release
Release History

Release History

0.1.3

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

0.1.2

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

0.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

0.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

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
ormconfig-0.1.3.zip (7.0 kB) Copy SHA256 Checksum SHA256 Source Feb 2, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development 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