Skip to main content

CLI Tool

Project description

# Zerv :fire:

Yet another AWS Lambda [+ API Gateway] CLI deployment tool.

## IMPORTANT

This is a draft-project which means a lot, if not all, could change in next couple of weeks.

## Documentation

No docs for the time being.

This will create/update a lambda function and if you want you can attach a API Gateway trigger to it.

## Usage

For the time being the only way you can test is:

`python zerv/handler.py`

`python zerv/handler.py --dir=/path/to/your/project`

`python zerv/handler.py --function=prt_mx_rfc_validation`

This uses Boto3 so you need to check credentials config for it


### Settings

It will look like:

#### Project settings

```
project:
name: 'default'
root_dir: 'lambdas'
settings_file: 'settings'
source_code_folder: 'code'
requirements_file: 'requirements.txt'
precompiled_packages:
- requests: "/path/to"

permissions:
iam_role: "arn:aws:iam::9848734876:role/AROLE"

execution:
timeout: 300
memory_size: 128

```

#### Function settings

```
api_gateway:
enabled: true
endpoint: null
stage: default

environment:
required_variables:
- ENV

function:
description: "My fancy description"
arn: "some ARN so it doesnt create a new one"
name: "some name so it doesn't create a new one"
runtime: python3.6
handler: handler
```

#### Default settings

```
project:
name: 'Zerv Project'
root_dir: 'lambdas'
settings_file: 'settings'
source_code_folder: 'code'
requirements_file: 'requirements.txt'
precompiled_packages: ~

function:
arn: ~
description: ~
handler: handler
name: ~
requirements_file: 'requirements.txt'
runtime: python3.6
append_project_name: true

api_gateway:
enabled: false
endpoint: ~
stage: default

permissions:
iam_role: ~

execution:
timeout: 300
memory_size: 128

environment:
required_variables: ~
source_path: ~
```

## Contributors:

- [@pablotrinidad](https://github.com/pablotrinidad/)
- [@henocdz](https://github.com/henocdz/)

## TODOs

- [ ] Read/install requirements.txt
- [ ] Only install packages compatible with manylinux
- [ ] Include environment variables
- [ ] Documentation
- [ ] Replace argparse with click
- [ ] Handle errors properly
- [ ] ...

## CONTRIBUTING

Please don't do it... *yet*, this a draft-project with a lot of spaghetti-code, bad practices and not even ready for being a PyPi package, and of course, I'll squash several commits. If you're interested please drop me an email: henocdz [AT] gmail

If curious...

- Create a virtualenv
- Clone the project
- cd zerv
- pip install -e .

**Thx**


Project details


Download files

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

Source Distribution

zerv-0.1.0.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

zerv-0.1.0-py2.py3-none-any.whl (14.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file zerv-0.1.0.tar.gz.

File metadata

  • Download URL: zerv-0.1.0.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.4.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5

File hashes

Hashes for zerv-0.1.0.tar.gz
Algorithm Hash digest
SHA256 aff400517f2b5018bbe14465072ef048bc05bef1db09e5615e1fd6f50c5a9ffd
MD5 0a50c37c23c389d235c0f5e1da7b07b4
BLAKE2b-256 1b5e264d42c616697961d86e2daedea2a8b5b29496e0974ba759543d3e65f20b

See more details on using hashes here.

File details

Details for the file zerv-0.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: zerv-0.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 14.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.4.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5

File hashes

Hashes for zerv-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3a09884c60dd6cccdbf59877e361ea4dc629ff7c6201927d55d37f65836128b8
MD5 1e443ff7b0175e45d216b9cf4bde00e5
BLAKE2b-256 4bd6a5c882797f4d29a2e6233fb30e0d493b763a7f7640504eb3f3506fa2f21b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page