python webserver github_GitHub - hendrix/hendrix: A python web server focused on async and offbeat n...

README.md

Mr. D. Reinhardt, with a pair of guitars and tatters of sheet music in the back seat, speeds his convertible westward over the mountains. The campfire carries on without the blessing of his gypsy jazz, but his morning return is as a fearsome, left-handed character – familiar but Twisted(.py)

A Python web server that makes async and offbeat network traffic easy, fun, and fast.

Overview

hendrix is a tool for handling bytes-on-the-wire to and from your python web application. In this sense, it is similar to mod_wsgi, uWSGI, and gunicorn.

However, hendrix differs from these other technologies in that it is natively asynchronous and designed with background tasks in mind. In this sense, it may serve some projects as a replacement for gevent or celery.

hendrix implements the WSGI protocol, so it can serve applications made with django, pyramid, flask and other WSGI frameworks. However, hendrix views your web as just another network resource - in fact, this is central to the hendrix philosophy.

Twisted is one of the most battle-tested and actively developed Python projects. Until hendrix, however, Twisted has not been part of a mainstream python web server. And that's a shame.

Features

Multi-processing - The WSGI app can be served from multiple

processes on a single machine.

Multi-threading from within your Django / Flask / Pyramid app: Various APIs allow you to defer logic until later, place it in a different thread or process, and report back asynchronously. For example, see crosstown_traffic.

Built-in Websockets Framework

Optional Resource Caching

Built-in SSL Support: Terminate SSL inside your app if you like. Public keys can be part of your logic!

Daemonize by passing the -d or --daemonize flags to hx

Quickstart

Using pip

pip install hendrix

Running the Development Server

cd to the directory where your manage.py file is located and...

hx start --dev

This is roughly the equivalent of running the django devserver.

For more, see the full hendrix documentation.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值