Skip to main content

Directed inputs class consumes and processes inputs from sources beyond args and kwargs

Project description

Directed Inputs Class

Directed Inputs Class Logo

🛠️ Manage your Python inputs efficiently! 🎯

CI Status Documentation Status PyPI Package latest release Supported versions

Directed Inputs Class is a Python library that provides a flexible and robust interface for managing inputs from various sources such as environment variables, stdin, and predefined dictionaries. It offers features like input freezing, thawing, and advanced decoding utilities.

Key Features

  • 🧩 Environment Variable Integration - Seamlessly integrates environment variables into your inputs.
  • 🧭 Scoped Environment Loading - Filter environment variables by prefix and optionally strip it for clean keys.
  • 📥 Stdin Input Handling - Read and merge inputs from stdin with optional overrides.
  • ❄️ Input Freezing and Thawing - Freeze inputs to prevent modifications, and thaw them when needed.
  • 🔄 Advanced Decoding Utilities - Decode inputs from Base64, JSON, and YAML formats with error handling.
  • 🔧 Type Conversion - Convert inputs to boolean or integer types with robust error handling.
  • 🧬 Deep Input Merging - Merge additional inputs into existing state without losing nested structure.

Example Usage

from directed_inputs_class import DirectedInputsClass

# Initialize with environment variables and stdin
dic = DirectedInputsClass(from_environment=True, from_stdin=True)

# Retrieve and decode an input
decoded_value = dic.decode_input("example_key", decode_from_base64=True)
print(decoded_value)

Freezing and Thawing Inputs

from directed_inputs_class import DirectedInputsClass

# Initialize with some inputs
dic = DirectedInputsClass(inputs={"key1": "value1"})

# Freeze the inputs
frozen_inputs = dic.freeze_inputs()
print(frozen_inputs)  # Outputs: {'key1': 'value1'}

# Thaw the inputs
thawed_inputs = dic.thaw_inputs()
print(thawed_inputs)  # Outputs: {'key1': 'value1'}

# Merge additional data safely
dic.merge_inputs({"feature_flags": {"new": True}})

For more usage examples, see the Usage documentation.

Contributing

Contributions are welcome! Please see the Contributing Guidelines for more information.

Project Links

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

directed_inputs_class-2025.11.49.tar.gz (307.9 kB view details)

Uploaded Source

Built Distribution

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

directed_inputs_class-2025.11.49-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file directed_inputs_class-2025.11.49.tar.gz.

File metadata

File hashes

Hashes for directed_inputs_class-2025.11.49.tar.gz
Algorithm Hash digest
SHA256 a78b83d8a58659e3c2cb24966a553702d21d82a625fbfad915a223e64faf11ed
MD5 fc710e020d219890df911dab8d3d7490
BLAKE2b-256 0e039900b3fa0b016ea0533c581b75d779507b73902612ff5893bc35d15c46c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for directed_inputs_class-2025.11.49.tar.gz:

Publisher: ci.yml on jbcom/directed-inputs-class

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file directed_inputs_class-2025.11.49-py3-none-any.whl.

File metadata

File hashes

Hashes for directed_inputs_class-2025.11.49-py3-none-any.whl
Algorithm Hash digest
SHA256 74e414170b4e20a3d3d7447b8db021dcd0eecfa448a48e1ab51db0e09670fe0a
MD5 2f4756ea6db9c93198b43c82584a44b7
BLAKE2b-256 8c779c5b5ee536dd2112b3b61d954bc7a3280cf091a6f72ff4641b6bf5595f17

See more details on using hashes here.

Provenance

The following attestation bundles were made for directed_inputs_class-2025.11.49-py3-none-any.whl:

Publisher: ci.yml on jbcom/directed-inputs-class

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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