Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

Commit

Permalink
Add modify function
Browse files Browse the repository at this point in the history
  • Loading branch information
jinleevv committed Jul 31, 2023
1 parent 71b6beb commit c3b4d71
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion flojoy/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"send_to_socket",
"get_env_var_key",
"set_env_var_key",
"modify_env_var_key",
"hf_hub_download",
"snapshot_download",
"get_node_init_function",
Expand Down Expand Up @@ -324,6 +325,8 @@ def set_env_var_key(key: str, value: str):
with open(file_path, "a") as file:
file.write(key + ",")

def modify_env_var_key(key: str, new_password: str):
keyring.set_password("flojoy", key, new_password)

def get_credentials() -> Union[dict[str, str], None]:
keys_list: list[str] = []
Expand All @@ -339,7 +342,6 @@ def get_credentials() -> Union[dict[str, str], None]:
credentials_dict[key] = get_env_var_key(key)
return credentials_dict


def clear_flojoy_memory():
Dao.get_instance().clear_job_results()
Dao.get_instance().clear_small_memory()
Expand Down

0 comments on commit c3b4d71

Please sign in to comment.