Skip to main content

WellAPI

pip

WellAPI is a lightweight web framework for building APIs on AWS Lambda and API Gateway.

Documentation

Features

  • Lambda-first route definitions (GET, POST, PUT, PATCH, DELETE)
  • Type-based request parsing and validation with Pydantic
  • Dependency injection via Depends
  • Middleware and custom exception handlers
  • OpenAPI generation compatible with API Gateway integrations
  • SQS handlers and scheduled job handlers
  • Packaging helpers for Lambda app code and dependency layers

Installation

Install the base package:

pip install wellapi

Install with optional extras:

pip install "wellapi[local,deploy,telemetry]"
  • local: local server/test tooling
  • deploy: AWS CDK integration
  • telemetry: native OpenTelemetry support (traces, metrics, logs) — see docs/telemetry.md

Quick Start

main.py:

from wellapi import WellApi

app = WellApi(title="My API", version="1.0.0")

@app.get("/hello")
def hello():
    return {"message": "Hello, World!"}

Create a handlers/ directory for additional endpoints if needed:

handlers/
  __init__.py
  users.py

Local Development

Run with Uvicorn:

uvicorn main:app --reload

If your handlers are not in the default handlers/ directory, configure it in pyproject.toml:

[wellapi]
handlers_dir = "your_handlers_dir"

CLI

Generate OpenAPI:

wellapi openapi main:app handlers --output openapi.json

Enable CORS in OpenAPI output:

wellapi openapi main:app handlers --output openapi.json --cors true --role_name WellApiRole

Build deployment artifacts:

wellapi build app app.zip
wellapi build dep deps.zip

Deploy with AWS CDK

from aws_cdk import Stack
from constructs import Construct
from wellapi.build.cdk import WellApiCDK


class MyStack(Stack):
    def __init__(self, scope: Construct, id_: str, **kwargs) -> None:
        super().__init__(scope, id_, **kwargs)

        WellApiCDK(
            self,
            "WellApiCDK",
            app_srt="main:app",
            handlers_dir="handlers",
            cors=True,
            cache_enable=False,
            log_enable=True,
        )

Notes

  • API Gateway cache support applies to GET endpoints.
  • For full framework usage (routing, DI, middleware, SQS/jobs, testing), see docs/framework-usage.md.

Metadata

Release files for wellapi 0.11.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wellapi 0.11.3
File Size Uploaded Provenance Actions
wellapi-0.11.3.tar.gz 113.3 kB Without provenance Details for wellapi-0.11.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wellapi 0.11.3
File Interpreter ABI Platform Actions
wellapi-0.11.3-py3-none-any.whl Python 3 none any Details for wellapi-0.11.3-py3-none-any.whl

Total release size: 182.1 kB

Release files / wellapi-0.11.3.tar.gz

Download URL wellapi-0.11.3.tar.gz
Size 113.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a184ff224d7e089cf69f851c610cdd66996fef9e9a38afbcee8a988d4f9e36ab
BLAKE2b-256 checksum
How to use checksums
d24d5f1a387c4951d670d0fe2d8a4b82e7f2c7e169794aee58866437a026103c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.6.14

Release files / wellapi-0.11.3-py3-none-any.whl

Download URL wellapi-0.11.3-py3-none-any.whl
Size 68.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ad715d2b77abd8df4bee8c779bc4f74df63c517dbbf192da3d22fe1dd2ecaf61
BLAKE2b-256 checksum
How to use checksums
bf760ea2dc0ca46aa2a681f419bccaa9c8b8a4281c36325a60637e25bb611e6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.6.14

Security for wellapi 0.11.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.11.3 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page