Skip to main content

boto3-type

Lightweight type check for boto3 service, resource instances.

Install:

pip install boto3_type

Problem:

In [1]: import boto3

In [2]: import botocore

In [3]: s3 = boto3.client("s3")

In [4]: type(s3)
Out[4]: botocore.client.S3

In [5]: isinstance(s3, botocore.client.S3)
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-5-a7f37740cc80> in <module>
----> 1 isinstance(s3, botocore.client.S3)

AttributeError: module 'botocore.client' has no attribute 'S3'

Usage:

In [1]: import boto3

In [2]: import boto3_type as bt

In [3]: client = boto3.client("ecs")

In [4]: resource = boto3.resource("s3")

In [5]: bucket = resource.Bucket("test-bucket")

In [6]: bt.is_client(client)
Out[6]: True

In [7]: bt.client.istype(client, "ecs")
Out[7]: True

In [8]: bt.is_resource(resource)
Out[8]: True

In [9]: bt.resource.istype(resource, "s3")
Out[9]: True

In [10]: bt.s3.istype(bucket, "bucket")
Out[10]: True

In [11]: bt.is_resource(client)
Out[11]: False

In [12]: bt.is_client(resource)
Out[12]: False

Metadata

Release files for boto3-type 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for boto3-type 0.1.0
File Size Uploaded Provenance Actions
boto3_type-0.1.0.tar.gz 3.0 kB Without provenance Details for boto3_type-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for boto3-type 0.1.0
File Interpreter ABI Platform Actions
boto3_type-0.1.0-py3-none-any.whl Python 3 none any Details for boto3_type-0.1.0-py3-none-any.whl

Total release size: 7.5 kB

Release files / boto3_type-0.1.0.tar.gz

Download URL boto3_type-0.1.0.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e9024e2fae3b8a86b2b6b41f0adc8eb5252d93eaa3d32c6bcf3c767e8f96cfdb
BLAKE2b-256 checksum
How to use checksums
db44ef51ac944df0e52ee95ef927cc2d2248966b32dd94a92f34e664ec131345
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0.post20200209 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.1

Release files / boto3_type-0.1.0-py3-none-any.whl

Download URL boto3_type-0.1.0-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b72674b9467b8a1afc22cfc00e071bc23fe2f17657be0eaa76390624932c7049
BLAKE2b-256 checksum
How to use checksums
aaebebe2b0026b269bf71a7adb40b149c5eb2f3c366bc6cd11fbcbf38bb5509c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0.post20200209 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.1

Security for boto3-type 0.1.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page