============================
Klein, a Web Micro-Framework
============================
.. image:: https://github.com/twisted/klein/workflows/CI/badge.svg?branch=trunk
:target: https://github.com/twisted/klein/actions
:alt: Build Status
.. image:: https://codecov.io/github/twisted/klein/coverage.svg?branch=trunk
:target: https://codecov.io/github/twisted/klein?branch=trunk
:alt: Code Coverage
.. image:: https://img.shields.io/pypi/pyversions/klein.svg
:target: https://pypi.org/project/klein
:alt: 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 <https://bottlepy.org/docs/dev/index.html>`_ and `Flask <https://flask.palletsprojects.com/>`_.
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 <https://werkzeug.palletsprojects.com/>`_ and `Twisted <https://twisted.org>`_.
A `Klein bottle <https://en.wikipedia.org/wiki/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 <https://klein.readthedocs.org>`_.
Example
========
This is a sample Klein application that returns 'Hello, world!', running on port ``8080``.
.. code-block:: python
from klein import run, route
@route('/')
def home(request):
return 'Hello, world!'
run("localhost", 8080)
Contribute
==========
``klein`` is hosted on `GitHub <https://github.com/twisted/klein>`_ and is an open source project that welcomes contributions of all kinds from the community, including:
- code patches,
- `documentation <https://klein.readthedocs.org/>`_ improvements,
- `bug reports <https://github.com/twisted/klein/issues>`_,
- reviews for `contributed patches <https://github.com/twisted/klein/pulls>`_.
For more information about contributing, see `the contributor guidelines <https://github.com/twisted/klein/tree/trunk/CONTRIBUTING.rst>`_.
Raw data
{
"_id": null,
"home_page": "https://github.com/twisted/klein",
"name": "klein",
"maintainer": "Twisted Matrix Laboratories",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "twisted@python.org",
"keywords": "twisted flask werkzeug web",
"author": null,
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/32/55/70e08b134db00f2e9b5c00f6df6e4f1c13b46041b15451e8f3c28bd74908/klein-24.8.0.tar.gz",
"platform": null,
"description": "============================\nKlein, a Web Micro-Framework\n============================\n\n.. image:: https://github.com/twisted/klein/workflows/CI/badge.svg?branch=trunk\n :target: https://github.com/twisted/klein/actions\n :alt: Build Status\n.. image:: https://codecov.io/github/twisted/klein/coverage.svg?branch=trunk\n :target: https://codecov.io/github/twisted/klein?branch=trunk\n :alt: Code Coverage\n.. image:: https://img.shields.io/pypi/pyversions/klein.svg\n :target: https://pypi.org/project/klein\n :alt: Python Version Compatibility\n\nKlein is a micro-framework for developing production-ready web services with Python.\nIt is 'micro' in that it has an incredibly small API similar to `Bottle <https://bottlepy.org/docs/dev/index.html>`_ and `Flask <https://flask.palletsprojects.com/>`_.\nIt is not 'micro' in that it depends on things outside the standard library.\nThis is primarily because it is built on widely used and well tested components like `Werkzeug <https://werkzeug.palletsprojects.com/>`_ and `Twisted <https://twisted.org>`_.\n\nA `Klein bottle <https://en.wikipedia.org/wiki/Klein_bottle>`_ is an example of a non-orientable surface, and a glass Klein bottle looks like a twisted bottle or twisted flask.\nThis, of course, made it too good of a pun to pass up.\n\nKlein's documentation can be found at `Read The Docs <https://klein.readthedocs.org>`_.\n\n\nExample\n========\n\nThis is a sample Klein application that returns 'Hello, world!', running on port ``8080``.\n\n.. code-block:: python\n\n from klein import run, route\n\n @route('/')\n def home(request):\n return 'Hello, world!'\n\n run(\"localhost\", 8080)\n\n\nContribute\n==========\n\n``klein`` is hosted on `GitHub <https://github.com/twisted/klein>`_ and is an open source project that welcomes contributions of all kinds from the community, including:\n\n- code patches,\n- `documentation <https://klein.readthedocs.org/>`_ improvements,\n- `bug reports <https://github.com/twisted/klein/issues>`_,\n- reviews for `contributed patches <https://github.com/twisted/klein/pulls>`_.\n\nFor more information about contributing, see `the contributor guidelines <https://github.com/twisted/klein/tree/trunk/CONTRIBUTING.rst>`_.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "werkzeug + twisted.web",
"version": "24.8.0",
"project_urls": {
"Homepage": "https://github.com/twisted/klein"
},
"split_keywords": [
"twisted",
"flask",
"werkzeug",
"web"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b4cca5b41def4b6bfa81aa0a1bb71360cb63d9d7158d63c9368666411c100eb8",
"md5": "c453554b9c89d87c6bffc6eea7ccfcf8",
"sha256": "90e15b74f8c842a1519ea0b4e473e97fb8265c046d8b900815008c7614c59173"
},
"downloads": -1,
"filename": "klein-24.8.0-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "c453554b9c89d87c6bffc6eea7ccfcf8",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.7",
"size": 93819,
"upload_time": "2024-08-12T01:50:16",
"upload_time_iso_8601": "2024-08-12T01:50:16.403519Z",
"url": "https://files.pythonhosted.org/packages/b4/cc/a5b41def4b6bfa81aa0a1bb71360cb63d9d7158d63c9368666411c100eb8/klein-24.8.0-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "325570e08b134db00f2e9b5c00f6df6e4f1c13b46041b15451e8f3c28bd74908",
"md5": "03aae172aa0c84d5499e091b1ba71547",
"sha256": "1eef4f583c4f8ef4fc57d8b57753fe6e8935501eb36497bb574064e80e3d0b15"
},
"downloads": -1,
"filename": "klein-24.8.0.tar.gz",
"has_sig": false,
"md5_digest": "03aae172aa0c84d5499e091b1ba71547",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 104368,
"upload_time": "2024-08-12T01:50:18",
"upload_time_iso_8601": "2024-08-12T01:50:18.574693Z",
"url": "https://files.pythonhosted.org/packages/32/55/70e08b134db00f2e9b5c00f6df6e4f1c13b46041b15451e8f3c28bd74908/klein-24.8.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-12 01:50:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "twisted",
"github_project": "klein",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"tox": true,
"lcname": "klein"
}