Configuring Python Interpreter for virtualenv This section highlights how to use Eclipse PyDev to develop Flask webapp. Read HERE on how to install and use Eclipse PyDev for Python program development. Using a proper IDE (with debugger, profiler, etc.) is CRITICAL in software development. (venv)$ deactivate # Exit virutal environment Using Eclipse PyDev IDE Summary: A small but fast and easy to use stand-alone template engine written in pure python. Summary: The Swiss Army knife of Python web development Requires: Werkzeug, itsdangerous, click, Jinja2 Summary: A microframework based on Werkzeug, Jinja2 and good intentions (venv)$ pip show flask # Check installed packages (venv)$ pip install flask # Install flask using 'pip' which is symlinked to pip2 or pip3 (no sudo needed) $ source venv/bin/activate # Activate the virual environment $ virtualenv -p python3 venv # For Python 3, or $ cd /path/to/project-directory # Choose your project directory You need to choose your own project directory and pick your Python version. We shall install Flask under a virtual environment (called myflaskvenv) under our project directory. It is strongly recommended to develop Python application under a virtual environment. Getting Started with Python-Flask Installing Flask (under a Virtual Environment) Read the Flask documentation, quick start guide, and tutorials available at the Flask mother site. Via Flask, you can handle HTTP and AJAX requests, user sessions between requests, route requests to controllers, evaluate and validate the request data, and response with HTML or JSON, and so on. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |