{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "flask-endpoint\n==============\n\n![Build Image](https://travis-ci.org/rhyselsmore/flask-endpoint.svg?branch=master)\n\nAdaption of Flask Blueprints to form 'Endpoints', with a focus on the path and method of a resource.\n\nClass based views didn't cut it for me, so this is what I arrived at.\n\nGo from this:\n\n```\n>>> blueprint = Blueprint('users', __name__, url_prefix='/users')\n>>> @blueprint.route('/', method=['DELETE'])\n```\n\nto this:\n\n```\n>>> endpoint = Endpoint('users', '/users', __name__)\n>>> @endpoint.delete('/')\n```\n\nMakes sense for my purposes, and I can still include per-route decorators, which is where classed based views fell down for me. This makes an incredible amount of sense in a HTTP API implementation where you need fine-grained control. For example, in the event that you want to implement a 'lockdown' of your API, you can include a specific decorator for 'changing' endpoints.\n\n```\n>>> @endpoint.post()\n>>> @lockdown(severity=2)\n```\n\n# Installation\n\n```\n$ pip install flask-endpoint\n```\n\nOr if you prefer `easy-install`:\n\n```\n$ alias easy_install=\"pip install $1\"\n$ easy_install flask-redis\n```\n\n# Configuration\n\nNone (really!). Instead of running the following:\n\n```\n>>> from flask import Blueprint\n```\n\njust run:\n\n```\n>>> from flask_endpoint import Endpoint\n```\n\nand configure:\n\n```\n>>> endpoint = Endpoint('users', '/users', __name__)\n>>> @endpoint.post()\n>>> @endpoint.post('/url')\n>>> @endpoint.get()\n>>> @endpoint.get('/url')\n```\n\nThe package supports all of the methods available to flask (GET/POST/PUT/PATCH/DELETE/OPTIONS/HEAD).\n\nAll of the standard blueprint optional arguments will be passed through (sans url-prefix), which makes this fairly easy to adopt.\n\nWhen it comes time to register them, do as you would a Blueprint:\n\n```\n>>> app.register_blueprint(endpoint)\n```\n\n# Contribution\n\n1. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug. There is a Contributor Friendly tag for issues that should be ideal for people who are not very familiar with the codebase yet.\n2. Fork [the repository](https://github.com/rhyselsmore/flask-endpoint) on Github to start making your changes to the **master** branch (or branch off of it).\n3. Write a test which shows that the bug was fixed or that the feature works as expected.\n4. Send a pull request and bug the maintainer until it gets merged and published.\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "flask-endpoint", "package_url": "https://pypi.org/project/flask-endpoint/", "platform": "", "project_url": "https://pypi.org/project/flask-endpoint/", "project_urls": null, "release_url": "https://pypi.org/project/flask-endpoint/0.1/", "requires_dist": null, "requires_python": null, "summary": "", "version": "0.1" }, "last_serial": 1387098, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "7b0a421a6b6fc586f621910bf3c5a93b", "sha256": "33b303e66cb626f7d2655a262e427a5711db78613aa8f19c01df375460d766e7" }, "downloads": -1, "filename": "flask-endpoint-0.1.tar.gz", "has_sig": false, "md5_digest": "7b0a421a6b6fc586f621910bf3c5a93b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4085, "upload_time": "2015-01-18T20:06:29", "url": "https://files.pythonhosted.org/packages/4d/d7/7c237a57df64217389de6fe5724dd262a718836416b970215fe2b9b41c30/flask-endpoint-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7b0a421a6b6fc586f621910bf3c5a93b", "sha256": "33b303e66cb626f7d2655a262e427a5711db78613aa8f19c01df375460d766e7" }, "downloads": -1, "filename": "flask-endpoint-0.1.tar.gz", "has_sig": false, "md5_digest": "7b0a421a6b6fc586f621910bf3c5a93b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4085, "upload_time": "2015-01-18T20:06:29", "url": "https://files.pythonhosted.org/packages/4d/d7/7c237a57df64217389de6fe5724dd262a718836416b970215fe2b9b41c30/flask-endpoint-0.1.tar.gz" } ] }