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.12.0

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.12.0
File Size Uploaded Provenance Actions
wellapi-0.12.0.tar.gz 114.6 kB Without provenance Details for wellapi-0.12.0.tar.gz

Built distribution (wheel)

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

Total release size: 183.6 kB

Release files / wellapi-0.12.0.tar.gz

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

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

Download URL wellapi-0.12.0-py3-none-any.whl
Size 69.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8b02b38ea3487c373aab1828dbd11757977fc7e13a1eca9bd4f4a6963fc15bbf
BLAKE2b-256 checksum
How to use checksums
42b1eb7a85c99e2d5227dd07c2a524288a66a9295167eba5b10848af1695acbb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.6.14

Security for wellapi 0.12.0

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.12.0 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