Skip to main content

A concise and lightweight web framework.✨

Project description


## Introduction
Freesia is a concise and lightweight async web framework. Its api is inspired by Flask.

## Installation
pip3 install asyncfreesia

## Docs
You can find the project's detailed API documentation on [here](

## Example
*hello world*
from freesia import Freesia

app = Freesia()

async def hello(request, name):
return "Hello, " + name + "!"

if __name__ == "__main__":

from freesia import Freesia

app = Freesia()

async def hello(request, name):
print("enter user handler")
return "hello, " + name

async def middleware1(request, handler):
print("enter middleware1")
res = await handler()
print("exit middleware1")
return res + " !"

async def middleware2(request, handler):
print("enter middleware2")
res = await handler()
print("exit middleware2")
return res + " :D"

app.use([middleware1, middleware2])

if __name__ == "__main__":

from freesia import Freesia, set_up_session, get_session, Response
from freesia.session import SimpleCookieSession

app = Freesia()

async def hello(request):
s = await get_session(request)
if "count" not in s:
s["count"] = 1
return Response(text="Hello, stranger!")
s["count"] += 1
return Response(text="I've seen you %d times" % s["count"])

if __name__ == "__main__":
set_up_session(app, SimpleCookieSession)

## More
You can see more exmaple and usags in [docs]( and [examples](./examples).

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for aysncfreesia, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size aysncfreesia-0.0.2.tar.gz (18.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page