Skip to content
This repository was archived by the owner on Mar 13, 2024. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: slank/awsgi
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: advian-oss/awsgi
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: deprecation
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 1 commit
  • 9 files changed
  • 1 contributor

Commits on Oct 18, 2022

  1. Copy the full SHA
    d28a8a5 View commit details
Showing with 33 additions and 491 deletions.
  1. +0 −20 .travis.yml
  2. +0 −21 LICENSE.txt
  3. +0 −13 Makefile
  4. +33 −9 README.rst
  5. +0 −173 awsgi/__init__.py
  6. 0 requirements.txt
  7. +0 −2 setup.cfg
  8. +0 −40 setup.py
  9. +0 −213 test_awsgi.py
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

21 changes: 0 additions & 21 deletions LICENSE.txt

This file was deleted.

13 changes: 0 additions & 13 deletions Makefile

This file was deleted.

42 changes: 33 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
@@ -2,24 +2,26 @@
AWSGI
=====

A WSGI adapter for AWS API Gateway/Lambda Proxy Integration
===========================================================

AWSGI allows you to use WSGI-compatible middleware and frameworks like Flask and Django with the `AWS API Gateway/Lambda proxy integration <https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-set-up-simple-proxy.html>`_.

Replaced by an improved fork `awsgi2 <https://gitlab.com/advian-oss/python-awsgi2>`_.

Installation
------------

``awsgi`` is available from PyPI as ``aws-wsgi``::
``awsgi2`` is available from PyPI as ``awsgi2``::

pip install aws-wsgi
pip install awsgi2

Example
-------
Examples
--------

Flask
^^^^^

.. code-block:: python
import awsgi
import awsgi2
from flask import (
Flask,
jsonify,
@@ -34,4 +36,26 @@ Example
def lambda_handler(event, context):
return awsgi.response(app, event, context, base64_content_types={"image/png"})
return awsgi2.response(app, event, context, base64_content_types={"image/png"})
Django
^^^^^^

.. code-block:: python
import os
import awsgi2
from django.core.wsgi import get_wsgi_application
# my_app_directory/settings.py is a vanilla Django settings file, created by "django-admin startproject".
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'my_app_directory.settings')
# In the settings.py file, you may find it useful to include this setting to remove
# Django's need for SQLite, which is currently (2020-11-17) outdated in the Lambda runtime image
# DATABASES = { 'default': { 'ENGINE': 'django.db.backends.dummy', } }
application = get_wsgi_application()
def lambda_handler(event, context):
return awsgi2.response(application, event, context, base64_content_types={"image/png"})
173 changes: 0 additions & 173 deletions awsgi/__init__.py

This file was deleted.

Empty file removed requirements.txt
Empty file.
2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

40 changes: 0 additions & 40 deletions setup.py

This file was deleted.

Loading