architect-functions
Runtime utility package for Functional Web Apps (FWAs) built with Architect
Check out the full docs for this library and Architect
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 Lambdarequirements.txt
files, but we suggest making use of Architect's automated Lambda treeshaking. See the Architect dependency management guide for more details.
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
arc.events.parse()
](https://arc.codes/docs/en/reference/runtime-helpers/python#arc.events.parse())arc.events.publish()
](https://arc.codes/docs/en/reference/runtime-helpers/python#arc.events.publish())arc.http.parse_body()
](https://arc.codes/docs/en/reference/runtime-helpers/python#arc.http.parse_body())arc.http.res()
](https://arc.codes/docs/en/reference/runtime-helpers/python#arc.http.res())arc.http.session_read()
](https://arc.codes/docs/en/reference/runtime-helpers/python#arc.http.session_read())arc.http.session_write()
](https://arc.codes/docs/en/reference/runtime-helpers/python#arc.http.session_write())arc.queues.parse()
](https://arc.codes/docs/en/reference/runtime-helpers/python#arc.queues.parse())arc.queues.publish()
](https://arc.codes/docs/en/reference/runtime-helpers/python#arc.queues.publish())[Service discovery](https://arc.codes/docs/en/reference/runtime-helpers/python#arc.services())
arc.services()
](https://arc.codes/docs/en/reference/runtime-helpers/python#arc.services())arc.tables.name()
](https://arc.codes/docs/en/reference/runtime-helpers/python#arc.tables.name())arc.tables.table()
](https://arc.codes/docs/en/reference/runtime-helpers/python#arc.tables.table())arc.ws.api()
](https://arc.codes/docs/en/reference/runtime-helpers/python#arc.ws.api())arc.ws.close()
](https://arc.codes/docs/en/reference/runtime-helpers/python#arc.ws.close())arc.ws.info()
](https://arc.codes/docs/en/reference/runtime-helpers/python#arc.ws.info())arc.ws.send()
](https://arc.codes/docs/en/reference/runtime-helpers/python#arc.ws.send())Install Pipenv
pipenv install --dev
pipenv run pytest