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.
  • 📥 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.

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

For more usage examples, see the Usage documentation.

Contributing

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

Credit

Directed Inputs Class is written and maintained by Your Name.

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-0.1.2.tar.gz (300.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-0.1.2-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: directed_inputs_class-0.1.2.tar.gz
  • Upload date:
  • Size: 300.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for directed_inputs_class-0.1.2.tar.gz
Algorithm Hash digest
SHA256 385806e6f92747e1945eb04d1604af274f4f2eecf3a9908ab988617cb176b8a2
MD5 38a4c361609852852dfa6eb165e018ed
BLAKE2b-256 27e247fe6542bde29684d5e47b3098cb2243d3e1b30837d08a4c765e00b112a5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for directed_inputs_class-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1555d3ee3c4425b205f7ce9c1e77d639a3400a972e343ef9039eec041865c564
MD5 58632f24f12950691e93e3d51bca7b8f
BLAKE2b-256 fc47dfaaa8c7599f7f92f70cbbfaa322290099a71995e20d3af1ee385514a8ac

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