background preloader

Web

Facebook Twitter

CherryPy — A Minimalist Python Web Framework. Skulpt. Pystachio - Python-to-JavaScript translator in JavaScript. Pystachio is an early-stage Python-to-JavaScript translator (written in JavaScript) aimed at providing Python scripting in any modern browser.

pystachio - Python-to-JavaScript translator in JavaScript

Example page using Pystachio (Live demo): Benefits Let's you code in Python instead of (or along with) JavaScript in the Web browser Could potentially be used as an offline Python-to-JavaScript translator by running it from the command-line Notes! So far Pystachio only implements a tokenizer for Python.

Django

Bottle: Python Web Framework — Bottle 0.11.dev documentation. Bottle is a fast, simple and lightweight WSGI micro web-framework for Python.

Bottle: Python Web Framework — Bottle 0.11.dev documentation

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, Google App Engine, 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 Development and Contribution License. Quickstart — Flask 0.9-dev documentation. Eager to get started?

Quickstart — Flask 0.9-dev documentation

This page gives a good introduction to Flask. It assumes you already have Flask installed. If you do not, head over to the Installation section. A Minimal Application A minimal Flask application looks something like this: from flask import Flaskapp = Flask(__name__) @app.route('/')def hello_world(): return 'Hello World! ' Just save it as hello.py (or something similar) and run it with your Python interpreter. . $ python hello.py * Running on Now head over to and you should see your hello world greeting. So what did that code do? First we imported the Flask class. To stop the server, hit control-C. Externally Visible Server If you run the server you will notice that the server is only accessible from your own computer, not from any other in the network. If you have debug disabled or trust the users on your network, you can make the server publicly available simply by changing the call of the run() method to look like this: Debug Mode There are two ways to enable debugging.

<! A minimal Python WebSocket server « Popdevelop – A developer team from Malmö, Sweden. The future of illusively responsive web apps is here.

A minimal Python WebSocket server « Popdevelop – A developer team from Malmö, Sweden

Actually since December 2009 when Google released their 4.0.249.0 version of Chrome, WebSockets have been available to play around with. Connecting and communicating with a server from a regular web page is now as easy as: var ws = new WebSocket(" ws.onopen = function() { ws.send("Hello Mr.