Skip to main content

A Minimal WSGI Framework to develop your web application comfortably

Project description

https://travis-ci.org/kobinpy/kobin.svg?branch=master https://coveralls.io/repos/github/kobinpy/kobin/badge.svg?branch=coveralls Code Climate Documentation Status

A Minimal WSGI Framework to develop your web application comfortably. This library is a pre-release. Expect missing docs and breaking API changes.

Kobin has following features.

  • Decorator based Routing System exploited Type Hints.
  • WSGI request and response Wrapper.
  • Provide type annotations from stub files.
  • and other convenient utilities…

And Kobin has NO following features:

  • WSGI Server Adapters: Please use WSGICLI or Gunicorn CLI.
  • Serving static contents: Please use WSGICLI and Nginx.
  • Template Engine: But Kobin provides template adapter.

Getting started

Installation

$ pip install kobin

Hello World with Kobin

from kobin import Kobin, Response, JSONResponse
app = Kobin()

@app.route('/')
def hello() -> Response:
    return Response("Hello World")

@app.route('/users/{user_id}')
def hello(user_id: int) -> JSONResponse:
    return JSONResponse({
        "message": "Hello {}!!".format(user_id)
    })

Run server

Development

$ pip install wsgicli
$ wsgicli main.py app --reload

Production

$ pip install gunicorn
$ gunicorn main:app

Requirements

Kobin requires the following:

  • Python 3.5 or 3.6(beta)
  • Jinja2

License

This software is licensed under the MIT License.

CHANGES

0.0.7 (2016-12-??)

  • headers property in Request object.
  • raw_body property in Request object.
  • Remove jinja2 from install_requires.
  • Update docs.

0.0.6 (2016-12-04)

  • Integrating wsgicli.
  • Alter sphinx theme.
  • Update documentations.
  • View functions must return Response or its child class.
  • Make Request object to No thread local
  • Add Response, JSONResponse, TemplateResponse, RedirectResponse.
  • Refactor error handling.
  • Add stub files (.pyi).
  • Python3.6 testing in travis-ci.org.
  • Add API documentation.

0.0.5 (2016-11-28)

  • Replace regex router with new style router.
  • Correspond reverse routing.
  • Remove serving static file. Please use wsgi-static-middleware.
  • Remove server adapter.
  • Support only Jinja2.
  • Refactoring.

0.0.4 (2016-02-28)

  • Expect the types of routing arguments from type hints.
  • Implement template adapter for jinja2.
  • Server for static files such as css, images, and so on.
  • Manage configuration class.
  • Support gunicorn.
  • Error handling.
  • Fix several bugs.

0.0.3 (2016-02-08)

  • Request and Response object.
  • tox and Travis-CI Integration.

0.0.2 (2015-12-03)

  • Publish on PyPI.

0.0.0 (2015-09-14)

  • Create this project.

Release history Release notifications

History Node

0.1.10

History Node

0.1.9

History Node

0.1.8

History Node

0.1.7

History Node

0.1.6

History Node

0.1.5

History Node

0.1.4

History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

History Node

0.1.0

This version
History Node

0.0.7

History Node

0.0.6

History Node

0.0.5

History Node

0.0.4

History Node

0.0.3

History Node

0.0.2

History Node

0.0.1

History Node

0.0.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
kobin-0.0.7-py3-none-any.whl (14.4 kB) Copy SHA256 hash SHA256 Wheel py3 Dec 4, 2016
kobin-0.0.7.tar.gz (10.8 kB) Copy SHA256 hash SHA256 Source None Dec 4, 2016

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page