• Stars
    star
    158
  • Rank 237,131 (Top 5 %)
  • Language
    Python
  • License
    MIT License
  • Created about 9 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A JSON API web framework for lazy people.

HUG

Docs

pycnic.nullism.com/docs

Example

# example.py
from pycnic.core import WSGI, Handler

class Hello(Handler):
    def get(self, name="World"):
        return { "message":"Hello, %s!"%(name) }

class app(WSGI):
    routes = [
        ('/', Hello()),
        ('/([\w]+)', Hello())
    ]

Installation

Now that Pycnic is available on PyPI, it may be installed with pip.

pip install pycnic

Running

Pycnic may be ran with any WSGI-compliant server, such as Gunicorn.

gunicorn file:app