Skip to main content

A little library I building to simplify building small web services (mostly APIs) on top of AWS Lambda.

Project description

Deez (Under Development)

A little library I building to simplify building small web services (mostly APIs) on top of AWS Lambda.



pip install deez

Example of how to use

Note: The Deez router uses regex for path matching.

from deez import Deez
from deez.views import Resource
from deez.response import JsonResponse

class HelloWorldView(Resource):
    def get(self, request, *args, **kwargs):
        return JsonResponse(data={'message': 'hello world'})

app = Deez()
app.register_route('^hello/world$', HelloWorldView)

from deez.middleware import Middleware

class User:
    # fake user object

class AuthMiddleware(Middleware):
    def before_request(self, request):
        # do auth things
        request.user = User() 
        return request

# middleware runs before views are called and before the response is returned
# so you can manipulate the response and requests objects.
MIDDLEWARE = ['middleware.AuthMiddleware']

from app import app

def handle_event(event, context):
    return app.process_request(event, context)

Project details

Download files

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

Files for deez, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size deez-0.2.0.tar.gz (6.8 kB) File type Source Python version None Upload date Hashes View
Filename, size deez-0.2.0-py3-none-any.whl (9.3 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page