azure-keyvault-cli


Nameazure-keyvault-cli JSON
Version 0.3.3 PyPI version JSON
download
home_pagehttps://github.com/mkah91/azure-keyvault-cli
SummaryThis is a CLI to show and check secrets from an Azure KeyVault
upload_time2024-07-09 06:06:11
maintainerNone
docs_urlNone
authormkah91
requires_python<4.0,>=3.9
licenseMIT
keywords azure keyvault cli secrets
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![End-to-End Test](https://github.com/mkah91/azure-keyvault-cli/actions/workflows/e2e-test.yaml/badge.svg)](https://github.com/mkah91/azure-keyvault-cli/actions/workflows/e2e-test.yaml)

# Azure KeyVault CLI

This is a CLI tool to interact with an Azure KeyVault. You can use it to easily list and show secrets. Additionally, you can use it to check the expiration date of all the secrets in your KeyVault.

## Installation

### Install with pip
To install the latest stable version from [PyPI](https://pypi.org/project/azure-keyvault-cli/), run:

```sh
pip3 install azure-keyvault-cli
```


To install the latest version (potentially not stable) from [TestPyPI](https://test.pypi.org/project/azure-keyvault-cli/), run:

```sh
pip3 install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple azure-keyvault-cli
```

If you want to have it globally available, make sure to run it in your global python environment.

## Contributing

### Installation

1. Install [poetry](https://python-poetry.org/docs/#installation)
2. Run: `poetry install`

If you get an error `No such file or directory: 'python'`. Try settings an alias for python3:

```sh
alias python=python3
```

or activate an existing virtual environment.

### Usage

Make sure the right virtual env is activated, then you can use the local version of the cli by running, e.g.:

```sh
azkv --help
```

### Testing

To run the tests, run:

```sh
poetry run pytest
# with coverage
poetry run pytest --cov=cli --cov-report=xml --cov-report=term-missing
```

### Formatting

To format the code, run:

```sh
poetry run black .
```

### Linting

To lint the code, run:

```sh
poetry run ruff .
```

### Releasing

#### Bump version

First, bump the version in the `pyproject.toml` file. You can do this manually or by running:

```sh
poetry version <major|minor|patch>
```

Then commit the changes and push them to the remote repository. Additionally, add a tag to the commit with the new version number. You can do this by running:

```sh
version=$(poetry version --short)
git checkout -b release-${version}
git add pyproject.toml
git commit -m "Bump version to ${version}"
git push --set-upstream origin release-${version}
git tag -a ${version} -m "Release ${version}"
git push origin ${version}
```

#### Create pull request

Create a pull request from the release branch to the main branch. The pull request will trigger the test workflow. The workflow will run the tests and check the formatting and linting of the code. You can create a pull request by running:

```sh
version=$(poetry version --short)
gh pr create --title "Release ${version}" --body "Release ${version}" --base main --head release-${version}
```

#### Create release

After the pull request has been merged, the release workflow will be triggered. The workflow will create a new release and publish the package to [PyPI](https://test.pypi.org/project/azure-keyvault-cli/). Be aware that this workflow needs to be manually approved before it will be executed.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/mkah91/azure-keyvault-cli",
    "name": "azure-keyvault-cli",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": "azure, keyvault, cli, secrets",
    "author": "mkah91",
    "author_email": "marius_knepper@web.de",
    "download_url": "https://files.pythonhosted.org/packages/cb/0d/e189df81563895a0acecb7e4ca54eb2b6d6fc250f57e8cbabf6c7b250d8a/azure_keyvault_cli-0.3.3.tar.gz",
    "platform": null,
    "description": "[![End-to-End Test](https://github.com/mkah91/azure-keyvault-cli/actions/workflows/e2e-test.yaml/badge.svg)](https://github.com/mkah91/azure-keyvault-cli/actions/workflows/e2e-test.yaml)\n\n# Azure KeyVault CLI\n\nThis is a CLI tool to interact with an Azure KeyVault. You can use it to easily list and show secrets. Additionally, you can use it to check the expiration date of all the secrets in your KeyVault.\n\n## Installation\n\n### Install with pip\nTo install the latest stable version from [PyPI](https://pypi.org/project/azure-keyvault-cli/), run:\n\n```sh\npip3 install azure-keyvault-cli\n```\n\n\nTo install the latest version (potentially not stable) from [TestPyPI](https://test.pypi.org/project/azure-keyvault-cli/), run:\n\n```sh\npip3 install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple azure-keyvault-cli\n```\n\nIf you want to have it globally available, make sure to run it in your global python environment.\n\n## Contributing\n\n### Installation\n\n1. Install [poetry](https://python-poetry.org/docs/#installation)\n2. Run: `poetry install`\n\nIf you get an error `No such file or directory: 'python'`. Try settings an alias for python3:\n\n```sh\nalias python=python3\n```\n\nor activate an existing virtual environment.\n\n### Usage\n\nMake sure the right virtual env is activated, then you can use the local version of the cli by running, e.g.:\n\n```sh\nazkv --help\n```\n\n### Testing\n\nTo run the tests, run:\n\n```sh\npoetry run pytest\n# with coverage\npoetry run pytest --cov=cli --cov-report=xml --cov-report=term-missing\n```\n\n### Formatting\n\nTo format the code, run:\n\n```sh\npoetry run black .\n```\n\n### Linting\n\nTo lint the code, run:\n\n```sh\npoetry run ruff .\n```\n\n### Releasing\n\n#### Bump version\n\nFirst, bump the version in the `pyproject.toml` file. You can do this manually or by running:\n\n```sh\npoetry version <major|minor|patch>\n```\n\nThen commit the changes and push them to the remote repository. Additionally, add a tag to the commit with the new version number. You can do this by running:\n\n```sh\nversion=$(poetry version --short)\ngit checkout -b release-${version}\ngit add pyproject.toml\ngit commit -m \"Bump version to ${version}\"\ngit push --set-upstream origin release-${version}\ngit tag -a ${version} -m \"Release ${version}\"\ngit push origin ${version}\n```\n\n#### Create pull request\n\nCreate a pull request from the release branch to the main branch. The pull request will trigger the test workflow. The workflow will run the tests and check the formatting and linting of the code. You can create a pull request by running:\n\n```sh\nversion=$(poetry version --short)\ngh pr create --title \"Release ${version}\" --body \"Release ${version}\" --base main --head release-${version}\n```\n\n#### Create release\n\nAfter the pull request has been merged, the release workflow will be triggered. The workflow will create a new release and publish the package to [PyPI](https://test.pypi.org/project/azure-keyvault-cli/). Be aware that this workflow needs to be manually approved before it will be executed.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "This is a CLI to show and check secrets from an Azure KeyVault",
    "version": "0.3.3",
    "project_urls": {
        "Homepage": "https://github.com/mkah91/azure-keyvault-cli",
        "Repository": "https://github.com/mkah91/azure-keyvault-cli"
    },
    "split_keywords": [
        "azure",
        " keyvault",
        " cli",
        " secrets"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "58ec19ea91e0ffe4dc6be8cc1456985ca574b7ab6d4af447df407b844793348c",
                "md5": "a27bb48ef0ba9416b23b0333b651f212",
                "sha256": "12479a0278de5f32145f691189f9308d5b3891ec35eb0f7a6c39631d35c59dc6"
            },
            "downloads": -1,
            "filename": "azure_keyvault_cli-0.3.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a27bb48ef0ba9416b23b0333b651f212",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 17013,
            "upload_time": "2024-07-09T06:06:09",
            "upload_time_iso_8601": "2024-07-09T06:06:09.251195Z",
            "url": "https://files.pythonhosted.org/packages/58/ec/19ea91e0ffe4dc6be8cc1456985ca574b7ab6d4af447df407b844793348c/azure_keyvault_cli-0.3.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cb0de189df81563895a0acecb7e4ca54eb2b6d6fc250f57e8cbabf6c7b250d8a",
                "md5": "77647a7375432100d3999e95ec0be650",
                "sha256": "3ed37a275e99d190d88926a08cafadd7a8c947a3510b789fa422fbe0c1d0a4d7"
            },
            "downloads": -1,
            "filename": "azure_keyvault_cli-0.3.3.tar.gz",
            "has_sig": false,
            "md5_digest": "77647a7375432100d3999e95ec0be650",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 9943,
            "upload_time": "2024-07-09T06:06:11",
            "upload_time_iso_8601": "2024-07-09T06:06:11.167049Z",
            "url": "https://files.pythonhosted.org/packages/cb/0d/e189df81563895a0acecb7e4ca54eb2b6d6fc250f57e8cbabf6c7b250d8a/azure_keyvault_cli-0.3.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-09 06:06:11",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mkah91",
    "github_project": "azure-keyvault-cli",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "azure-keyvault-cli"
}
        
Elapsed time: 0.38492s