Create, Read, Update, and Delete entries in an S3 bucket.
Creates a simple crud service using only binaris functions written in python3.
Get a Binaris API Key and an aws account (free trial account available from Amazon with CLI setup instructions available here).
# Install the Binaris CLI
$ npm install -g binaris
# Set your API key in ~/.binaris.yml
$ bn login
# Clone this repo
$ git clone [email protected]:binaris/functions-examples.git
$ cd python-crud-s3
# Pull the bob repo so you can compile the pip dependencies.
$ git clone [email protected]:binaris/bob.git
# Set the environment variables for deployment
$ export S3_BUCKET_NAME={your-designated-s3-bucket}
# Deploy the functions:
$ ./deploy.sh
# Use the endpoints supplied to create and modify data in s3 using the binaris CLI or curl commands
$ bn invoke create_or_update --data '{"key": "somekey", "object": {someobject}}'
$ curl -H X-Binaris-Api-Key:{your-binaris-api-key} 'https://run.binaris.com/v2/run/{your-account-id}/delete?key=somekey'
Proposed changes should adhere to the python PEP8 style guide, and can be checked using pycodestyle.
# Install pycodestyle
$ pip3 install pycodestyle
# Run style check on src directory
$ pycodestyle src/