Skip to main content

No project description provided

Project description

Another

"Another" Python backend framework, for fun.

justforfunnoreally.dev badge

Installation

pip install another

You also need an ASGI server, such as Uvicorn or Granian.

pip install uvicorn
# or
pip install granian

Usage

Create a main.py file and copy-paste the following snippet into it.

from another import Another, Status, Request, Response


app = Another()

@app.get("/hello")
def hellow_another(req: Request):
    return Response({
        "message": "Hello!",
        "extra": req.query
    }, status=Status.HTTP_200_OK)

And then run the server:

uvicorn main:app

Now open this link localhost:8000/hello?first_name=Mads&last_name=Mikkelsen in your browser.

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

another-0.2.2.tar.gz (3.7 kB view hashes)

Uploaded Source

Built Distribution

another-0.2.2-py3-none-any.whl (4.5 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