Skip to main content

Jar make it easy to store the state of your AWS Lambda functions.

Project description

# AWS Jar

[![PyPI version](](
[![Python 3.6](](
<a href=""><img alt="Code style: black" src=""></a>

<p align="center">
<img src="" alt="Jar Logo" width="45%" height="45%"/>

[Jar]( makes it easy to save the state of your AWS Lambda functions.
The data (either a dict or list) can be saved within the Lambda itself as an environment variable or on S3.

## Install
pip install awsjar

## Examples
### Save state with Jar inside a Lambda environment variable
import awsjar

# Save your data with the Lambda itself, as an Environment Variable.
jar = awsjar.Jar(lambda_name='sams-lambda')
data = {'num_acorns': 50, 'acorn_hideouts': ['tree', 'lake', 'backyard']}

state = jar.get()
>> {'num_acorns': 50, 'acorn_hideouts': ['tree', 'lake', 'backyard']}

### Save state with Bucket on an S3 bucket

import awsjar

# Save your data to an S3 object - s3://my-bucket/state.json
bkt = awsjar.Bucket(bucket='my-bucket', key='state.json')

data = {'num_acorns': 50, 'acorn_hideouts': ['tree', 'lake', 'backyard']}

state = bkt.get()
>> {'num_acorns': 50, 'acorn_hideouts': ['tree', 'lake', 'backyard']}

## Docs
[User Guide](

## Contributing

Please see the [contributing guide]( for more specifics.

## Contact

Please use the [Issues]( page

## License

Distributed under the Apache License 2.0. See [`LICENSE`](LICENSE) for more information.

Project details

Download files

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

Files for awsjar, version 0.0.20
Filename, size File type Python version Upload date Hashes
Filename, size awsjar-0.0.20.tar.gz (21.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page