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
|Build Status| |Coverage Status|

lazyconf
========

lazyconf is an insultingly simple tool for configuring python
applications.

Dependencies
------------

- Python 2.7

Usage
-----

The basic idea is that you run ``lazyconf configure`` in your
**project** directory:

::

lazyconf configure

Follow the onscreen instructions to do the initial configuration. This
does the following:

- Creates a ``.lazy/`` directory inside the current directory.
- Generates a schema file (``.lazy/lazy.schema.json``), and a data file
(``.lazy/lazy.json``).
- Creates a ``.gitignore`` file inside ``.lazy/`` so that your
configured settings (which may contain sensitive information) are
never committed to git.

You are then safe to commit the .lazy folder to git, which will not
contain any sensitive information. The next thing to do is update your
schema file with all of the settings that you want to include in your
configuration.

Schema Files
------------

The schema file located in ``.lazy/lazy.schema.json`` is the way
lazyconf knows which questions to ask you, and what kind of answers to
expect. The schema file follows the following format:

::

```
{
"example_section" : {
"example_option" : "",
"string_with_default" : "default",
"example_int" : 5,
"example_bool" : false,
"example_select" : ""
},

"example_optional_section" : {
"_enabled":false,
"optional_option" : "foobar"
},

"_internal": {
"labels": {
"example_section" : "Example Section Label",
"example_section.example_int" : "Example suboption label"
}

"selects": {
"example_section.exmple_select" : {
"option1" : "value1",
"option2" : "value2",
"option3" : "value3"
}
}
}
}
```

Sections
~~~~~~~~

All options to configure are held within sections. A section is a JSON
object where the key is the name of the section. In the above example,
there are two sections: ``example_section`` and
``example_optional_section``.

Optional Sections
^^^^^^^^^^^^^^^^^

To make a section optional, include a key/value pair inside the section
with the key ``"_enabled"``, and a default boolean value. This will let
the user skip over that section if it is not necessary to be configured.

``"_internal"``
~~~~~~~~~~~~~~~

``"_internal"`` is a JSON object that contains the following two JSON
objects:

- ``"labels"``: This object consists of key/value pairs which define
labels to show the user running the configuration. For example, if
you had a section called ``db``, and a string in that section called
``user``, you would use ``"db.user" : "Database User"`` to assign the
label 'Database User' to that string.

- ``"selects"``: This object consists of several objects which define
'selects', i.e. a way for the user to only be able to choose from a
list of predetermined values. For example, if you had a section
called ``db``, and a string in that section called ``engine``, you
could use the following object to allow the user to select from a
list of values relating to the database engine you might happen to be
using:

::

"db.engine": {
"postgres": "django.db.backends.postgresql_psycopg2",
"mysql": "django.db.backends.mysql"
}

Keywords
~~~~~~~~

``"_internal"`` and ``"_enabled"`` are keywords and should not be used
as option names.

Using the data
--------------

To use the configuration generated by lazyconf, you can either use the
command line tool ``lazyconf``, i.e.

::

lazyconf get -k db.user
>fareed

Or, you can include it in a Python file, and use the 'load' function to
load any existing configuration:

::

>>> import lazyconf
>>> l = lazyconf.Lazyconf().load()
>>> l.get('db.engine')
'django.db.backends.postgresql_psycopg2'

If the python file loading lazyconf is not in the same folder as
``.lazy/``, you can point it at ``.lazy/`` manually:

::

>>> import lazyconf
>>> l = lazyconf.Lazyconf().load('home/fareed/.lazy/')
>>> l.get('db.engine')
'django.db.backends.postgresql_psycopg2'

|Bitdeli badge|

.. |Build Status| image:: https://travis-ci.org/fmd/lazyconf.png?branch=master
:target: https://travis-ci.org/fmd/lazyconf
.. |Coverage Status| image:: https://coveralls.io/repos/fmd/lazyconf/badge.png?branch=master
:target: https://coveralls.io/r/fmd/lazyconf?branch=master
.. |Bitdeli badge| image:: https://d2weczhvl823v0.cloudfront.net/fmd/lazyconf/trend.png
:target:
Release History

Release History

0.5.5

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

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

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

0.4.6

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

0.4.4

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

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

0.3.9

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

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
lazyconf-0.5.5.tar.gz (14.3 kB) Copy SHA256 Checksum SHA256 Source Feb 18, 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