===============
Python Vendor
===============
This package provides an AWS service API for building compiled Python packages,
ready for use in your own AWS Lambda functions.
Requirements
============
In addition to Python package requirements that will automatically be dealt
with during package installation, the vendor package assumes that the AWS CLI
is installed and configured on your system. By default, vendor makes use of
your AWS configuration as the ``aws`` command would.
To install awscli, please refer to the official documentation:
https://docs.aws.amazon.com/cli/latest/userguide/
Installation
============
Programmatic Deployment
-----------------------
The service package module provides a class for dealing with the Vendor stack
deployment. To create the stack using the default settings, simply do the
following:
::
>>> from vendor.service import VendorService
>>> vs = VendorService()
>>> vs.service()
{'ServiceURL': 'https://abcde01234.execute-api.region.amazonaws.com/api/',
'Version': '0.1'}
If all goes well, you will get back a dictionary containing the service
``Version`` and the ``ServiceURL``, which can be used to call your newly created
API. If the stacks already exist and are up-to-date, then the function will
simply return the information, rather than recreate it all over again.
Manual Deployment
-----------------
First, deploy the Vendor-deployment stack to prepare a bucket for Serverless
artifacts.
::
aws cloudformation deploy --stack-name Vendor-deployment --template-file vendor/aws/vendor-deployment.yml
The deployment bucket name can be found from the stack outputs.
::
aws cloudformation describe-stacks --stack-name Vendor-deployment
Next we can package and deploy the Vendor service.
::
aws cloudformation package --template-file vendor/aws/vendor.yml --s3-bucket {Vendor-deployment.BucketName} --output-template-file /tmp/vendorpk.yml
aws cloudformation deploy --stack-name Vendor --template-file /tmp/vendorpk.yml --capabilities CAPABILITY_IAM
Again, the service URL can be found from the stack outputs.
::
aws cloudformation describe-stacks --stack-name Vendor
Development
===========
Build toolchains
----------------
Because Lambda runs on a readonly filesystem, building is hard as the build
tools are not available on the system. Therefore, we have cheated a little and
instead spawn our own 'Lambda' on a self-destructing EC2 instance. This is done
by passing a script into the EC2 user-data and setting the instance to
terminate on shutdown, which the script does on exit.
Metadata
Release files for vendor 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| vendor-0.1.tar.gz | 11.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vendor-0.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 25.7 kB
Release files / vendor-0.1.tar.gz
| Download URL | vendor-0.1.tar.gz |
|---|---|
| Size | 11.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0b94221531404a04a3cff6b8f2f45a6b6d5a3db6b4ded773ee08f9b111aa65e6
|
|
BLAKE2b-256 checksum How to use checksums |
f12383c6fa95f3d9276d837d145bca6739ffa380932b39237ddf6c888f2eeaab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / vendor-0.1-py2.py3-none-any.whl
| Download URL | vendor-0.1-py2.py3-none-any.whl |
|---|---|
| Size | 13.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
b3ddb7e0ba334d3e73ed8fbfd437c243526b8dfdd98206e1e1a581361b72a6f1
|
|
BLAKE2b-256 checksum How to use checksums |
21f35719cd2314fd66a0605218929bfda6de4edf4e2450d773b65adade8ce9e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for vendor 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.