Skip to main content

Utility library for Yandex.Cloud

Project description

yalambda

Yalambda lets you write Yanex.Cloud Functions with less boilerplate

Features:

  • everything is type-annotated, so you'll get autocompletion in IDEs
  • base64 de/encoding and other details are handled for you

Echo server example

from yalambda import function, YaRequest, YaResponse


@function()
async def handler(req: YaRequest) -> YaResponse:
    return YaResponse(200, req.body)

Initialize something asynchronously on first call

from yalambda import function, YaRequest, YaResponse


async def init():
    global answer
    answer = 42


@function(init)
async def handler(req: YaRequest) -> YaResponse:
    return YaResponse(200, "Answer:".format(answer))

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

yalambda-0.2.2.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distribution

yalambda-0.2.2-py3-none-any.whl (3.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page