Skip to main content

Class based tool that behaves like blueprints

Project description

Bundle

Class Bundle is similar to flasks Blueprint with one important difference - Bundle is a class, when blueprints are instances.

Thats all. Small example how it works:

from flask.ext.bundle import Bundle, expose

class News(Bundle):

    @expose('/', methods=['GET', 'POST'])
    def index(self):
        return 'Ok'

APIs

Based on bundle we have some helpers to build APIs in flask.ext.bundle.api.

bundle.utils

check_data

Decorator for views, get Trafaret instance. Will return errors dict and status 400 on error.

encode_result

Decorator for result encoding, gets list of encoders. Each encoder must implement two methods, mimes that returns MIME codes, and encode(self, data, mime=None) that encode data to response string.

APIBundle

Extensions to Bundle to make API explorable (TODO write more)

Project details


Release history Release notifications | RSS feed

This version

0.4

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Flask-Bundle-0.4.tar.gz (4.0 kB view details)

Uploaded Source

File details

Details for the file Flask-Bundle-0.4.tar.gz.

File metadata

  • Download URL: Flask-Bundle-0.4.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Flask-Bundle-0.4.tar.gz
Algorithm Hash digest
SHA256 3e43f0ee58a96fbeb87816f84e3efc3fc4b1d72983b57dc147191f23cae5da5a
MD5 79048e93dcbbe57d613805eeec22ce9f
BLAKE2b-256 fe3d949b34ad495d62fe00580df8614b75cbc9f466b988c9543536c0dbed3800

See more details on using hashes here.

Supported by

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