Skip to content

dataorc: tiny wrappers issue #54

@tokams

Description

@tokams

cred: Any = DefaultAzureCredential()

If i want to fetch 10 secrets for my configuration, using this utility function with dataorc-utils will create a new instance of DefaultAzureCredential and AzureAppConfigurationClient.

Not sure how helpful is using this utility instead of manually creating one instance

  credential = DefaultAzureCredential()

  ac_client = AzureAppConfigurationClient(
      base_url=e("APP_CONFIG_ENDPOINT"),
      credential=credential,
  )

Especially if we will very likely also require credentials instance in our code anyway for other purposes not covered in dataorc-utils
This function essencialy wraps class initialization, and exposes output from one of their methods.

Utilities or wrapper functions obfuscate code, especially if they do not bring any meaninful functionality.

I think we should have stronger constraints on what can be a dataorc-utils utility function.

For this case we should add at least some meaningfull funcitonality, either client factory, so those can be reused, or dependency injection whre the helper will accept overrides for credentials/kv.

Also this promis is not implemented:

The helpers use the Azure SDK when available and fall back to environment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions