klein


Nameklein JSON
Version 23.12.0 PyPI version JSON
download
home_pagehttps://github.com/twisted/klein
Summarywerkzeug + twisted.web
upload_time2023-12-22 16:29:40
maintainerTwisted Matrix Laboratories
docs_urlNone
author
requires_python>=3.7
licenseMIT
keywords twisted flask werkzeug web
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            ============================
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@twistedmatrix.com",
    "keywords": "twisted flask werkzeug web",
    "author": "",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/e8/5b/4ae403d11ace8ca043a41f100ab99a3a46ebaaea8e872ab41608532af0bb/klein-23.12.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": "23.12.0",
    "project_urls": {
        "Homepage": "https://github.com/twisted/klein"
    },
    "split_keywords": [
        "twisted",
        "flask",
        "werkzeug",
        "web"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7b57c3ada7bfbedda681f882ef6bc20e7588aaf79c21c6fff39ddcb25ced688c",
                "md5": "3ffe34f731fcdabd692e86a6a7b43d44",
                "sha256": "c99f0c3f69046191d3550d19744d58fb58c7d7c11a5c18aee6770c3058e0097e"
            },
            "downloads": -1,
            "filename": "klein-23.12.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3ffe34f731fcdabd692e86a6a7b43d44",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.7",
            "size": 92325,
            "upload_time": "2023-12-22T16:29:38",
            "upload_time_iso_8601": "2023-12-22T16:29:38.737900Z",
            "url": "https://files.pythonhosted.org/packages/7b/57/c3ada7bfbedda681f882ef6bc20e7588aaf79c21c6fff39ddcb25ced688c/klein-23.12.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e85b4ae403d11ace8ca043a41f100ab99a3a46ebaaea8e872ab41608532af0bb",
                "md5": "f51f89b1ec0cb90d3793fc855de856c9",
                "sha256": "1e83d172cdd411f814743b4a6979459662bab36c1164a704214f41e27127efd2"
            },
            "downloads": -1,
            "filename": "klein-23.12.0.tar.gz",
            "has_sig": false,
            "md5_digest": "f51f89b1ec0cb90d3793fc855de856c9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 103287,
            "upload_time": "2023-12-22T16:29:40",
            "upload_time_iso_8601": "2023-12-22T16:29:40.674682Z",
            "url": "https://files.pythonhosted.org/packages/e8/5b/4ae403d11ace8ca043a41f100ab99a3a46ebaaea8e872ab41608532af0bb/klein-23.12.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-22 16:29:40",
    "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"
}
        
Elapsed time: 0.19459s