Skip to main content

A library to con*py*gure little projects :)

Project description

Conpygure

A library to conpygure little projects :)

Conpygure is a library that eases the burden of configuring little python projects. Configurator objects are classes defined extending the conpygure.Conf class. Defining your configuration is as easy as:

>>> import conpygure as c
>>>
>>> class A(c.Conf):
>>>     option_one = "default_value"
>>>     option_two = 2
>>>
>>> @c.subconfig_of(A)
>>> class B(c.Conf):
>>>     option_three = ["ab", "cd"]
>>>     option_four = {"a":1}

To print your serialized configuration:

>>> print(c.dumps())

Dump and load your config to file:

>>> c.dump("/path/to/conf.toml")
>>> c.load("/path/to/conf.toml")

Serializers just need to define dumps and loads methods:

>>> import json
>>> c.serializer = json

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

conpygure-0.1.0.tar.gz (2.9 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