-
Notifications
You must be signed in to change notification settings - Fork 24
Improve the API reference landing page #87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
9d33016
checkpoint
jonathan343 74ba238
updates
jonathan343 8743ced
Improve API reference overview and add Developer Preview banner
jonathan343 f04bbc0
unslop
jonathan343 972c2ef
Improve API reference setup and credential guidance
jonathan343 567b9bf
restore missing tables fallback in example
jonathan343 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,88 @@ | ||
| # AWS SDK for Python | ||
|
|
||
| --8<-- "README.md:2" | ||
| The AWS SDK for Python provides asynchronous clients for supported AWS services. | ||
| Each service has its own package. | ||
|
|
||
| !!! warning "Developer preview: Not for production use" | ||
|
|
||
| Use this SDK for evaluation and pre-production testing. Interfaces and | ||
| behavior may change before general availability. Use | ||
| [Boto3](https://boto3.amazonaws.com/v1/documentation/api/latest/index.html) | ||
| for production workloads. | ||
|
|
||
| [Browse clients](clients/index.md){ .md-button .md-button--primary } | ||
| [View source](https://github.com/aws/aws-sdk-python){ .md-button } | ||
|
|
||
| ## Features | ||
|
|
||
| - **Async operations.** Every service operation is an `async` method that works | ||
| with `asyncio`. | ||
| - **Per-service packages.** Install only the clients your application uses. | ||
| - **Type annotations.** Operations, input models, and response models include | ||
| type annotations, so editors and type checkers do not need separate stub | ||
| packages. | ||
| - **Streaming support.** Clients for streaming services support event streams | ||
| and bidirectional streaming. | ||
|
|
||
| The code generator builds each client from its service's | ||
| [Smithy](https://smithy.io/) model. | ||
|
|
||
| ## Install a client | ||
|
|
||
| The clients require Python 3.12 or later. | ||
|
|
||
| === "One client" | ||
|
|
||
| Install the Amazon DynamoDB client from its service package: | ||
|
|
||
| ```bash | ||
| pip install aws-sdk-dynamodb | ||
| ``` | ||
|
|
||
| === "Several clients" | ||
|
|
||
| The `aws-sdk-python` meta-package keeps its client dependencies on | ||
| compatible versions. Select the clients you need through package extras: | ||
|
|
||
| ```bash | ||
| pip install "aws-sdk-python[bedrock_runtime,sts]" | ||
| ``` | ||
|
|
||
| The [available clients](clients/index.md) page lists every service package. | ||
|
|
||
| ## List DynamoDB tables | ||
|
|
||
| After you [configure AWS credentials](https://docs.aws.amazon.com/sdkref/latest/guide/standardized-credentials.html) | ||
|
jonathan343 marked this conversation as resolved.
Outdated
|
||
| and grant `dynamodb:ListTables` permission, use the | ||
| [Amazon DynamoDB client](clients/dynamodb/index.md) to list up to ten tables in | ||
| `us-east-1`: | ||
|
|
||
| ```python | ||
| import asyncio | ||
|
|
||
| from aws_sdk_dynamodb.client import AsyncDynamoDBClient | ||
| from aws_sdk_dynamodb.config import AsyncDynamoDBConfig | ||
| from aws_sdk_dynamodb.models import ListTablesInput | ||
|
|
||
|
|
||
| async def main(): | ||
| config = await AsyncDynamoDBConfig.resolve(region="us-east-1") | ||
| client = AsyncDynamoDBClient(config=config) | ||
|
jonathan343 marked this conversation as resolved.
Outdated
|
||
|
|
||
| response = await client.list_tables(input=ListTablesInput(limit=10)) | ||
| for table in response.table_names or []: | ||
| print(table) | ||
|
|
||
|
|
||
| asyncio.run(main()) | ||
| ``` | ||
|
|
||
| `AsyncDynamoDBConfig.resolve()` loads credentials and other shared settings | ||
| from the standard AWS configuration sources. The `region` argument overrides | ||
| the configured region for this client. | ||
|
|
||
| ## Documentation and support | ||
|
Alan4506 marked this conversation as resolved.
|
||
|
|
||
| - [Browse client API references](clients/index.md) | ||
| - [Contribute to the SDK](contributing.md) | ||
| - [Report a bug or request a feature](https://github.com/aws/aws-sdk-python/issues/new/choose) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| {% extends "base.html" %} | ||
|
|
||
| {% block announce %} | ||
| <strong>Developer Preview:</strong> | ||
| This SDK is not for production use, and its APIs and behavior may change. | ||
| For production workloads, use | ||
| <a href="https://boto3.amazonaws.com/v1/documentation/api/latest/index.html">Boto3</a>. | ||
| {% endblock %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.