uv-python-lambda
Project description
uv-python-lambda
CDK Construct for Python Lambda Functions using uv
Goals
- ⚡️ Package and deploy Lambda Functions faster with
uv's speed - 📦 Support workspaces in a monorepo with uv workspaces
uv-python-lambda is based on aws-lambda-python-alpha with some differences:
- It only supports
uvfor packaging - there is no Poetry or pip support - It supports workspaces so you can build multiple Lambda functions from different uv workspaces and have their dependencies included correctly. This is useful for, but not limited to, monorepos.
API
See API.md
Example
from uv_python_lambda import PythonFunction
from constructs import Construct
# The root path should be relative to your CDK source file
root_path = Path(__file__).parent.parent.parent
class CdkStack(Stack):
def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:
super().__init__(scope, construct_id, **kwargs)
fn = PythonFunction(
self,
"fn",
root_dir=str(root_path),
index="fetcher_lambda.py",
workspace_package="fetcher", # Use a workspace package as the top-level Lambda entry point.
handler="handle_event",
bundling={
"asset_excludes": [
".venv/",
"node_modules/",
"cdk/",
".git/",
".idea/",
"dist/",
]
},
timeout=Duration.seconds(30),
)
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
uv_python_lambda-0.0.7.tar.gz
(79.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file uv_python_lambda-0.0.7.tar.gz.
File metadata
- Download URL: uv_python_lambda-0.0.7.tar.gz
- Upload date:
- Size: 79.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e55e345b3b82b535dccee29dfdbc55f838f0c5fe55fc38ea3857b5b7870d4773
|
|
| MD5 |
4628e6a22336329368e144f452d232a3
|
|
| BLAKE2b-256 |
fd57669f5f675e03668af90d35c0f637a88fb6e377e890f54bb5d67bd3d2835a
|
File details
Details for the file uv_python_lambda-0.0.7-py3-none-any.whl.
File metadata
- Download URL: uv_python_lambda-0.0.7-py3-none-any.whl
- Upload date:
- Size: 78.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
165e9719421e359563b10f67e31a00a5e35caca4ada38e4b389eda610f1b9587
|
|
| MD5 |
aefa157f6c4983477311e16e1de0c018
|
|
| BLAKE2b-256 |
da48fc5f52e77b041be3eab0ad5026504ebcee66009ee9b7c26429f9575e7dcc
|