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

Usage

from flaskext.yamlconfig import AppYAMLConfig
AppYAMLConfig(app, "main.yaml")

or

from flaskext.yamlconfig import install_yaml_config
from flaskext.yamlconfig import AppYAMLConfig

class MyConfig(AppYAMLConfig):
    def configure_mysection(self, content):
        for item in content:
            ....

yaml_config = install_yaml_config(app, MyConfig)
yaml_config("main.yaml")

Register a renderers

from flask import current_app
from flaskext.yamlconfig import Renderer, register_renderer
from werkzeug.wrappers import BaseResponse

class JsonRenderer(Renderer):
    def render(self, view_result):
        return current_app.response_class(json.dumps(view_result,
            indent=None if request.is_xhr else 2), mimetype='application/json')

register_renderer('json', JsonRenderer)

Config file sample

index:
    view: views.index.index
    url:
        - /
        - /page/<int:page>
    renderer: actions/index/index.html

blog_edit:
    view: views.blog.edit_blog
    url: /blog/edit/<blog_url>
    renderer: actions/blog/edit.html
    methods:
        - GET
        - POST
    context:
        w_group: empty

ajaxBlogJoin:
    view: views.blog.ajax_blog_join
    url: /ajax/blogjoin/<int:blog_id>
    methods:
        - POST
    renderer: json

View example

def index(context, request, page=1):
    '''Main page
    '''
    return dict(pages = Pager(Topic.all(), page))
Release History

Release History

0.0.3

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.0.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.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
Flask-YAMLConfig-0.0.3.zip (7.1 kB) Copy SHA256 Checksum SHA256 Source Jan 28, 2011

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS 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