Stupid web development
Project description
µHTTP - Stupid web development
µHTTP emerged from the need of a simple web framework. It's great for micro-services, small applications, AND monolithic monsters.
Why
- Stupid simple, seriously, there are maybe 15 lines of "real" code in it. No external dependencies.
- Extremely modular, entire extensions can just follow the simple App pattern.
- Very flexible, you can even raise responses.
- Quite fast, because size matters.
- Great learning device.
Installation
µHTTP is on PyPI.
pip install uhttp
You might also need an ASGI server. I recommend Uvicorn.
pip install uvicorn
Hello, world!
from uhttp import App
app = App()
@app.get('/')
def hello(request):
return f'Hello, {request.ip}!'
if __name__ == '__main__':
import uvicorn
uvicorn.run('__main__:app')
Documentation
First, read the tutorial. It'll show you how to write and deploy a link aggregation platform (read: Hacker News clone).
Then, take look at the API reference.
Finally, enjoy the source code. ;)
Extensions
µHTTP doesn't come with bells and whistles.
If you want more, search for µHTTP extensions.
Contributing
Feel free to contribute in any way you'd like. :D
License
Released under the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
uhttp-1.3.3.tar.gz
(7.1 kB
view hashes)
Built Distribution
uhttp-1.3.3-py3-none-any.whl
(7.5 kB
view hashes)