# Modular CLI SDK
Modular CLI SDK is a core component for CLI tools built atop of Modular Framework
### Installation
To install Modular CLI SDK please use `pip` command:
* standard installation `pip install "modular_cli_sdk"`
### Usage:
#### 1. Credentials Manager
_class CredentialsProvider_
Used for storing, extracting and deleting credentials. In case if a tool installed in
standalone mode all operations with credentials are carried out using the user`s
file system. In case if a tool installed as a part of
[Modular-API](https://git.epam.com/epmc-eoos/m3-modular-admin) the AWS Parameter
Store (SSM) will be used instead of file system.
In standalone installation credentials will be placed by path:
`~user_home_directory/.<tool_name>/credentials`
In Modular-API's installation credentials will be placed at SSM by name:
`modular-api.<tool_name>.<system_username>.configuration`
```
from modular_cli_sdk.services.credentials_manager import CredentialsProvider
configuration = CredentialsProvider(module_name="tool_name", context: Click.Context)
```
To access to the available methods use class property `credentials_manager`:
```
configuration.credentials_manager.store(config=$config_dict)
configuration.credentials_manager.extract()
configuration.credentials_manager.extract()
```
* store(config= ) # saving given configuration
Parameters:
* `config` (dict) [Required] - takes a dictionary with tool configuration data
Return type:
* `str`
* extract() # retrieve saved configuration
Parameters:
* `None`
Return type:
* `dict`
* clean_up() # delete saved configuration
Parameters:
* `None`
Return type:
* `str`
Raw data
{
"_id": null,
"home_page": "https://github.com/epam/modular-cli-sdk",
"name": "modular-cli-sdk",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "EPAM Systems",
"author_email": "support@syndicate.team",
"download_url": "https://files.pythonhosted.org/packages/eb/df/3a2cf1d10eff1cab4082efe1d28d4ae0bbe5a66c74b698e2ade650bb580b/modular-cli_sdk-2.0.0.tar.gz",
"platform": null,
"description": "# Modular CLI SDK\nModular CLI SDK is a core component for CLI tools built atop of Modular Framework\n\n### Installation\nTo install Modular CLI SDK please use `pip` command:\n* standard installation `pip install \"modular_cli_sdk\"`\n\n### Usage:\n#### 1. Credentials Manager\n_class CredentialsProvider_ \nUsed for storing, extracting and deleting credentials. In case if a tool installed in \nstandalone mode all operations with credentials are carried out using the user`s \nfile system. In case if a tool installed as a part of \n[Modular-API](https://git.epam.com/epmc-eoos/m3-modular-admin) the AWS Parameter \nStore (SSM) will be used instead of file system. \n\nIn standalone installation credentials will be placed by path: \n`~user_home_directory/.<tool_name>/credentials` \nIn Modular-API's installation credentials will be placed at SSM by name: \n`modular-api.<tool_name>.<system_username>.configuration`\n```\nfrom modular_cli_sdk.services.credentials_manager import CredentialsProvider\n\nconfiguration = CredentialsProvider(module_name=\"tool_name\", context: Click.Context)\n```\n\nTo access to the available methods use class property `credentials_manager`:\n```\nconfiguration.credentials_manager.store(config=$config_dict)\nconfiguration.credentials_manager.extract()\nconfiguration.credentials_manager.extract()\n```\n\n* store(config= ) # saving given configuration \n Parameters:\n * `config` (dict) [Required] - takes a dictionary with tool configuration data \n Return type:\n * `str` \n\n* extract() # retrieve saved configuration \n Parameters:\n * `None` \n Return type:\n * `dict`\n\n* clean_up() # delete saved configuration \n Parameters:\n * `None` \n Return type:\n * `str` \n \n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Core component for CLI tools built atop of Modular Framework",
"version": "2.0.0",
"project_urls": {
"Homepage": "https://github.com/epam/modular-cli-sdk"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a34cba8de55998fc4613d3b1d999b3ab236c1fa83187160f0781451ef33e50dd",
"md5": "ff3e27fb55a3e8c064ddc0e86068402b",
"sha256": "0876776369926ab70d5f6f5048ba3b18896e15d37a06590dcf9bbe56ba5100e8"
},
"downloads": -1,
"filename": "modular_cli_sdk-2.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ff3e27fb55a3e8c064ddc0e86068402b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 13088,
"upload_time": "2023-09-27T11:43:50",
"upload_time_iso_8601": "2023-09-27T11:43:50.920605Z",
"url": "https://files.pythonhosted.org/packages/a3/4c/ba8de55998fc4613d3b1d999b3ab236c1fa83187160f0781451ef33e50dd/modular_cli_sdk-2.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ebdf3a2cf1d10eff1cab4082efe1d28d4ae0bbe5a66c74b698e2ade650bb580b",
"md5": "6cf00e6d6bf2f6f900e50f3dfc522868",
"sha256": "2ae63556576c23f2f4367b82cace8cdda068a7fbc8e010d1bc2a8da7e74b3ef5"
},
"downloads": -1,
"filename": "modular-cli_sdk-2.0.0.tar.gz",
"has_sig": false,
"md5_digest": "6cf00e6d6bf2f6f900e50f3dfc522868",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 11985,
"upload_time": "2023-09-27T11:43:51",
"upload_time_iso_8601": "2023-09-27T11:43:51.995463Z",
"url": "https://files.pythonhosted.org/packages/eb/df/3a2cf1d10eff1cab4082efe1d28d4ae0bbe5a66c74b698e2ade650bb580b/modular-cli_sdk-2.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-27 11:43:51",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "epam",
"github_project": "modular-cli-sdk",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "boto3",
"specs": [
[
"==",
"1.26.80"
]
]
},
{
"name": "botocore",
"specs": [
[
"==",
"1.29.80"
]
]
},
{
"name": "hvac",
"specs": [
[
"==",
"1.2.1"
]
]
}
],
"lcname": "modular-cli-sdk"
}