https://github.com/nullism/pycnic
A JSON API web framework for lazy people.
https://github.com/nullism/pycnic
Last synced: 6 months ago
JSON representation
A JSON API web framework for lazy people.
- Host: GitHub
- URL: https://github.com/nullism/pycnic
- Owner: nullism
- License: mit
- Created: 2015-11-04T04:47:52.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-04-05T16:32:03.000Z (about 3 years ago)
- Last Synced: 2024-08-04T04:04:26.843Z (9 months ago)
- Language: Python
- Homepage: http://pycnic.nullism.com
- Size: 102 KB
- Stars: 159
- Watchers: 12
- Forks: 27
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- starred-awesome - pycnic - A JSON API web framework for lazy people. (Python)
README

============================# Docs
[pycnic.nullism.com/docs](http://pycnic.nullism.com/docs)
# Example
```python
# example.py
from pycnic.core import WSGI, Handlerclass 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