A tool for running Zappa commands in a Lambda-like' environment.
Project description
ZappaDock
Install
It's dead simple :
$ pip install zappadock
Usage
-
Check that the Docker daemon is running by typing
docker infocommand from a terminal. -
Set your AWS credentials in environmental variables or in the
~/.awsfolder. See the Amazon Docs for more information. -
Run
zappadockin the directory you wish to run your Zappa commands.
Your directory will be loaded in a docker container, and a virtual environment will be created and activated. -
To run the built-in servers:
- Django:
python manage.py runserver 0.0.0.0:8000 - Flask:
flask run --host=0.0.0.0 --port=8000
If you have any problems, open a issue and we'll figure it out.
About
This package makes dealing with Zappa a walk in the park.
How ?
Zappa runs Flask/Django web apps on AWS Lambda.
We LOVE Zappa. However it's not the MOST user-friendly application ever.
Why ?
You see, Zappa builds all your requirements before uploading your app to AWS Lambda. However, pip downloads the packages that are compatible with the computer it is running on, so when Zappa uploads it to AWS Lambda, many packages don't work (notably psycopg2 among others).
What's the solution ?
The solution recommend by the The Django Guide for Zappa is to run your Zappa commands in a docker container similar to the one that AWS Lambda uses.
This will ensure that all the dependencies will be AWS Lambda compatible.
This ZappaDock streamlines the workflow.
What Does ZappaDock Do ?
ZappaDock does 3 things.
- Run a docker container with your code mounted.
- Load your AWS Credentials from the
~/.awsfolder and environmental variables into the container. - Create and activate a virtual environment inside the container.
So now you can test and deploy your code confident that it will work once deployed.
Contributing
I mostly made this for myself. If you want to help make this a masterpiece, be a sport and contribute.
Thanks!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zappadock-0.1.10.tar.gz.
File metadata
- Download URL: zappadock-0.1.10.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92113872395aa1b87d9e7eb843fd08dd0ecd3d54086ea55b254e90d86180bbb9
|
|
| MD5 |
3bf2202d5805d98c3238a85082bd5840
|
|
| BLAKE2b-256 |
6985eb55e57d7f485a6da2c93a611e24cee928c2fa7b79ce5e793d9cd345fc49
|
File details
Details for the file zappadock-0.1.10-py3-none-any.whl.
File metadata
- Download URL: zappadock-0.1.10-py3-none-any.whl
- Upload date:
- Size: 16.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f317a10a8d91c5b9178b00cae63b73a40969bec1ce6e236d4d8c0f05eee6ea03
|
|
| MD5 |
2dc10cc971d9ee61141aac013eb4e2a3
|
|
| BLAKE2b-256 |
7a41e41507c675a8a8713aabc4d8c278d0b631ab477de27a3776fa8262ebf1ca
|