django-lgi - Django Lambda Gateway Interface
django-lgi is a python module that interprets HTTP API requests sent to your Django project in Lambda.
Features
- Process 2.0 payload format version data that API Gateway sends to a Lambda integration.
- Trigger management commands directly on lambda, e.g. invoke lambda function with
{"manage": ["version"]}to display the current Django version.
Installation
pip install django-lgi
Usage
Create lgi.py file in Django project root. Remember to replace mysite.settings with dotted path to your settings module.
import os
from lgi import get_lgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings")
application = get_lgi_application()
Set lambda handler to mysite.lgi.application.
Examples
- Djambda - example project setting up Django application in AWS Lambda managed by Terraform.
Related Projects
Testing
To run the test suite, first, create and activate a virtual environment. Then run tests.
$ flit install -s
$ cd tests
$ ./runtests.py
Metadata
Release files for django-lgi 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-lgi-0.1.2.tar.gz | 7.2 kB | Without provenance | Details for django-lgi-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_lgi-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for django_lgi-0.1.2-py3-none-any.whl |
Total release size: 11.6 kB
Release files / django-lgi-0.1.2.tar.gz
| Download URL | django-lgi-0.1.2.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5b265c194a756107fd8fa49e79837ee0d86305f39eebfa3e30928ec15aae346a
|
|
BLAKE2b-256 checksum How to use checksums |
4bae801e3379a7a417d386a0e645c7eefcd5cc78034738d4a30b9e3b9ffd4086
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.23.0
|
Release files / django_lgi-0.1.2-py3-none-any.whl
| Download URL | django_lgi-0.1.2-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8274a117e0d24832208d8544d3edd1ed3d9346fc9443aaea96e31d2bb529b4bd
|
|
BLAKE2b-256 checksum How to use checksums |
17a85fc6b533e29aeb2f674cca755f58a8803c54a7c396dc7511d8ece2161314
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.23.0
|
Security for django-lgi 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.