https://github.com/awslabs/aws-crt-python
Python bindings for the AWS Common Runtime
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.3%) to scientific vocabulary
Keywords from Contributors
Repository
Python bindings for the AWS Common Runtime
Basic Info
Statistics
- Stars: 90
- Watchers: 23
- Forks: 48
- Open Issues: 19
- Releases: 232
Metadata Files
README.md
AWS CRT Python
Python 3 bindings for the AWS Common Runtime.
- API documentation
- Development guide for contributors to aws-crt-python's source code.
License
This library is licensed under the Apache 2.0 License.
Minimum Requirements:
- Python 3.8+
Installation
To install from pip:
bash
python3 -m pip install awscrt
To install from Github:
bash
git clone https://github.com/awslabs/aws-crt-python.git
cd aws-crt-python
git submodule update --init
python3 -m pip install .
See Advanced Build Options for more info about building from source.
Fork and Multiprocessing
aws-crt-python uses background threads. This makes os.fork() unsafe. In a forked child process, all background threads vanish. The child will hang or crash when it tries to communicate with any of these (vanished) threads.
Unfortunately, Python's multiprocessing module defaults to using fork when it creates child processes (on POSIX systems except macOS, in Python versions 3.13 and earlier). multiprocessing is used under the hood by many tools that do work in parallel, including concurrent.futures.ProcessPoolExecutor, and pytorch.multiprocessing.
If you need to use multiprocessing with aws-crt-python, set it to use "spawn" or "forkserver" instead of "fork" (see docs). The Python community agrees, and multiprocessing will changes its default from "fork" to "spawn" in 3.14. It already uses "spawn" by default on macOS (because system libraries may start threads) and on Windows (because fork does not exist).
If you must use fork with aws-crt-python, you may be able to avoid hangs and crashes if you manage your threads very carefully:
- Release all CRT resources with background threads (e.g. clean up any
io.EventLoopGroupinstances). - Join all CRT threads before forking (use
common.join_all_native_threads()).
For an example, see test.test_s3.py.S3RequestTest.test_fork_workaround .
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.
Crash Handler
You can enable the crash handler by setting the environment variable AWS_CRT_CRASH_HANDLER=1 . This will print the callstack to stderr in the event of a fatal error.
Advanced Build Options
OpenSSL and LibCrypto
aws-crt-python does not use OpenSSL for TLS. On Apple and Windows devices, the OS's default TLS library is used. On Unix devices, s2n-tls is used. But s2n-tls uses libcrypto, the cryptography math library bundled with OpenSSL.
To simplify installation, aws-crt-python has its own copy of libcrypto. This lets you install a wheel from PyPI without having OpenSSL installed. Unix wheels on PyPI come with libcrypto statically compiled in. Code to build libcrypto comes from AWS-LC. AWS-LC's code is included in the PyPI source package, and the git repository includes it as a submodule.
If you need aws-crt-python to use the libcrypto included on your system,
set environment variable AWS_CRT_BUILD_USE_SYSTEM_LIBCRYPTO=1 while building from source:
sh
AWS_CRT_BUILD_USE_SYSTEM_LIBCRYPTO=1 python3 -m pip install --no-binary :all: --verbose awscrt
( --no-binary :all: ensures you do not use the precompiled wheel from PyPI)
aws-crt-python also exposes a number of cryptographic primitives.
On Unix, those depend on libcrypto as described above.
On Apple and Windows OS level crypto libraries are used whenever possible.
One exception to above statement is that for ED25519 keygen on Windows and Apple,
libcrypto is used as no viable OS level alternative exists. In that case Unix level notes
about libcrypto apply to Apple and Windows as well. Libcrypto usage for ED25519 support is
enabled on Windows and Apple by default and can be disabled by setting environment variable
AWS_CRT_BUILD_DISABLE_LIBCRYPTO_USE_FOR_ED25519_EVERYWHERE as follows:
(Note: ED25519 keygen functions will start returning not supported error in this case)
sh
AWS_CRT_BUILD_DISABLE_LIBCRYPTO_USE_FOR_ED25519_EVERYWHERE=1 python3 -m pip install --no-binary :all: --verbose awscrt
( --no-binary :all: ensures you do not use the precompiled wheel from PyPI)
AWSCRTBUILDUSESYSTEM_LIBS
aws-crt-python depends on several C libraries that make up the AWS Common Runtime (libaws-c-common, libaws-c-s3, etc). By default, these libraries are built along with aws-crt-python and statically compiled in (their source code is under crt/).
To skip building these dependencies, because they're already available on your system,
set environment variable AWS_CRT_BUILD_USE_SYSTEM_LIBS=1 while building from source:
sh
AWS_CRT_BUILD_USE_SYSTEM_LIBS=1 python3 -m pip install .
If these dependencies are available as both static and shared libs, you can force the static ones to be used by setting: AWS_CRT_BUILD_FORCE_STATIC_LIBS=1
Windows SDK Version
aws-crt-python builds against windows sdk version 10.0.17763.0. This is the minimal version required for TLS 1.3 support on Windows. If you need a different Windows SDK version, you can set environment variable AWS_CRT_WINDOWS_SDK_VERSION=<version> while building from source:
Owner
- Name: Amazon Web Services - Labs
- Login: awslabs
- Kind: organization
- Location: Seattle, WA
- Website: http://amazon.com/aws/
- Repositories: 914
- Profile: https://github.com/awslabs
AWS Labs
Committers
Last synced: about 3 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Michael Graeb | g****m@a****m | 136 |
| Jonathan M. Henson | h****o@a****m | 43 |
| Justin Boswell | b****j@a****m | 36 |
| Bret Ambrose | b****e@g****m | 26 |
| Dengke Tang | 8****5@q****m | 23 |
| Colden Cullen | c****n@c****m | 16 |
| Jonathan M. Henson | j****n@g****m | 12 |
| Dengke Tang | d****t@a****m | 10 |
| Justin Boswell | j****l@g****m | 9 |
| TwistedTwigleg | n****d@a****m | 9 |
| Steve Kim | 8****K@u****m | 8 |
| Ryan Carper | 5****r@u****m | 8 |
| James Siri | j****i@a****m | 7 |
| David Oguns | 3****S@u****m | 4 |
| ilevyor | 8****r@u****m | 4 |
| Waqar Ahmed Khan | w****7@g****m | 3 |
| xiazhvera | z****a@a****m | 3 |
| Richard Elberger | r****h@r****m | 2 |
| Nikola Forró | n****o@r****m | 2 |
| Joel Knight | k****l@g****m | 1 |
| Joel Knight | k****l@a****m | 1 |
| Colden Cullen | c****n@a****m | 1 |
| Dmitriy Musatkin | 6****n@u****m | 1 |
| Andrew Tang | t****1@1****m | 1 |
| Alex Weibel | a****1@g****m | 1 |
| Joseph Klix | j****x@g****m | 1 |
| TwistedTwigleg | t****g@g****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 62
- Total pull requests: 348
- Average time to close issues: 11 months
- Average time to close pull requests: about 1 month
- Total issue authors: 59
- Total pull request authors: 29
- Average comments per issue: 3.24
- Average comments per pull request: 0.2
- Merged pull requests: 274
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 10
- Pull requests: 130
- Average time to close issues: 3 days
- Average time to close pull requests: 6 days
- Issue authors: 10
- Pull request authors: 15
- Average comments per issue: 1.6
- Average comments per pull request: 0.2
- Merged pull requests: 108
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- major (2)
- thomas-roos (2)
- massi-ang (2)
- nforro (1)
- mayosuke (1)
- DeboBurro (1)
- darko-mesaros (1)
- benkehoe (1)
- liugongqx (1)
- tipu (1)
- Lewenhaupt (1)
- sunpoet (1)
- tollsimy (1)
- papoteur-mga (1)
- imgguti (1)
Pull Request Authors
- graebm (63)
- TingDaoK (53)
- waahm7 (51)
- sbSteveK (33)
- bretambrose (32)
- xiazhvera (22)
- DmitriyMusatkin (19)
- sfod (17)
- TwistedTwigleg (10)
- nforro (7)
- alfred2g (6)
- JonathanHenson (5)
- jmklix (4)
- alexw91 (3)
- jonathan343 (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 15
-
Total downloads:
- pypi 6,399,911 last-month
- Total docker downloads: 205,299,862
-
Total dependent packages: 30
(may contain duplicates) -
Total dependent repositories: 77
(may contain duplicates) - Total versions: 332
- Total maintainers: 4
pypi.org: awscrt
A common runtime for AWS Python projects
- Documentation: https://awscrt.readthedocs.io/
- License: Apache-2.0
-
Latest release: 0.27.6
published 11 months ago
Rankings
Maintainers (1)
alpine-v3.18: py3-awscrt-pyc
Precompiled Python bytecode for py3-awscrt
- Homepage: https://github.com/awslabs/aws-crt-python
- License: Apache-2.0
-
Latest release: 0.20.2-r0
published over 2 years ago
Rankings
Maintainers (1)
alpine-v3.18: py3-awscrt
Python bindings for the AWS Common Runtime
- Homepage: https://github.com/awslabs/aws-crt-python
- License: Apache-2.0
-
Latest release: 0.20.2-r0
published over 2 years ago
Rankings
Maintainers (1)
alpine-edge: py3-awscrt
Python bindings for the AWS Common Runtime
- Homepage: https://github.com/awslabs/aws-crt-python
- License: Apache-2.0
-
Latest release: 0.27.6-r0
published 11 months ago
Rankings
Maintainers (1)
alpine-edge: py3-awscrt-pyc
Precompiled Python bytecode for py3-awscrt
- Homepage: https://github.com/awslabs/aws-crt-python
- License: Apache-2.0
-
Latest release: 0.27.6-r0
published 11 months ago
Rankings
Maintainers (1)
conda-forge.org: awscrt
- Homepage: https://github.com/awslabs/aws-crt-python
- License: Apache-2.0
-
Latest release: 0.15.3
published over 3 years ago
Rankings
anaconda.org: awscrt
Python 3 bindings for the AWS Common Runtime.
- Homepage: https://github.com/awslabs/aws-crt-python
- License: Apache-2.0
-
Latest release: 0.27.4
published 12 months ago
Rankings
alpine-v3.20: py3-awscrt
Python bindings for the AWS Common Runtime
- Homepage: https://github.com/awslabs/aws-crt-python
- License: Apache-2.0
-
Latest release: 0.20.3-r1
published about 2 years ago
Rankings
alpine-v3.22: py3-awscrt
Python bindings for the AWS Common Runtime
- Homepage: https://github.com/awslabs/aws-crt-python
- License: Apache-2.0
-
Latest release: 0.27.2-r0
published about 1 year ago
Rankings
Maintainers (1)
alpine-v3.22: py3-awscrt-pyc
Precompiled Python bytecode for py3-awscrt
- Homepage: https://github.com/awslabs/aws-crt-python
- License: Apache-2.0
-
Latest release: 0.27.2-r0
published about 1 year ago
Rankings
Maintainers (1)
alpine-v3.21: py3-awscrt
Python bindings for the AWS Common Runtime
- Homepage: https://github.com/awslabs/aws-crt-python
- License: Apache-2.0
-
Latest release: 0.23.3-r0
published over 1 year ago
Rankings
Maintainers (1)
alpine-v3.20: py3-awscrt-pyc
Precompiled Python bytecode for py3-awscrt
- Homepage: https://github.com/awslabs/aws-crt-python
- License: Apache-2.0
-
Latest release: 0.20.3-r1
published about 2 years ago
Rankings
alpine-v3.19: py3-awscrt
Python bindings for the AWS Common Runtime
- Homepage: https://github.com/awslabs/aws-crt-python
- License: Apache-2.0
-
Latest release: 0.20.2-r0
published about 2 years ago
Rankings
alpine-v3.21: py3-awscrt-pyc
Precompiled Python bytecode for py3-awscrt
- Homepage: https://github.com/awslabs/aws-crt-python
- License: Apache-2.0
-
Latest release: 0.23.3-r0
published over 1 year ago
Rankings
Maintainers (1)
alpine-v3.19: py3-awscrt-pyc
Precompiled Python bytecode for py3-awscrt
- Homepage: https://github.com/awslabs/aws-crt-python
- License: Apache-2.0
-
Latest release: 0.20.2-r0
published about 2 years ago
Rankings
Dependencies
- actions/checkout v3 composite
- awslabs/aws-crt-builder/.github/actions/check-submodules main composite
- cross-platform-actions/action v0.10.0 composite
- vmactions/freebsd-vm v0 composite
- aws-actions/closed-issue-message v1 composite
- actions/checkout v3 composite
- ad-m/github-push-action v0.6.0 composite
- aws-github-ops/handle-stale-discussions v1 composite
- DoozyX/clang-format-lint-action v0.3.1 composite
- actions/checkout v2 composite
- aws-actions/stale-issue-cleanup v3 composite
- autopep8 * development
- setuptools * development
- sphinx * development
- websockets * development
- wheel * development