{ "info": { "author": "Paylogic International", "author_email": "developers@paylogic.com", "bugtrack_url": null, "classifiers": [], "description": "pltk: Paylogic toolkit\n======================\n\nThe ``pltk`` package is a collection of useful tools for frameworks and other tools. At the moment there's only one\nset of them - flask related tools.\n\n.. image:: https://api.travis-ci.org/paylogic/pltk.png\n :target: https://travis-ci.org/paylogic/pltk\n.. image:: https://pypip.in/v/pltk/badge.png\n :target: https://crate.io/packages/pltk/\n.. image:: https://coveralls.io/repos/paylogic/pltk/badge.png?branch=master\n :target: https://coveralls.io/r/paylogic/pltk\n\n\nInstallation\n------------\n\n.. sourcecode::\n\n pip install pltk\n\n\nUsage\n-----\n\nPackage contains several utility modules. We will describe them one by one.\n\n\nUseful Flask commands\n^^^^^^^^^^^^^^^^^^^^^\n\n.. code-block:: python\n\n from pltk import commands\n commands.install_commands(app, manager, db, model_collector)\n\nthen your app will have such additional commands:\n\n monitor_test\n Run a test as monitor command.\n Example usage::\n\n $ app monitor_test \\\n -T app.tests.test_utils:TestView \\\n -H dev.app.com -P 443 -R /unstable -S https\n\n shell\n Run Python shell with application context.\n\n dbshell\n Run database shell.\n\n http\n Run HTTP emulating console.\n Examples::\n - POST /foo/bar list=[1,2,3,4]\n - POST /user/login email=a@b.com password=p\n - GET /user/profile\n - header Authorization 1232123123\n\n print_settings\n Print all current Flask Settings.\n\n ec2_backup\n Create an ami from the current server and pushes its contents to s3.\n\n compile_messages\n Update the gettext messages.pot file and initialize the supported languages (if not already)\n and compile the messages to .mo files.\n This command assumes it is executed from the root of the project and stores translations into a folder\n 'translations' inside the same location. It also assumes there is a 'babel.cfg' file and lazy_gettext\n is used next to general gettext methods.\n\n If you want to add a new language, add it to app.config['SUPPORTED_LANGUAGES'] and run this command.\n\n\nRate limiting\n^^^^^^^^^^^^^\n\n.. code-block:: python\n\n from pltk import limit\n\n @app.route('/rate-limited')\n @limit.rate(limit=300, per=60 * 15)\n def index():\n return '