{ "info": { "author": "Chris Zimmerman", "author_email": "chris@chriszimmerman.me", "bugtrack_url": null, "classifiers": [ "Development Status :: 1 - Planning", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Flouter\n============\n\nFlouter (Flask Router) is a convenience add-on for the `Flask`_ library. It converts a directory structure into valid routes\nfor a Flask application. This allows developers to quickly layout complex applications, and easily navigate\nto existing code. This library is under heavy development and may not yet support a feature you need. If that is\nthe case, please submit a feature request so the library can continue to improve.\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n pip install -U flouter\n\n\nBasic Usage\n-----------\n\nFlouter will convert the following ``routes`` directory structure...\n\n.. code-block:: text\n\n routes/\n |-- api/\n |-- index.py\n |-- echo.py\n |-- _foo.py\n\n...to the corresponding routes in a flask application.\n\n.. code-block:: text\n\n /api/\n /api/echo/\n /api/\n\nIn one of these files, methods are defined by simple named functions that are called when the appropriate HTTP request\nis passed to the route.\n\n.. code-block:: python\n\n # echo.py\n\n def get():\n return 'Hello World'\n\n def post(request):\n # returns are turned into valid responses by the library\n return request.json\n\n\nAn example usage of this library is included in `examples/basic`_\n\n.. code-block:: python\n\n # main.py\n import os\n\n from flask import Flask\n from src.flouter import Router\n\n app = Flask(__name__)\n\n route_dir = os.getcwd() + \"/routes/\"\n router = Router(route_dir)\n\n router.register_routes(app)\n\n app.run()\n\nA `Router` object also allows ``route_params`` to be defined, which allow methods to access\nimportant elements of an application without having to explicitly import these into\nevery single file, which could quickly become annoying. The default value for this dictionary\ncontains only the ``flask.request`` object, which you can access in any function by adding\nthe ``request`` kwarg. However, you can extend this to pass in any important variables you\nmay have.\n\n.. code-block:: python\n\n # main.py\n\n d = dict(\n my_constant=10,\n )\n\n router = Router(directory, route_params=d)\n\nWhich enables ``my_constant`` to be passed to any route child function.\n\n.. code-block:: python\n\n # /api/index.py\n\n def get(my_constant):\n return my_constant\n\n\n\n\n\n\n.. _Flask: https://www.palletsprojects.com/p/flask/\n.. _pip: https://pip.pypa.io/en/stable/quickstart/\n.. _examples/basic: examples/basic\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/christopherzimmerman/flouter", "keywords": "", "license": "BSD-3 Clause", "maintainer": "Chris Zimmerman", "maintainer_email": "chris@chriszimmerman.me", "name": "flouter", "package_url": "https://pypi.org/project/flouter/", "platform": "", "project_url": "https://pypi.org/project/flouter/", "project_urls": { "Code": "https://github.com/christopherzimmerman/flouter", "Homepage": "https://github.com/christopherzimmerman/flouter", "Issue tracker": "https://github.com/christopherzimmerman/flouter/issues" }, "release_url": "https://pypi.org/project/flouter/0.0.6.dev0/", "requires_dist": [ "flask (>=1.1)", "trimport", "pytest ; extra == 'dev'", "coverage ; extra == 'dev'", "sphinx ; extra == 'dev'", "sphinx ; extra == 'docs'", "numpydoc ; extra == 'docs'" ], "requires_python": ">=3.5", "summary": "Convenient routing for a flask application", "version": "0.0.6.dev0" }, "last_serial": 5817782, "releases": { "0.0.1.dev0": [ { "comment_text": "", "digests": { "md5": "4a0a08b9346ce72a62f2890c6f007833", "sha256": "ee107f62ac2a9159890a1450a938811251afd631dd01020cb606ad520dc52154" }, "downloads": -1, "filename": "flouter-0.0.1.dev0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4a0a08b9346ce72a62f2890c6f007833", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.5", "size": 3350, "upload_time": "2019-08-09T15:50:58", "url": "https://files.pythonhosted.org/packages/47/5f/87b5660ca5d0e20d5b49a30ac01c53fa3fc03f98e8b364ef92596b54f466/flouter-0.0.1.dev0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "96b621a18f00441af51b88e12f17ff55", "sha256": "0fcc3072883c643abde3073c87d6d18a917b998b108e38b34cda9f2b5df9a606" }, "downloads": -1, "filename": "flouter-0.0.1.dev0.tar.gz", "has_sig": false, "md5_digest": "96b621a18f00441af51b88e12f17ff55", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 3401, "upload_time": "2019-08-09T15:51:00", "url": "https://files.pythonhosted.org/packages/e5/05/eaa0f6534eac58441f0119667b981314b0556e6a47a22967cd0722f7c2ce/flouter-0.0.1.dev0.tar.gz" } ], "0.0.3.dev0": [ { "comment_text": "", "digests": { "md5": "5e89340e6f1b21da0249afdfcade461c", "sha256": "745d2c062453cd6764aa73f924dcdbd0b7eaa370ee1e87a73f1a782524ba26a7" }, "downloads": -1, "filename": "flouter-0.0.3.dev0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5e89340e6f1b21da0249afdfcade461c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.5", "size": 7481, "upload_time": "2019-08-12T15:28:29", "url": "https://files.pythonhosted.org/packages/f9/d5/72940dd549ecddc03db3a416e74b217b4e6ca8d101a73fecfe24c7d68f97/flouter-0.0.3.dev0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a3fe351aa81ec572e0fa36fa3f8e0092", "sha256": "9e681a891b44accc529900b121e35b941c077081c38dfc946487316245f03246" }, "downloads": -1, "filename": "flouter-0.0.3.dev0.tar.gz", "has_sig": false, "md5_digest": "a3fe351aa81ec572e0fa36fa3f8e0092", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 6783, "upload_time": "2019-08-12T15:28:31", "url": "https://files.pythonhosted.org/packages/ac/41/54acb814b98fc94a63599292829b40d4f33085990e9f3bb80dcd1f1be8eb/flouter-0.0.3.dev0.tar.gz" } ], "0.0.4.dev0": [ { "comment_text": "", "digests": { "md5": "30e4ab8d661e866ccdaac552cd7dfe83", "sha256": "64efaaf68b0591fd7cc712fd8b7de34be589860330dd5f30bec210db8bbd9ed8" }, "downloads": -1, "filename": "flouter-0.0.4.dev0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "30e4ab8d661e866ccdaac552cd7dfe83", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.5", "size": 7513, "upload_time": "2019-08-12T15:56:20", "url": "https://files.pythonhosted.org/packages/9f/e7/ccd965daeef84841a11fe49274b8c34871f326a5b885d15acba7c488db2d/flouter-0.0.4.dev0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1427f8bef30570b0278152beba3f1729", "sha256": "82b87c3306b86fac45b3b521450855154a32e04820c99f2be4c9b299af708dff" }, "downloads": -1, "filename": "flouter-0.0.4.dev0.tar.gz", "has_sig": false, "md5_digest": "1427f8bef30570b0278152beba3f1729", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 6820, "upload_time": "2019-08-12T15:56:23", "url": "https://files.pythonhosted.org/packages/49/10/a35c373f9e0fec78477f4e577895263583983cb75e7966572491c09d76a6/flouter-0.0.4.dev0.tar.gz" } ], "0.0.5.dev0": [ { "comment_text": "", "digests": { "md5": "2f2f695692bcc28d2f4bc296cd06ce6e", "sha256": "01f2fa098d164adc76fb11bbfeb09c192a55912f0d3bbbbfd193b099e1722da2" }, "downloads": -1, "filename": "flouter-0.0.5.dev0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2f2f695692bcc28d2f4bc296cd06ce6e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.5", "size": 7531, "upload_time": "2019-08-12T16:10:59", "url": "https://files.pythonhosted.org/packages/30/82/4268d0aa95bd2bfefc088143bfa5a8ced1356918bc55823ed789ccde97bc/flouter-0.0.5.dev0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f2c1c45eaebc093538a3025af9c3e517", "sha256": "6e003cb8c977f8e3f079882c356e0fa2d1fbf5c0e15a8b16c1a3603056b69c75" }, "downloads": -1, "filename": "flouter-0.0.5.dev0.tar.gz", "has_sig": false, "md5_digest": "f2c1c45eaebc093538a3025af9c3e517", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 6844, "upload_time": "2019-08-12T16:11:03", "url": "https://files.pythonhosted.org/packages/13/ba/1dc3924a73200c4a89f4e8745d35d063fac24c931ad2736d556f0813f6cc/flouter-0.0.5.dev0.tar.gz" } ], "0.0.6.dev0": [ { "comment_text": "", "digests": { "md5": "070c5f1d89dad73250d54449fc2f6f00", "sha256": "9182d998fe345a990e741529a92b404a13ca0a648a617b1c35b923c3c646aa62" }, "downloads": -1, "filename": "flouter-0.0.6.dev0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "070c5f1d89dad73250d54449fc2f6f00", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.5", "size": 7512, "upload_time": "2019-09-12T01:55:23", "url": "https://files.pythonhosted.org/packages/5c/26/22c8635af8079064aea7ac27a91bffd7344ad11796a920ba8ae8dc600a0b/flouter-0.0.6.dev0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "92aeddb61f23b2f7e08b321b4df184da", "sha256": "5f12d0895b02fc3f82846e00bdf74dd1187ea2bd96a4152bbf24c81feede8621" }, "downloads": -1, "filename": "flouter-0.0.6.dev0.tar.gz", "has_sig": false, "md5_digest": "92aeddb61f23b2f7e08b321b4df184da", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 6716, "upload_time": "2019-09-12T01:55:25", "url": "https://files.pythonhosted.org/packages/cb/74/ef119c16e141b5115a55fc873b328e97565da7641cd56231f8e57b8ee262/flouter-0.0.6.dev0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "070c5f1d89dad73250d54449fc2f6f00", "sha256": "9182d998fe345a990e741529a92b404a13ca0a648a617b1c35b923c3c646aa62" }, "downloads": -1, "filename": "flouter-0.0.6.dev0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "070c5f1d89dad73250d54449fc2f6f00", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.5", "size": 7512, "upload_time": "2019-09-12T01:55:23", "url": "https://files.pythonhosted.org/packages/5c/26/22c8635af8079064aea7ac27a91bffd7344ad11796a920ba8ae8dc600a0b/flouter-0.0.6.dev0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "92aeddb61f23b2f7e08b321b4df184da", "sha256": "5f12d0895b02fc3f82846e00bdf74dd1187ea2bd96a4152bbf24c81feede8621" }, "downloads": -1, "filename": "flouter-0.0.6.dev0.tar.gz", "has_sig": false, "md5_digest": "92aeddb61f23b2f7e08b321b4df184da", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 6716, "upload_time": "2019-09-12T01:55:25", "url": "https://files.pythonhosted.org/packages/cb/74/ef119c16e141b5115a55fc873b328e97565da7641cd56231f8e57b8ee262/flouter-0.0.6.dev0.tar.gz" } ] }