Skip to main content

A common runtime for AWS Python projects

Project description

AWS CRT Python

Version

Python 3 bindings for the AWS Common Runtime.

API documentation: https://awslabs.github.io/aws-crt-python/

License

This library is licensed under the Apache 2.0 License.

Minimum Requirements:

  • Python 3.6+

Installation

To install from pip:

python3 -m pip install awscrt

To install from Github:

git clone https://github.com/awslabs/aws-crt-python.git
cd aws-crt-python
git submodule update --init
python3 -m pip install .

To use from your Python application, declare awscrt as a dependency in your setup.py file.

Mac-Only TLS Behavior

Please note that on Mac, once a private key is used with a certificate, that certificate-key pair is imported into the Mac Keychain. All subsequent uses of that certificate will use the stored private key and ignore anything passed in programmatically. Beginning in v0.6.2, when a stored private key from the Keychain is used, the following will be logged at the "info" log level:

static: certificate has an existing certificate-key pair that was previously imported into the Keychain. Using key from Keychain instead of the one provided.

Running tests

After install, run from project root:

python3 -m unittest discover --failfast --verbose

--failfast stops after one failed test. This is useful because a failed test is likely to leak memory, which will cause the rest of the tests to fail as well.

--verbose makes it easier to see which tests are skipped.

Many tests require an AWS account. These tests are skipped unless specific environment variables are set:

MQTT

  • AWS_TEST_IOT_MQTT_ENDPOINT - AWS account-specific endpoint to connect to IoT core by
  • AWS_TEST_TLS_CERT_PATH - file path to certificate used to initialize the TLS context of the MQTT connection
  • AWS_TEST_TLS_KEY_PATH - file path to the private key used to initialize the TLS context of the MQTT connection
  • AWS_TEST_TLS_ROOT_CERT_PATH - file path to the root CA used to initialize the TLS context of the MQTT connection

PKCS11

  • AWS_TEST_PKCS11_LIB - path to PKCS#11 library
  • AWS_TEST_PKCS11_PIN - user PIN for logging into PKCS#11 token
  • AWS_TEST_PKCS11_TOKEN_LABEL - label of PKCS#11 token
  • AWS_TEST_PKCS11_KEY_LABEL - label of private key on PKCS#11 token, which must correspond to the cert at AWS_TEST_TLS_CERT_PATH.

PROXY

  • AWS_TEST_HTTP_PROXY_HOST - host address of the proxy to use for tests that make open connections to the proxy
  • AWS_TEST_HTTP_PROXY_PORT - port to use for tests that make open connections to the proxy
  • AWS_TEST_HTTPS_PROXY_HOST - host address of the proxy to use for tests that make TLS-protected connections to the proxy
  • AWS_TEST_HTTPS_PROXY_PORT - port to use for tests that make TLS-protected connections to the proxy
  • AWS_TEST_HTTP_PROXY_BASIC_HOST - host address of the proxy to use for tests that make open connections to the proxy with basic authentication
  • AWS_TEST_HTTP_PROXY_BASIC_PORT - port to use for tests that make open connections to the proxy with basic authentication
  • AWS_TEST_BASIC_AUTH_USERNAME - username to use when using basic authentication to the proxy
  • AWS_TEST_BASIC_AUTH_PASSWORD - password to use when using basic authentication to the proxy

S3

  • AWS_TEST_S3 - set to any value to enable S3 tests

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

awscrt-0.13.11.tar.gz (19.9 MB view hashes)

Uploaded Source

Built Distributions

awscrt-0.13.11-cp310-cp310-win_amd64.whl (1.9 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

awscrt-0.13.11-cp310-cp310-win32.whl (1.8 MB view hashes)

Uploaded CPython 3.10 Windows x86

awscrt-0.13.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.8 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

awscrt-0.13.11-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (7.0 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

awscrt-0.13.11-cp310-cp310-macosx_10_9_universal2.whl (1.1 MB view hashes)

Uploaded CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64)

awscrt-0.13.11-cp39-cp39-win_amd64.whl (1.9 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

awscrt-0.13.11-cp39-cp39-win32.whl (1.8 MB view hashes)

Uploaded CPython 3.9 Windows x86

awscrt-0.13.11-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.8 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

awscrt-0.13.11-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (7.0 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

awscrt-0.13.11-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl (6.7 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.5+ x86-64

awscrt-0.13.11-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl (6.2 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.5+ i686

awscrt-0.13.11-cp39-cp39-macosx_10_9_universal2.whl (1.1 MB view hashes)

Uploaded CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64)

awscrt-0.13.11-cp38-cp38-win_amd64.whl (1.9 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

awscrt-0.13.11-cp38-cp38-win32.whl (1.8 MB view hashes)

Uploaded CPython 3.8 Windows x86

awscrt-0.13.11-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.8 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

awscrt-0.13.11-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (7.0 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARM64

awscrt-0.13.11-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (6.7 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.5+ x86-64

awscrt-0.13.11-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl (6.2 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.5+ i686

awscrt-0.13.11-cp38-cp38-macosx_10_9_x86_64.whl (561.1 kB view hashes)

Uploaded CPython 3.8 macOS 10.9+ x86-64

awscrt-0.13.11-cp37-cp37m-win_amd64.whl (1.9 MB view hashes)

Uploaded CPython 3.7m Windows x86-64

awscrt-0.13.11-cp37-cp37m-win32.whl (1.8 MB view hashes)

Uploaded CPython 3.7m Windows x86

awscrt-0.13.11-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.8 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

awscrt-0.13.11-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (7.0 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ ARM64

awscrt-0.13.11-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (6.7 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.5+ x86-64

awscrt-0.13.11-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl (6.2 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.5+ i686

awscrt-0.13.11-cp37-cp37m-macosx_10_9_x86_64.whl (560.3 kB view hashes)

Uploaded CPython 3.7m macOS 10.9+ x86-64

awscrt-0.13.11-cp36-cp36m-win_amd64.whl (1.9 MB view hashes)

Uploaded CPython 3.6m Windows x86-64

awscrt-0.13.11-cp36-cp36m-win32.whl (1.8 MB view hashes)

Uploaded CPython 3.6m Windows x86

awscrt-0.13.11-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.8 MB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.17+ x86-64

awscrt-0.13.11-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (7.0 MB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.17+ ARM64

awscrt-0.13.11-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (6.7 MB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.5+ x86-64

awscrt-0.13.11-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl (6.2 MB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.5+ i686

awscrt-0.13.11-cp36-cp36m-macosx_10_9_x86_64.whl (560.3 kB view hashes)

Uploaded CPython 3.6m macOS 10.9+ x86-64

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