diff --git a/subjects/devops/credentials_searches/README.md b/subjects/devops/credentials_searches/README.md index 52b6a12c..956a52f0 100644 --- a/subjects/devops/credentials_searches/README.md +++ b/subjects/devops/credentials_searches/README.md @@ -4,17 +4,17 @@ Create a file `credentials_searches.py` that contains a function `credentials_search` which takes no parameters and searches for the keys `password` and `secret` in a file called `logs.json`. -- If both keys are found, the function should create a new json file named 'credentials.json' and save the values of those keys in it. +- If both keys are found, the function should create a new json file named `credentials.json` and save the values of those keys in it. -- If only one of the keys is found, the function should create a new json file named 'credentials.json' and save the value of that key in it. +- If only one of the keys is found, the function should create a new json file named `credentials.json` and save the value of that key in it. -- If neither key is found, the function should not create the 'credentials.json' file. +- If neither key is found, the function should not create the `credentials.json` file. -- If the 'logs.json' file is empty or is not a json file, the function should not create the 'credentials.json' file. +- If the `logs.json` file is empty or is not a json file, the function should not create the `credentials.json` file. -- If the 'logs.json' file does not exist, the function should not create the 'credentials.json' file. +- If the `logs.json` file does not exist, the function should not create the `credentials.json` file. -- If the keys are found in a nested object, the function should create the 'credentials.json' file and save the values of the keys in it. +- If the keys are found in a nested object, the function should create the `credentials.json` file and save the values of the keys in it. ### Usage @@ -47,13 +47,13 @@ Your function should generate this file `credentials.json`: ### Hints -- The json module can be used to read and write JSON files. +- The `json` module can be used to read and write JSON files. -- The os module can be used to check if a file exists and remove a file. +- The `os` module can be used to check if a file exists and remove a file. -- Remember that the function should be able to search for the keys password and secret in nested json objects. +- Remember that the function should be able to search for the keys `password` and `secret` in nested json objects. -- Using the isinstance function could be useful to check if a value is for example a dict. +- Using the `isinstance` function could be useful to check if a value is for example a dict. ### References