Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nullism/pycnic

A JSON API web framework for lazy people.
https://github.com/nullism/pycnic

Last synced: about 1 month ago
JSON representation

A JSON API web framework for lazy people.

Awesome Lists containing this project

README

        

![HUG](http://pycnic.nullism.com/images/pycnic-head-small.png)
============================

# Docs

[pycnic.nullism.com/docs](http://pycnic.nullism.com/docs)

# Example

```python
# 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](http://gunicorn.org).

gunicorn file:app