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

direg lets you maintain arbitrary registry data (in the form of python dictionaries that can be “merged” in a logical way (think: global config -vs- user config). With a small amount of work, it is possible to replace hardcoded values with easily-maintainable and flexible registry entries.

Suppose we have a file at /my/path/registry.py with the following contents.

data = {
    'one.Foo.meth.somevar': 26804,
    'one.Foo.somevar': 24742,
    'one.myfunc.somevar': 16834,
    'one.outer.inner.somevar': 7678,
}

Then, in some module one, we can do the following:

one.py

from direg import get_value, registries
# Load the registry with the above data. Note that this could take place in another module and could include an
# arbitrary number of registry files.
registries.append('/my/path/registry.py')

class Foo:
    somevar = get_value('somevar')  # will be 24742
    def meth(self):
        return get_value('somevar')

f = Foo()
f.meth()  # will return 26804
f.somevar  # 24742
Foo.somevar  # also 24742

def myfunc():
    somevar = get_value('somevar')
    return somevar

myfunc()  # will be 16834
Release History

Release History

0.2.6

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

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
direg-0.2.6.zip (7.6 kB) Copy SHA256 Checksum SHA256 Source Nov 27, 2014

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