Skip to content

JmPotato/dopamine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

22 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Dopamine

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

# -*- coding: utf-8 -*-
from dopamine import Dopamine

app = Dopamine(listener=('127.0.0.1', 5299))


@app.route('/', ['GET'])
def hello(request, response):
    html = 'Hello, dopamine!<br>'
    html += 'Your host is {0}:{1}<br>'.format(
        request.remote_addr, request.remote_port)
    html += 'Your user agent is: {0}'.format(
        request.headers['User-Agent'])
    return html


app.run()

LICENSE

Copyright ยฉ 2019 by JmPotato

Under Apache License 2.0

About

๐Ÿ˜† A simple and fast Python web framework which aims to help you build an app agilely.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages