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-2.0.0.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file modular-cli_sdk-2.0.0.tar.gz.

File metadata

  • Download URL: modular-cli_sdk-2.0.0.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.17

File hashes

Hashes for modular-cli_sdk-2.0.0.tar.gz
Algorithm Hash digest
SHA256 2ae63556576c23f2f4367b82cace8cdda068a7fbc8e010d1bc2a8da7e74b3ef5
MD5 6cf00e6d6bf2f6f900e50f3dfc522868
BLAKE2b-256 ebdf3a2cf1d10eff1cab4082efe1d28d4ae0bbe5a66c74b698e2ade650bb580b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for modular_cli_sdk-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0876776369926ab70d5f6f5048ba3b18896e15d37a06590dcf9bbe56ba5100e8
MD5 ff3e27fb55a3e8c064ddc0e86068402b
BLAKE2b-256 a34cba8de55998fc4613d3b1d999b3ab236c1fa83187160f0781451ef33e50dd

See more details on using hashes here.

Supported by

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