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

This is a Buildout recipe, that can export buildout configuration to JSON file. Later this exported file can be used to get exported settings and use them in your project.

Buildout provides extensive functionality for managing configuration, but does not have tools to use this configuration anywhere else outside Buildout itself. This recipe exports all settings to JSON file, allowing to use configuration parameters outside Buildout.

Usage

[buildout]
parts = settings

[settings]
recipe = exportrecipe
website-url = http://example.com/

This will generate settings.json file in your buildout directory with following content:

{
  "website-url": "http://localhost:8000/"
}

exportrecipe will export all parameters from recipe’s section, except recipe parameter.

Now you can use this file for example in your settings.py:

import json

with open('settings.json') as f:
    settings = json.load(f)

WEBSITE_URL = settings['website-url']

Also you can use a helper:

import exportrecipe

config = exportrecipe.load('settings.json')

WEBSITE_URL = config.website_url

It is possible to change destination of exported file using destination option:

[buildout]
parts = settings

[settings]
recipe = exportrecipe
destination = somewhereelse.json
website-url = http://example.com/

This will generate somewhereelse.json file with following content:

{
  "destination": "somewhereelse.json",
  "website-url": "http://localhost:8000/"
}

Change History

0.2 (2015-05-17)

  • Initial public release.
Release History

Release History

0.2

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

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
exportrecipe-0.2-py2.py3-none-any.whl (4.6 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel May 17, 2015
exportrecipe-0.2.tar.gz (2.7 kB) Copy SHA256 Checksum SHA256 Source May 17, 2015

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