Aquilify
Aquilify is an ASGI (Asynchronous Server Gateway Interface) framework designed to facilitate the development of web applications with Python. It enables efficient handling of HTTP requests, WebSocket connections, middleware processing, and exception handling in an asynchronous environment.
Install / Use
/learn @embrake/AquilifyREADME
Documentation: http://www.aquilify.vvfin.in/
AQUILIFY
Aquilify is an ASGI (Asynchronous Server Gateway Interface) framework designed to facilitate the development of web applications with Python. It enables efficient handling of HTTP requests, WebSocket connections, middleware processing, and exception handling in an asynchronous environment.
Installation
$ pip install aquilify
Or you can install the aquilify[full]
$ pip install aquilify[full]
Basic Setup
Create a new aquilify app using the command show below :
$ aquilify create-app myapp
Now, move inside the myapp and run :
$ aquilify runserver
To make changes in ASGI server configuration open myapp/config.cfg :
Default Configuration :
[ASGI_SERVER]
server = NETIX
host = 127.0.0.1
port = 8000
debug = True
reload = False
instance = asgi:application
visit: http://localhost:8000
output:
<div align="center"> <a href="#"><img src="https://i.ibb.co/Yy8sX0q/setup.png" alt="IMG-20231115-232824" style="border-radius: 6px;" width="420px" alt="Aquilify"></a> </div>Creating views
myapp/views.py
async def myview() -> dict:
return {"message": "Welcome to aquilify"}, 200
myapp/routing.py
from aquilify.core.routing import rule
import views
ROUTER = [
rule('/', view.myview)
]
run server
$ aquilify runserver
Starting Netix v1.12 (cpython 3.12.1, win32)
------------------------------------------------------------------------
Options:
run(host=127.0.0.1, port=8000, reuse_port=True, worker_num=1, ssl={}, debug=True, app=asgi:application, log_level=DEBUG)
------------------------------------------------------------------------
[2024-01-08 15:48:19] Netix detected Aquilify starting.. : Aquilify
[2024-01-08 15:48:19,421] INFO: lifespan: startup
[2024-01-08 15:48:19,423] INFO: lifespan.startup.complete
[2024-01-08 15:48:20] Netix (ASGI) (pid 17892) is started at 127.0.0.1 port 8000
output : http://localhost:8000/ :
{
"message": "Welcome to aquilify"
}
Credits
- Thanks to
starlette. - This project uses code adapted from the Starlette framework.
Dependencies
Aquilify only requires anyio, and the following are optional:
- [
aiofiles][aiofile] - Required if you want to use theStaticMIddlewareorFile based Opertation. - [
jinja2][jinja2] - Required if you want to useTemplateResponse. - [
python-multipart][python-multipart] - Required if you want to support form parsing, withrequest.form(). - [
itsdangerous][itsdangerous] - Required forSessionMiddlewareandCSRFsupport. - [
markupsafe][markupsafe] - Required forJinja2andCSRFsupport.
Related Skills
node-connect
351.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
