{ "info": { "author": "Imbolc", "author_email": "imbolc@imbolc.name", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: ISC License (ISCL)", "Programming Language :: Python :: 3" ], "description": "aiohttp_tools\n=============\n\nIt contains:\n\n- ``url_for`` - flask-like url reverser\n- ``jsonify`` - flask-like json-dumper with support of ``datetime``, and ``ObjectId``\n- ``redirect`` - django-like redirect\n- ``get_argument`` - tornado-like util to get GET / POST arguments\n- ``static_url`` - tornado-like url-wrapper to add version hast to static asset\n- ``flash`` - simple flash messages, usage described bellow\n- ``get_client_ip`` - client IP address\n- ``add_trailing_slash`` - middleware for adding trailing slash to unknown url\n- ``fix_host`` - middleware for redirect requests by IP to right domain\n- ``template_handler`` - handler that just render template\n- ``url_for_processor`` - context processor for using ``url_for`` without passing request\n- ``session_processor`` - context_processor for ``aiohttp_session``\n\n\nLook at the `example` folder for working example.\n\n\nInstallation\n------------\n::\n\n pip install aiohttp_tools\n\nRepository: https://github.com/imbolc/aiohttp_tools\n\n\nFlash messages\n--------------\n.. code-block:: python\n\n from aiohttp_tools.flash import flash\n\n # you should include session middleware before flash middleware\n aiohttp_session.setup(app, ...)\n app.middlewares.append(aiohttp_tools.flash.middleware)\n context_processors.append(aiohttp_tools.flash.context_processor)\n\n async def handler(request):\n flash.message(request, 'Message', 'level')\n # shortcuts\n flash.info(request, 'Some message')\n flash.success(...)\n flash.warning(...)\n flash.error(...)\n\n\n.. code-block:: html\n\n {% for message, level in get_flashed_messages() %}\n
\n {{ message }}\n
\n {% endfor %}", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/imbolc/aiohttp_tools", "keywords": null, "license": "ISC", "maintainer": null, "maintainer_email": null, "name": "aiohttp_tools", "package_url": "https://pypi.org/project/aiohttp_tools/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/aiohttp_tools/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/imbolc/aiohttp_tools" }, "release_url": "https://pypi.org/project/aiohttp_tools/0.0.1/", "requires_dist": null, "requires_python": null, "summary": "A set of little tools for aiohttp-based sites", "version": "0.0.1" }, "last_serial": 2349328, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "f5c63657213f9c05d5219d0e47e88af4", "sha256": "ee95e90b85051fffab4ccb5ba35a143083ab74c3886d71ba8554f2389a8e49e1" }, "downloads": -1, "filename": "aiohttp_tools-0.0.1.tar.gz", "has_sig": false, "md5_digest": "f5c63657213f9c05d5219d0e47e88af4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4389, "upload_time": "2016-09-18T16:11:56", "url": "https://files.pythonhosted.org/packages/91/d2/2413e966cb68fbfa9e13abdc3c81bc7075058eac1a1f5243d0c0b8e18a8c/aiohttp_tools-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f5c63657213f9c05d5219d0e47e88af4", "sha256": "ee95e90b85051fffab4ccb5ba35a143083ab74c3886d71ba8554f2389a8e49e1" }, "downloads": -1, "filename": "aiohttp_tools-0.0.1.tar.gz", "has_sig": false, "md5_digest": "f5c63657213f9c05d5219d0e47e88af4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4389, "upload_time": "2016-09-18T16:11:56", "url": "https://files.pythonhosted.org/packages/91/d2/2413e966cb68fbfa9e13abdc3c81bc7075058eac1a1f5243d0c0b8e18a8c/aiohttp_tools-0.0.1.tar.gz" } ] }