Builder for boto3-stubs
Project description
mypy_boto3_builder
Type annotations builder for boto3-stubs project. Compatible with mypy, pyright, VSCode, PyCharm and other tools.
Using boto3-stubs
Check boto3-stubs project for installation and usage instructions.
If you use up-to-date boto3
version, just install corresponding boto3-stubs
and start
using code auto-complete and mypy
validation. You can find instructions on
boto3-stubs page.
This page is only for building type annotations manually. For example, if you want to
use the latest features for an older boto3
version.
How to build type annotations
Locally
# Install preferred version of `boto3`
python -m pip install boto3==1.10.18 botocore==1.13.18
# Install `mypy-boto3-builder`
python -m pip install mypy-boto3-builder
# Build all packages
# You can specify required services explicitly like
# ./scripts/build.sh -s ec2 s3
./scripts/build.sh
# Install custom `boto3-stubs` packages
./scripts/install.sh
With Docker image
- Install Docker
- Pull latest
mypy_boto3_builder
version and tag it
docker pull docker.pkg.github.com/vemel/mypy_boto3_builder/mypy_boto3_builder_stable:latest
docker tag docker.pkg.github.com/vemel/mypy_boto3_builder/mypy_boto3_builder_stable:latest mypy_boto3_builder
- Generate stubs in
output
directory
mkdir output
# generate stubs for all services
docker run -v `pwd`/output:/output -ti mypy_boto3_builder
# generate stubs for s3 service
docker run -v `pwd`/output:/output -ti mypy_boto3_builder -s s3
# generate stubs for a specific boto3 version
docker run -e BOTO3_VERSION=1.10.18 BOTOCORE_VERSION=1.13.18 -v `pwd`/output:/output -ti mypy_boto3_builder
- Install packages from
output
directory as described above
Versioning
mypy_boto3_builder
version is not related to boto3
version and follows
PEP 440.
Latest changes
Full changelog can be found in Releases.
Thank you
- @alliefitter for boto3-type-annotations, this package is based on top of his work
- black developers for an awesome formatting tool
- @timothycrosley for isort and how flexible it is
- mypy for doing all dirty work for us
- pyright team for the new era of typed Python
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 Distributions
Built Distribution
Hashes for mypy_boto3_builder-3.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b6ccdb58c359137f10963ecb88145c98b0a9c9f2318f7273c1c1d733b41ad16 |
|
MD5 | 5dae085b84c65af74c2f9ca7a70aa7f6 |
|
BLAKE2b-256 | 90d8b910381fb428eff35b68440959e1725f088888f7a180111c93d389f2adbf |