flask-commandRun you flask+gunicorn app as a command | |
Download |
flask-command Ranking & Summary
Advertisement
- License:
- MIT/X Consortium Lic...
- Price:
- FREE
- Publisher Name:
- Reuven V. Gonzales
- Publisher web site:
- https://github.com/ravenac95/
flask-command Tags
flask-command Description
flask-command is a simple Python tool that allows you to call your flask application from the command line after wrapping through gunicorn. This is useful if you'd like to create a console_script entry point for your flask application.Intended Use CaseLet's assume your project is called myproject. A flask app exists or is accessible from myproject/__init__.py. The following shows how you'd use flask-command.In a file called myproject/main.py:from flaskcommand import flask_commandfrom myproject import appmain = flask_command(app)In your setup.py file:setup(name='myproject', version='0.0.1', description="myproject - is awesome", long_description="myproject - is really awesome", keywords='', author='Reuven V. Gonzales', author_email='reuven@tobetter.us', packages=, include_package_data=True, zip_safe=False, install_requires=, entry_points={ 'console_scripts': }, classifiers=,)Now, after installing your project you can start your flask server like this:myproject-web -b 127.0.0.1:8000 -w 4 some_config_pathAt this time specifying a path to a configuration file is required, but this probably won't be so in the future.Product's homepage
flask-command Related Software