From 31bd0d3a1ff906581c824a000dc3c44c5c586e4e Mon Sep 17 00:00:00 2001 From: mwaisaida-13 Date: Thu, 10 Sep 2026 14:53:45 +0100 Subject: [PATCH] Prepare Python 1.0.0 release - Bump version to 1.0.0 and mark the package Production/Stable. The `Private :: Do Not Upload` classifier stays until the repository is public. - Add python/CHANGELOG.md with the 1.0.0 entry. - Add a repository README; point the Python README install at PyPI. - python_dev.py: fix stale dev.py references in the docstring and drop the hard-coded argparse prog name. --- README.md | 55 ++++++++++++++++++++++++++++++++++++++++++- python/CHANGELOG.md | 24 +++++++++++++++++++ python/README.md | 14 +++++++---- python/pyproject.toml | 7 ++---- scripts/python_dev.py | 12 ++++------ 5 files changed, 94 insertions(+), 18 deletions(-) create mode 100644 python/CHANGELOG.md diff --git a/README.md b/README.md index 341f1b9..143d99c 100644 --- a/README.md +++ b/README.md @@ -1 +1,54 @@ -# developer-toolkit-elasticache \ No newline at end of file +# Developer Toolkit for ElastiCache + +This repository contains tools to work with [Amazon ElastiCache](https://aws.amazon.com/elasticache/). + +The Python library offers [IAM authentication](https://docs.aws.amazon.com/AmazonElastiCache/latest/dg/auth-iam.html) +for ElastiCache: generates a signed token that ElastiCache requires for connection +with an IAM-enabled user, so applications can authenticate to a Valkey or +Redis OSS cache with AWS credentials. + +## Packages + +| Language | Package | Documentation | +|---|---|---| +| Python | [`developer-toolkit-elasticache`](https://pypi.org/project/developer-toolkit-elasticache/) on PyPI | [python/README.md](python/README.md) | + + +## Quick start (Python) + +```bash +python3 -m pip install developer-toolkit-elasticache +``` + +```python +from developer_toolkit_elasticache import generate_iam_auth_token + +token = generate_iam_auth_token( + serverless_cache_name="my-cache", # or replication_group_id="my-group" + user_id="iam-user", + region="us-east-1", +) +``` + +Use the returned token as the password when connecting to the cache. See the +[Python README](python/README.md) for requirements, the credential chain, the Python +command-line tool, and client integration examples. + +## Getting help + +Please use these community resources for getting help. We use the GitHub issues for +tracking bugs and feature requests. + +- Ask a question or [open a discussion](https://github.com/aws/developer-toolkit-elasticache/discussions). +- If you think you may have found a bug, please [open an issue](https://github.com/aws/developer-toolkit-elasticache/issues/new). + + +## Contributing + +Contributions are welcome. Open an issue to discuss a change before sending a pull +request; all changes are reviewed before merging. + +## License + +This project is licensed under the Apache-2.0 License. See [LICENSE](LICENSE) and +[NOTICE](NOTICE). diff --git a/python/CHANGELOG.md b/python/CHANGELOG.md new file mode 100644 index 0000000..3b93e89 --- /dev/null +++ b/python/CHANGELOG.md @@ -0,0 +1,24 @@ +# Changelog + +All notable changes to the Python package are documented here. The format follows +[Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the package uses +[Semantic Versioning](https://semver.org/). + +## [1.0.0] - Unreleased + +Initial release. + +### Added + +- `generate_iam_auth_token()` — signs an IAM authentication token for an Amazon + ElastiCache serverless cache or node-based replication group using the default AWS + credential chain. +- `ElastiCacheIAMAuthTokenProvider` — signs a fresh token on each `get_token()` call, + for clients that re-authenticate on reconnect. +- `developer-toolkit-elasticache generate_iam_auth_token` command-line interface. +- `InvalidParameterError` and `ConfigurationError` (both `ToolkitInputError`) for + invalid arguments and unresolvable region or credentials. Error messages never echo + caller-provided values. +- Examples for redis-py and valkey-py under `examples/`. + +[1.0.0]: https://github.com/aws/developer-toolkit-elasticache/releases/tag/python-v1.0.0 diff --git a/python/README.md b/python/README.md index aff497f..31211f1 100644 --- a/python/README.md +++ b/python/README.md @@ -7,15 +7,19 @@ connection password for an IAM-enabled user. ## Installation -Requires Python 3.10–3.14, `pip`, and `git`. Install from the source repository: +Requires Python 3.10–3.14 and `pip`. Install from PyPI: ```bash -git clone https://github.com/aws/developer-toolkit-elasticache.git -cd developer-toolkit-elasticache/python -python3 -m pip install . +python3 -m pip install developer-toolkit-elasticache ``` -This installs the library and the `developer-toolkit-elasticache` command. +If you don't have [`pip`](https://pip.pypa.io) installed, this +[Python installation guide](https://docs.python-guide.org/starting/installation/) can +guide you through the process. + +This installs the library and the `developer-toolkit-elasticache` command. To install +from source instead, clone the repository and run `python3 -m pip install .` from the +`python/` directory. ## Usage diff --git a/python/pyproject.toml b/python/pyproject.toml index 14a8251..f6be5cb 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -10,7 +10,7 @@ build-backend = "setuptools.build_meta" [project] name = "developer-toolkit-elasticache" -version = "0.1.0.dev0" +version = "1.0.0" description = "Developer toolkit for Amazon ElastiCache" readme = "README.md" license = "Apache-2.0" @@ -18,12 +18,9 @@ requires-python = ">=3.10" dependencies = [ "botocore>=1.43.0", ] -# NOTE: This project is in active development and is NOT ready to publish. -# The "Private :: Do Not Upload" classifier makes PyPI reject any upload of -# this package. Do not remove it until we have explicitly decided to publish. classifiers = [ "Private :: Do Not Upload", - "Development Status :: 3 - Alpha", + "Development Status :: 5 - Production/Stable", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", diff --git a/scripts/python_dev.py b/scripts/python_dev.py index 86ccb35..ee6633b 100755 --- a/scripts/python_dev.py +++ b/scripts/python_dev.py @@ -2,7 +2,7 @@ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """Python task runner — one entry point for every Python CI/CD step, run locally or -from the workflows. Requires Python 3.11+ (tomllib) for `verify` and `versions` +from the workflows. Requires Python 3.11+ (tomllib) for `verify` and `list-supported-versions`. ./python_dev.py setup # install the package + all dev tooling ./python_dev.py lint # ruff check + format --check @@ -13,8 +13,8 @@ ./python_dev.py smoke [VERSION] # install from PyPI + assert version + run CLI ./python_dev.py ci # setup + lint + test + package (pre-flight) -lint/test/build run inside a .venv the runner creates and reuses, so there is no -manual `python -m venv` step; delete .venv to rebuild it against a different +lint/test/package run inside a .venv the runner creates and reuses, so there is no +manual `python -m venv` step; delete python/.venv to rebuild it against a different interpreter. """ @@ -58,7 +58,7 @@ def run(*args: object) -> None: def venv_python() -> str: """Create the managed .venv on first use and return its Python interpreter. - Lets the runner own an isolated environment, so `./dev.py test` works with no + Lets the runner own an isolated environment, so `./python_dev.py test` works with no manual `python -m venv`. In CI each job is a fresh runner, so the .venv is built from that job's interpreter — honouring the matrix version. """ @@ -239,9 +239,7 @@ def ci(args: argparse.Namespace) -> int: def main() -> int: - parser = argparse.ArgumentParser( - prog="dev.py", description="Developer/CI task runner." - ) + parser = argparse.ArgumentParser(description="Python task runner.") subparsers = parser.add_subparsers(dest="command", required=True) for name, arg in _COMMANDS.items(): subparser = subparsers.add_parser(name)