Skip to main content

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.

Project description

IMG-20231115-232824

Documentation: https://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.

Introduction

Aquilify leverages Python's async capabilities to provide a robust and scalable infrastructure for building web applications. It includes features such as request routing, middleware support, WebSocket handling, and response management.

Key Features

  • HTTP Request Handling: Aquilify efficiently processes incoming HTTP requests and provides a structured approach for defining routes and handling various HTTP methods (GET, POST, PUT, DELETE, etc.).

  • WebSocket Support: The framework supports WebSocket connections, allowing bidirectional communication between clients and servers.

  • Middleware Processing: Aquilify facilitates the use of middleware functions to preprocess requests, perform authentication, logging, or modify responses before sending them back.

  • Exception Handling: The framework includes mechanisms to handle exceptions raised during request processing, enabling graceful error responses.

Installation

pip install aquilify

You'll also want to install an ASGI server, such as netix, uvicorn, daphne, or hypercorn.

$ pip install netix
  • Netix is an ASGI Web server gateway for Aquilify, built on the top of asynchronous programming.

A Smiple Example

# save this as main.py
from aquilify.core import Aquilify

app = Aquilify()

@app.route('/')
async def home():
    return {"message": "Welcome to Aquilify"}

Terminal

$ netix --deubg main:app
  * Starting Netix v1.12 (cpython 3.11.6, linux)
    -----------------------------------------------------------------------
    Options:
    run(host=127.0.0.1, port=8080, reuse_port=True, worker_num=1, reload=True, app=lo:app, log_level=DEBUG)
    -------------------------------- ---------------------------------------
    [2023-11-15 22:25:18] Starting Netix as an ASGI server for: Aquilify
    [2023-11-15 22:25:18,079] INFO: lifespan: startup
    [2023-11-15 22:25:18,080] INFO: lifespan.startup.complete
    [2023-11-15 22:25:19] Netix (ASGI) (pid 18513) is started at 127.0.0.1 port 8080

Dependencies

  • [aiofiles][aiofile] - Required if you want to use the StaticMIddleware or File based Opertation.
  • [jinja2][jinja2] - Required if you want to use TemplateResponse.
  • [python-multipart][python-multipart] - Required if you want to support form parsing, with request.form().
  • [itsdangerous][itsdangerous] - Required for SessionMiddleware and CSRF support.

You can install all of these with pip3 install aquilify[full].

Aquilify is BSD licensed code.
Designed & crafted with care.

— ⭐️ —

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

aquilify-1.10.tar.gz (89.9 kB view hashes)

Uploaded Source

Built Distribution

aquilify-1.10-py3-none-any.whl (111.9 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