Skip to main content

Core component for CLI tools built atop of Modular Framework

Project description

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 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

modular_cli_sdk-1.1.2.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

modular_cli_sdk-1.1.2-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file modular_cli_sdk-1.1.2.tar.gz.

File metadata

  • Download URL: modular_cli_sdk-1.1.2.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.2

File hashes

Hashes for modular_cli_sdk-1.1.2.tar.gz
Algorithm Hash digest
SHA256 6571b3d50e1c0c0ff614933814c3edd5a8ba9443026314ed0b267d0aeffa8ad4
MD5 e2bcb1013f6d5df2a6204a8c1f2ae0d9
BLAKE2b-256 dcc1b0a093bb5f4339dd54bafb20a10c6b71e80553059a8c864ab23e0eb0cdab

See more details on using hashes here.

File details

Details for the file modular_cli_sdk-1.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for modular_cli_sdk-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0e3a386377a981b658742e3e4954b815668b234fa03bf182dfdcfc6d59cd1e6f
MD5 bd4138ac77600bb287c0b6d2f3db1a15
BLAKE2b-256 11b009f927efbf0aa819edda1a054f033028c25f5a3ca4c04a8bef9e603b78c9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page