Skip to main content

Pythonic Microservices on AWS Lambda

Project description

Psychic Disco

Pythonic microservices for AWS Lambda. Define Lambda functions as python modules, automatically create and upload deployment packages, register API Gateway methods to trigger your lambdas. Do that thing where your configuration lives in your code.

Install like so:

pip install psychic_disco

Assumptions

  • All your microservices live in python modules

  • All your entrypoints are decorated with @lambda_entry_point

Declaring Entrypoints and API methods

Make a new entrypoint:

@lambda_entry_point
def handler(event, context):
  # important code here

Making a new api method automatically registers the entrypoint:

@api_method("POST", "/cereal"):
def create_cereal(event, context):
  # cereal creation logic here

Definitions for your API methods are available in psychic_disco.Api.

Discovering Entrypoints

Do this thing:

psychic_disco discover_entrypoints

Or, if your code lives elsewhere:

psychic_disco --repo path/to/st/elsewhere discover_entrypoints

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

psychic_disco-0.4.0.tar.gz (2.5 kB view hashes)

Uploaded Source

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