Add your description here
Project description
Prefect Keeper
A Prefect block for interacting with Keeper Security's Secrets Manager.
Description
This project provides a custom Prefect block that allows interaction with Keeper Security's Secrets Manager. It enables secure retrieval of secrets stored in Keeper by record UID or record title within Prefect workflows.
Features
- Seamless integration with Keeper Security's Secrets Manager
- Retrieve secrets by record UID or record title
- Secure handling of KSM configuration
- Easy configuration and intuitive usage
Installation
To install this package, use the following command:
uv add prefect-keeper
Usage
Configuration
Before using the block, ensure that you have a valid KSM (Keeper Secrets Manager) configuration. The configuration should be provided as a base64 encoded string.
Saving the Block
To save the Keeper block :
from prefect_keeper import Keeper
from pydantic import SecretStr
# Initialize the Keeper block with your KSM configuration
keeper = Keeper(ksm_config=SecretStr("your-base64-encoded-config"))
# Save the block
keeper.save("my-keeper-block", overwrite=True)
Loading and Using the Block
To load a previously saved block and use its methods:
from prefect import flow
from prefect_keeper import Keeper
@flow
def example_flow():
# Load the saved block
keeper = Keeper.load("my-keeper-block")
# Retrieve a secret by record UID
record = keeper.get_record_by_uid("record-uid-123")
print(f"Record by UID: {record}")
# Retrieve a secret by record title
record = keeper.get_record_by_title("My Secret Title")
print(f"Record by Title: {record}")
if __name__ == "__main__":
example_flow()
Configuration
The block can be configured with the following parameters:
ksm_config: The KSM config provided as a base64 encoded string. This is a required field and should be provided as aSecretStrfor security.
Configuration Example
from prefect_keeper import Keeper
from pydantic import SecretStr
keeper = Keeper(
ksm_config=SecretStr("your-base64-encoded-config")
)
Development
Prerequisites
- Python 3.10+
- Uv for dependency management
- Access to Keeper Security's Secrets Manager
Development Installation
- Clone the repository:
git clone https://github.com/patacoing/prefect-keeper.git
cd prefect-keeper
- Install dependencies:
uv sync
This project uses just as a way to save and run project-specific commands.
You can go to justfile or run just -l to display all available recipes
Contribution
Contributions are welcome! Please open an issue or a pull request for any improvements or fixes.
License
This project is licensed under the MIT License. See the LICENSE file for more details.
Project details
Release history Release notifications | RSS feed
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 prefect_keeper-0.1.1.tar.gz.
File metadata
- Download URL: prefect_keeper-0.1.1.tar.gz
- Upload date:
- Size: 162.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.29
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d350f220490af12bf8f3e60f87f9cfa3a36d2f29a3203482cd3538d08864b73d
|
|
| MD5 |
0b44b2afbec0954130de5aec7a964b0a
|
|
| BLAKE2b-256 |
f2d16c0d91ebd7d2690c7123963d610355865c2ed63a1d3b69eb0de4828307df
|
File details
Details for the file prefect_keeper-0.1.1-py3-none-any.whl.
File metadata
- Download URL: prefect_keeper-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.29
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76b3cffcc5a4b6dafff0b722acc61f36b711a3f5f2774253af7b4ea2e6f4d52b
|
|
| MD5 |
92a49d62de69a31e175398aba162c5ac
|
|
| BLAKE2b-256 |
9480bc982c5c605f51c948138808830b1222197898dac3f2fbe6ca42d1fe5193
|