background preloader

Python

Facebook Twitter

GitHub - Miserlou/Zappa: Serverless Python Web Services. Bottlepy/bottle. Faif/python-patterns. Scrapy/scrapy. Requests: HTTP for Humans — Requests 2.13.0 documentation. Welcome | Flask (A Python Microframework) Welcome to Flask’s documentation. Get started with Installation and then get an overview with the Quickstart. There is also a more detailed Tutorial that shows how to create a small but complete application with Flask. Common patterns are described in the Patterns for Flask section. The rest of the docs describe each component of Flask in detail, with a full reference in the API section. Flask depends on the Werkzeug WSGI toolkit, the Jinja template engine, and the Click CLI toolkit. User’s Guide¶ Flask provides configuration and conventions, with sensible defaults, to get started. API Reference¶ If you are looking for information on a specific function, class or method, this part of the documentation is for you.

Additional Notes¶ Jinja2. Jinja2 is a modern and designer friendly templating language for Python, modelled after Django’s templates. It is fast, widely used and secure with the optional sandboxed template execution environment: <title>{% block title %}{% endblock %}</title><ul>{% for user in users %} <li><a href="{{ user.url }}">{{ user.username }}</a></li>{% endfor %}</ul> Features: sandboxed executionpowerful automatic HTML escaping system for XSS preventiontemplate inheritancecompiles down to the optimal python code just in timeoptional ahead of time template compilationeasy to debug.

Line numbers of exceptions directly point to the correct line in the template.configurable syntax Additional Information If you can’t find the information you’re looking for, have a look at the index or try to find it using the search function: Git GUI. Web2py. Bottle. Bottle is a fast, simple and lightweight WSGI micro web-framework for Python. It is distributed as a single file module and has no dependencies other than the Python Standard Library. Routing: Requests to function-call mapping with support for clean and dynamic URLs.Templates: Fast and pythonic built-in template engine and support for mako, jinja2 and cheetah templates.Utilities: Convenient access to form data, file uploads, cookies, headers and other HTTP-related metadata.Server: Built-in HTTP development server and support for paste, fapws3, bjoern, gae, cherrypy or any other WSGI capable HTTP server.

Example: “Hello World” in a bottle from bottle import route, run, template @route('/hello/<name>')def index(name): return template('<b>Hello {{name}}</b>! ', name=name) run(host='localhost', port=8080) Run this script or paste it into a Python console, then point your browser to That’s it. Download and Install User’s Guide Knowledge Base License Footnotes. Python Tools for VS. Boto - AWS. Green Unicorn. SQLAlchemy. Stallion. I’m happy to announce the first release v.0.1 of the Stallion project. Stallion is a visual Python package manager compatible with Python 2.6 and 2.7 (I still haven’t tested it with Python 2.5). The motivation behind Stallion is to provide an user friendly visualization with some management features (most of them are still under development) for Python packages installed on your local Python distribution.

Stallion is intended to be used specially for Python newcomers. The project is currently hosted at Github, so feel free to fork, contribute, make suggestion, report bugs, etc. All you need to do to install Stallion is to use your favorite Python distribution system, examples: By doing this on your prompt (Windows/Linux), the pip/setuptools will download and install external dependencies (Flask, Jinja, docutils, etc.). And if it’s all ok, Stallion will start the server on localhost only at the port 5000, so all you need to do now is to browse into the URL Home.