Skip to main content

Pythonic web development

Project description

µHTTP - Pythonic web development

µHTTP emerged from the need of a simple web framework. It's great for micro-services, small applications, AND monolithic monsters.

In µHTTP there is no hidden logic. Everything is what it seems.

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, because of decisions like being able to raise Responses.
  • Quite fast, because it doesn't do much.
  • Great learning device.

The rant.

Installation

µHTTP is on PyPI.

pip install uhttp

You might also need an ASGI server. I recommend Uvicorn.

pip install uvicorn

Hello, world!

#!/usr/bin/env python3

from uhttp import App


app = App()


@app.get('/')
def hello(request):
    return f'Hello, {request.ip or "World"}!'


if __name__ == '__main__':
    import uvicorn
    uvicorn.run('__main__:app')

API Reference

The documentation.

Tutorial

Coming soon...

Project details


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.0.tar.gz (6.9 kB view hashes)

Uploaded Source

Built Distribution

uhttp-1.3.0-py3-none-any.whl (7.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page