eks-token


Nameeks-token JSON
Version 0.2.1 PyPI version JSON
download
home_pagehttps://github.com/peak-ai/eks-token
SummaryEKS Token package, an alternate to "aws eks get-token ..." CLI
upload_time2024-07-16 04:49:26
maintainerNone
docs_urlNone
authorPeak AI
requires_python>=3.6
licenseNone
keywords eks k8s boto3 awscli python aws
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # eks-token
EKS Token package, an alternate to "aws eks get-token ..." CLI

![CodeQuality](https://github.com/peak-ai/eks-token/workflows/CodeQL/badge.svg) ![Publish](https://github.com/peak-ai/eks-token/workflows/Upload%20Python%20Package/badge.svg) ![stable](https://img.shields.io/github/v/release/peak-ai/eks-token) ![](https://img.shields.io/github/v/release/peak-ai/eks-token?include_prereleases) ![](https://img.shields.io/github/license/peak-ai/eks-token) ![](https://img.shields.io/github/languages/count/peak-ai/eks-token) ![](https://img.shields.io/github/languages/top/peak-ai/eks-token) ![](https://img.shields.io/github/issues-raw/peak-ai/eks-token) ![](https://img.shields.io/github/issues-pr-raw/peak-ai/eks-token) ![](https://img.shields.io/github/languages/code-size/peak-ai/eks-token) ![](https://img.shields.io/github/repo-size/peak-ai/eks-token)

![logo](https://raw.githubusercontent.com/peak-ai/eks-token/main/eks-iam.png)

## Usage

### Installation

```shell
pip install eks-token
```

### Basic usage

```python
from eks_token import get_token
from pprint import pprint

response = get_token(cluster_name='<value>')
pprint(response)
```
Expected Output
```python
{'apiVersion': 'client.authentication.k8s.io/v1alpha1',
 'kind': 'ExecCredential',
 'spec': {},
 'status': {'expirationTimestamp': '2020-10-01T15:05:17Z',
            'token': 'k8s-aws-v1.<token_value>'}}
```

### Extract token from response

```python
from eks_token import get_token

token = get_token(cluster_name='value')['status']['token']
print(token)
```

### Get Token signed for particular IAM role

Pass `role_arn`  argument to the function
```python
from eks_token import get_token

token = get_token(cluster_name='<value>', role_arn='<value>')['status']['token']
print(token)
```

## Contribution
Check our guidelines [here](CONTRIBUTING.md)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/peak-ai/eks-token",
    "name": "eks-token",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "eks k8s boto3 awscli python aws",
    "author": "Peak AI",
    "author_email": "support@peak.ai",
    "download_url": "https://files.pythonhosted.org/packages/b7/a1/101b9cd47b44e5687894207129a7f58805a5baad6936b9f0ad02bef84510/eks_token-0.2.1.tar.gz",
    "platform": null,
    "description": "# eks-token\nEKS Token package, an alternate to \"aws eks get-token ...\" CLI\n\n![CodeQuality](https://github.com/peak-ai/eks-token/workflows/CodeQL/badge.svg) ![Publish](https://github.com/peak-ai/eks-token/workflows/Upload%20Python%20Package/badge.svg) ![stable](https://img.shields.io/github/v/release/peak-ai/eks-token) ![](https://img.shields.io/github/v/release/peak-ai/eks-token?include_prereleases) ![](https://img.shields.io/github/license/peak-ai/eks-token) ![](https://img.shields.io/github/languages/count/peak-ai/eks-token) ![](https://img.shields.io/github/languages/top/peak-ai/eks-token) ![](https://img.shields.io/github/issues-raw/peak-ai/eks-token) ![](https://img.shields.io/github/issues-pr-raw/peak-ai/eks-token) ![](https://img.shields.io/github/languages/code-size/peak-ai/eks-token) ![](https://img.shields.io/github/repo-size/peak-ai/eks-token)\n\n![logo](https://raw.githubusercontent.com/peak-ai/eks-token/main/eks-iam.png)\n\n## Usage\n\n### Installation\n\n```shell\npip install eks-token\n```\n\n### Basic usage\n\n```python\nfrom eks_token import get_token\nfrom pprint import pprint\n\nresponse = get_token(cluster_name='<value>')\npprint(response)\n```\nExpected Output\n```python\n{'apiVersion': 'client.authentication.k8s.io/v1alpha1',\n 'kind': 'ExecCredential',\n 'spec': {},\n 'status': {'expirationTimestamp': '2020-10-01T15:05:17Z',\n            'token': 'k8s-aws-v1.<token_value>'}}\n```\n\n### Extract token from response\n\n```python\nfrom eks_token import get_token\n\ntoken = get_token(cluster_name='value')['status']['token']\nprint(token)\n```\n\n### Get Token signed for particular IAM role\n\nPass `role_arn`  argument to the function\n```python\nfrom eks_token import get_token\n\ntoken = get_token(cluster_name='<value>', role_arn='<value>')['status']['token']\nprint(token)\n```\n\n## Contribution\nCheck our guidelines [here](CONTRIBUTING.md)\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "EKS Token package, an alternate to \"aws eks get-token ...\" CLI",
    "version": "0.2.1",
    "project_urls": {
        "Homepage": "https://github.com/peak-ai/eks-token"
    },
    "split_keywords": [
        "eks",
        "k8s",
        "boto3",
        "awscli",
        "python",
        "aws"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2a025a65be58df603d289920f4cd02c7ff22611b1fbd4939b96b80fd2fee9455",
                "md5": "d0df0be9c27975a4dfe2b29a404330e5",
                "sha256": "31ebbbfb1628d997b29c54ab7c1ad03ecacc06be6bcbc07713415be62bcdb3bb"
            },
            "downloads": -1,
            "filename": "eks_token-0.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d0df0be9c27975a4dfe2b29a404330e5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 12157,
            "upload_time": "2024-07-16T04:49:24",
            "upload_time_iso_8601": "2024-07-16T04:49:24.912438Z",
            "url": "https://files.pythonhosted.org/packages/2a/02/5a65be58df603d289920f4cd02c7ff22611b1fbd4939b96b80fd2fee9455/eks_token-0.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b7a1101b9cd47b44e5687894207129a7f58805a5baad6936b9f0ad02bef84510",
                "md5": "c98e1c30ddc195a397dd273e4b085be3",
                "sha256": "acbc747360d003755bec800ddf043ef13589a5e7de626d81837cf398723a20bc"
            },
            "downloads": -1,
            "filename": "eks_token-0.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "c98e1c30ddc195a397dd273e4b085be3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 11766,
            "upload_time": "2024-07-16T04:49:26",
            "upload_time_iso_8601": "2024-07-16T04:49:26.255355Z",
            "url": "https://files.pythonhosted.org/packages/b7/a1/101b9cd47b44e5687894207129a7f58805a5baad6936b9f0ad02bef84510/eks_token-0.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-16 04:49:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "peak-ai",
    "github_project": "eks-token",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "eks-token"
}
        
Elapsed time: 1.27869s