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 details)

Uploaded Source

File details

Details for the file conpygure-0.1.0.tar.gz.

File metadata

  • Download URL: conpygure-0.1.0.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.7.2

File hashes

Hashes for conpygure-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f1fdaae0041739e7eb8d2789b1ce9ee6416f838d691e6dbe32d9d263f19a3e11
MD5 f41f203926e91673d2bb752f57952426
BLAKE2b-256 373caf116c5dc6e8d2fc36c83e344d5f03d2a3bac655773face8e910d4b83eea

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page