Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Pythonic Microservices on AWS Lambda

Project Description

Psychic Disco

  • Are you a poor dope with a program to deploy?
  • Need to produce a demo, but haven’t yet hit pay dirt?
  • Love python development, but not product delivery?

Then let Psychic Disco be your principal delegate for publicly displaying your work!

By leveraging the pioneering domains of AWS Lambda and the Serverless Web, Psychic Disco allows even plebian dummies like you and I to scale the platforms of our dreams on the cheap.

Stinking Badges

Installing

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

Creating a Deployment Package

Do this thing:

psychic_disco bundle

That will make a virtualenv, install your dependencies, and zip it all up for you. This assumes that you have psychic_disco.config.default_s3_bucket defined in your psychic_disco_config.py

Deploying Lambda Functions

Once a deployment package has been uploaded to Amazon S3, you can install the lambda functions you defined like so:

psychic_disco deploy_lambdas

This assumes that you have psychic_disco.config.default_iam_role defined in your psychic_disco_config.py

Querying AWS

You can see what has already been configured on AWS by running:

psychic_disoc show_installed_routes <api-name>

Which will output something like:

verb path lambda-function
GET /users users-list_all
POST /users users-create_new
PATCH /user/7 users-update
Release History

Release History

This version
History Node

0.10.2

History Node

0.10.0

History Node

0.9.1

History Node

0.9.0

History Node

0.8.0

History Node

0.7.4

History Node

0.7.3

History Node

0.7.2

History Node

0.7.1

History Node

0.7.0

History Node

0.6.5

History Node

0.6.3

History Node

0.6.2

History Node

0.6.1

History Node

0.6.0

History Node

0.5.0

History Node

0.4.0

History Node

0.3.1

History Node

0.2.0

History Node

0.1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
psychic_disco-0.10.2.tar.gz (10.1 kB) Copy SHA256 Checksum SHA256 Source Jun 12, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting