architect / functions-python

AWS Lambda Python runtime helpers for Architect apps
Apache License 2.0
14 stars 7 forks source link
Architect Logo

architect-functions

Runtime utility package for Functional Web Apps (FWAs) built with Architect

GitHub CI status

Check out the full docs for this library and Architect

Install

Within your Architect project directory, add architect-functions to its root requirements.txt:

pip install architect-functions -r requirements.txt

You may also add architect-functions to individual Lambda requirements.txt files, but we suggest making use of Architect's automated Lambda treeshaking. See the Architect dependency management guide for more details.

Usage

import arc          # Import all tools, or
import arc.events   # @events pub/sub
import arc.http     # @http tools + sessions
import arc.queues   # @queues pub/sub
import arc.services # Architect resource / service discovery
import arc.tables   # @tables DynamoDB helper methods + API client
import arc.ws       # @ws WebSocket helper + API client

API

@events methods

@http methods

@queues methods

[Service discovery](https://arc.codes/docs/en/reference/runtime-helpers/python#arc.services())

@tables methods

@ws methods


Development

Install Pipenv

pipenv install --dev

Testing

pipenv run pytest