Registry / type-stubs / mypy-boto3-freetier

mypy-boto3-freetier

JSON →
library1.43.0pypypi✓ verified 22d ago

mypy-boto3-freetier provides type annotations (type stubs) for the boto3 FreeTier service, enhancing developer experience with static type checking in Python projects. It is part of the larger `mypy-boto3` ecosystem, generated by `mypy-boto3-builder`, and its versions typically align with corresponding `boto3` releases, with frequent updates to reflect AWS service changes.

pip install mypy-boto3-freetier boto3
INSTALL
IMPORT
SIG · MYPY-BOTO3-FREETIE
M
mypy-boto3-freetier
type-stubspythonv1.43.0
Install
3.8s avg
Import
566ms
Disk
50MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.43.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.588s · 51.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.8s · import 0.544s · 52MB
50MB installed
● package 50MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

FreeTierClient
from mypy_boto3_freetier.client import FreeTierClient
FreeTierServiceResource
import boto3 # FreeTier does not have a resource interface, so this import path is not available.
from mypy_boto3_freetier.service_resource import FreeTierServiceResource
The FreeTier service only provides a client interface; there is no resource interface in boto3 for FreeTier.
GetFreeTierUsageResponseTypeDef
from mypy_boto3_freetier.type_defs import GetFreeTierUsageResponseTypeDef

This example demonstrates how to use the `mypy-boto3-freetier` stubs to get type-hinted interaction with the boto3 FreeTier client. It shows importing the `FreeTierClient` for type annotations and a specific `TypeDef` for response parsing, ensuring static type checkers like mypy can validate your code.

import boto3 from mypy_boto3_freetier.client import FreeTierClient from mypy_boto3_freetier.type_defs import GetFreeTierUsageResponseTypeDef def get_freetier_usage() -> GetFreeTierUsageResponseTypeDef: # mypy-boto3-freetier provides type hints for this client client: FreeTierClient = boto3.client('freetier') response: GetFreeTierUsageResponseTypeDef = client.get_free_tier_usage() print(f"Free Tier Usage: {response.get('FreeTierUsages')}") return response if __name__ == '__main__': # Ensure AWS credentials are configured or available via environment variables # For local testing, you might need to mock boto3 or ensure credentials are set. # Example: os.environ['AWS_ACCESS_KEY_ID'] = '...' # os.environ['AWS_SECRET_ACCESS_KEY'] = '...' # os.environ['AWS_DEFAULT_REGION'] = 'us-east-1' try: get_freetier_usage() except Exception as e: print(f"Error fetching Free Tier usage: {e}")
Debug
Known issues
breakingPython 3.8 is no longer supported for `mypy-boto3-builder` generated packages (including `mypy-boto3-freetier`) as of `mypy-boto3-builder` version 8.12.0.
fix
Upgrade your Python environment to version 3.9 or newer.
affects: mypy-boto3-builder>=8.12.0 (and generated stubs like mypy-boto3-freetier >= 1.42.0)
gotcha`mypy-boto3-freetier` is a stub-only package. It provides type hints for `boto3` but does not include `boto3` itself. `boto3` must be installed separately to provide the runtime functionality.
fix
Always install `boto3` alongside `mypy-boto3-freetier`: `pip install boto3 mypy-boto3-freetier`.
affects: All versions
gotchaFor optimal type checking accuracy, ensure the version of `mypy-boto3-freetier` closely matches your installed `boto3` version. Significant version mismatches can lead to incorrect or missing type hints.
fix
Prefer installing `mypy-boto3-freetier` with a version constraint that aligns with your `boto3` installation (e.g., if `boto3==1.42.3`, install `mypy-boto3-freetier==1.42.3`).
affects: All versions
gotchaThe AWS FreeTier service only exposes a client interface. Attempting to use `boto3.resource('freetier')` will result in a runtime error from boto3, as there is no FreeTier resource.
fix
Always use `boto3.client('freetier')` for interacting with the FreeTier service. `mypy-boto3-freetier` correctly reflects this by not providing a resource stub.
affects: All versions
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredThis package provides type stubs for boto3. boto3 itself must be installed to provide the runtime functionality.
Agent activity
26 hits · last 30 days
node
24
OpenAI (training)
1
Resources
mypy-boto3-freetier — pip install mypy-boto3-freetier · libregistry