Skip to content
werkzeug + twisted.web
Branch: master
Clone or download
glyph Merge pull request #270 from twisted/no-coverage-nicer
Use config to exclude TYPE_CHECKING branches from coverage
Latest commit 86e34a2 Feb 4, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.travis
docs
src/klein Remove pragma: no cover from if TYPE_CHECKING: branches. Feb 4, 2019
.coveragerc Use regex in config to exclude TYPE_CHECKING from coverage. Feb 4, 2019
.gitignore
.travis.yml Remove sudo: line Dec 27, 2018
AUTHORS Add displayTracebacks argument to Klein.run. Oct 10, 2018
CONTRIBUTING.rst fix sphinx link for docs-linkcheck Jun 26, 2018
LICENSE
MANIFEST.in Add NEWS to the manifest. Feb 25, 2013
NEWS.rst bump versions Jan 11, 2015
README.rst
setup.cfg
setup.py Move comment to where it's relevant Dec 28, 2018
tox.ini

README.rst

Klein, a Web Micro-Framework

Build Status Code Coverage Requirements Status Python Version Compatibility

Klein is a micro-framework for developing production-ready web services with Python. It is 'micro' in that it has an incredibly small API similar to Bottle and Flask. It is not 'micro' in that it depends on things outside the standard library. This is primarily because it is built on widely used and well tested components like Werkzeug and Twisted.

A Klein bottle is an example of a non-orientable surface, and a glass Klein bottle looks like a twisted bottle or twisted flask. This, of course, made it too good of a pun to pass up.

Klein's documentation can be found at Read The Docs.

Example

This is a sample Klein application that returns 'Hello, world!', running on port 8080.

from klein import run, route

@route('/')
def home(request):
    return 'Hello, world!'

run("localhost", 8080)

Contribute

klein is hosted on GitHub and is an open source project that welcomes contributions of all kinds from the community, including:

For more information about contributing, see the contributor guidelines.

You can’t perform that action at this time.