https://github.com/jmpotato/dopamine
😆 A simple and fast Python web framework which aims to help you build an app agilely.
https://github.com/jmpotato/dopamine
gevent web-framework wsgi
Last synced: 6 months ago
JSON representation
😆 A simple and fast Python web framework which aims to help you build an app agilely.
- Host: GitHub
- URL: https://github.com/jmpotato/dopamine
- Owner: JmPotato
- License: apache-2.0
- Created: 2019-12-25T10:17:07.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-29T08:58:52.000Z (over 5 years ago)
- Last Synced: 2025-03-24T16:51:56.754Z (6 months ago)
- Topics: gevent, web-framework, wsgi
- Language: Python
- Homepage:
- Size: 55.7 KB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# Dopamine
Dopamine is a simple and fast Python web framework which aims to help you build an app agilely. It's based on gevent's `pywsgi`, a pure-Python, gevent-friendly WSGI server. Benefiting from a high-level synchronous API on top of the `libev` or `libuv` event loop, dopamine could be fast to respond every HTTP request without the user to do any extra work. Also, dopamine will stay in both easy-using and powerfuly to help you build some simple apps agilely.
## Feature
Dopamine hopes you can use it to build your app without any burden. Here are some features dopamine already has or soon will be supported.
* Simple router function
* JSON friendly
* Easy to handle HTTP requests
* Template framework support
* ...## Example
```python
# -*- coding: utf-8 -*-
from dopamine import Dopamineapp = Dopamine(listener=('127.0.0.1', 5299))
@app.route('/', ['GET'])
def hello(request, response):
html = 'Hello, dopamine!
'
html += 'Your host is {0}:{1}
'.format(
request.remote_addr, request.remote_port)
html += 'Your user agent is: {0}'.format(
request.headers['User-Agent'])
return htmlapp.run()
```## LICENSE
Copyright © 2019 by JmPotatoUnder [Apache License 2.0](http://www.apache.org/licenses/)