-
Notifications
You must be signed in to change notification settings - Fork 18
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
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The link points to the sdkref Standardized credential providers page, which lists the full set of providers - but our developer preview only supports a subset. Readers may pick an unsupported method (e.g., SSO) and hit failures. Should we give users more explicit instructions about how to set up credentials, like #85? Once the developer guide gets released, we can link to one of its sections that lists out supported providers. |
||
| 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) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's modify this code block to sync up with the new pattern established in smithy-lang/smithy-python#765. Consider |
||
|
|
||
| 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 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not blocking: We can add a link to the developer guide once it gets released in the future. |
||
|
|
||
| - [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) | ||
| 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 %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to introduce virtual environment setup between Python version requirement and client installation?
See Boto3 documentation: https://docs.aws.amazon.com/boto3/latest/guide/quickstart.html.