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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hydropump-0.1.4.tar.gz.
File metadata
- Download URL: hydropump-0.1.4.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
650bbcb3b3f15afee2ec382106f446e7b4e1a7581bef92307e448f22b8b406fb
|
|
| MD5 |
a4292816d3fa9fe12fb0410ee82aaeaf
|
|
| BLAKE2b-256 |
268e4e7eb58ca36b773d1588defc4d3db472cf5c3e2c18d408e8f8349863bd2c
|
File details
Details for the file hydropump-0.1.4-py3-none-any.whl.
File metadata
- Download URL: hydropump-0.1.4-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38474c90e2434b487abcc30646258c7726dbc3159547d670747265a753fde295
|
|
| MD5 |
2852241a16a703df75e6b47a7b726523
|
|
| BLAKE2b-256 |
2b6e7799fd6c01f3403ee0a5b7ea28da4ec191be084ae727d55b4052f1d286ee
|