Skip to content

Installation & Usage

1. Python Package

Download

Install the package using pip (@ is optional, main is latest, use a version tag for a specific version):

python -m pip install aws-lambda-calculator@git+https://github.com/zmynx/aws-lambda-calculator#egg=aws-lambda-calculator&subdirectory=aws-lambda-calculator@main

Then import the package in your python code (.py):

import aws_lambda_calculator

2. API

Clone the repository and install the requirements:

git clone https://github.com/zMynx/aws-lambda-calculator.git
python -m pip install --requirementes requirements.txt

Then run the main.py file with the required arguments:

python ./main.py --key=value....

3. CLI

Use the setup script to install the binary:

curl --remote-name https://github.com/zMynx/aws-lambda-calculator/blob/main/run.sh | bash -s -- --install

Then run the binary with the required arguments:

aws-lambda-calculator --key=value....

Optinally, use the alias alc for the binary:

alias alc=aws-lambda-calculator
alc --key=value....

4. Docker image

Install this package If you wish to use the API on any platform, without installing the binary, use the docker image.

Pull the image:

docker pull ghcr.io/zMynx/aws-lambda-calculator:latest

Then run the image with the required arguments:

docker run \
    --name aws-lambda-calculator \
    --interactive \
    --tty \
    --rm \
    --pull \
    --args key=value...

5. Serverless API

The serverless API solution is based on a Lambda function, and can be used by invoking the endpoint, while providing a payload of the configurations to use.\ Endpoint: https://zmynx.aws-lambda-calculator.com

e.g. (example using the cli)

curl \
    --data '{"payload":{"key":"value"}}' \
    https://zmynx.aws-lambda-calculator.com

6. Web based solution

Navigate to https://github.com/zMynx/aws-lambda-calculator.io.

:octocat: Report :octocat:

Encountered an issue? Think you've found a bug?\ Check our closed issues tab for viable solutions, or create a new issue here.