Skip to main content

Configuration Management Library

Project description

HydroPump-python

Configuration Management Library

HydroPump is an open-source Python library that provides a simple and efficient way to manage configuration files. It allows you to store and retrieve configuration data using different backends such as local file system and various cloud storage solutions.

Installation

You can install HydroPump using pip:

pip install hydropump

Usage

To use HydroPump, you need to import the hydropump module:

import hydropump

Example

Here's a complete example that demonstrates the usage of HydroPump:

from hydropump import Service

service_config = {
    "backend_type": "FileSystem",
    "file_extension": "json",
}

service = Service(config=service_config)

template_id1 = "example_template1"
template1 = {"sqlEngine": "mysql"}
service.create_template(metadata={}, source=template1, template_id=template_id1)

template_id2 = "example_template2"
template2 = {
    "sqlEngine": "postgres",
    "cloudProvider": "AWS",
}
service.create_template(metadata={}, source=template2, template_id=template_id2)

instruction_id = "client-12345"
metadata = {
    "createdBy": "mvecchione145",
    # templates are compiled from left to right
    # (common keys in example_template1 will be
    # overridden by values in example_template2)
    "templates": ["example_template1", "example_template2"],
}
source = {"system": "darwin"}

service.create_instruction(
    instruction_id=instruction_id, metadata=metadata, source=source
)

instruction = service.get_instruction(instruction_id=instruction_id)

print(instruction)
# {
#   "instruction": {
#     "cloudProvider": "AWS",
#     "sqlEngine": "postgres",
#     "system": "darwin"
#   },
#   "metadata": {
#     "compiled": True,
#     "createdBy": "mvecchione145",
#     "createdAt": "YYYY-MM-DD HH:MM:SS.NNNNNN"
#     "templates": [
#       "example_template",
#       "example_template2"
#     ]
#   }

Contributing

Contributions to HydroPump are welcome! If you find any issues or have suggestions for improvement, please open an issue on the GitHub repository. Pull requests are also appreciated.

Please make sure to follow the contribution guidelines when submitting your contributions.

License

HydroPump is released under the MIT License.


Thank you for using HydroPump! We hope it helps simplify your configuration management process. If you have any questions or need further assistance, feel free to reach out to us at support@hydropump.com.

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

hydropump-0.1.2.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

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

hydropump-0.1.2-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hydropump-0.1.2.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for hydropump-0.1.2.tar.gz
Algorithm Hash digest
SHA256 94d84fe640c32aad1bc493714527037f9ded6e68e8cd7c77bfd3001980ba4921
MD5 dac58d21e6b5ee00895bfdbf811219ab
BLAKE2b-256 821c668d83c7493a98ebbe85ab07f68b6fc3a03827780479ce6eb9b5c9f26156

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hydropump-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for hydropump-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8ebd90ef1a13635c8f2be101e50972f74da8a7a27c6a5eafc2573372219c6663
MD5 147a044243974dfafcd983782fc31ec0
BLAKE2b-256 c3c017f28d2b5fb0e696f1d83e8ea24c77f3bb5d28a272250cbcc95f9598f5af

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