# prefect-community

Amar Eid

02/23/2022, 4:09 PM
Hello everyone! I am very new to Prefect and have already started to build my new Flow.🙌 When trying to work with Prefect Secrets locally, using the following type of Secrets syntax in my local flow should run as well :
Copy code
from prefect.tasks.secrets import PrefectSecret

def my_task(secret_credentials):
    return secret_credentials

with Flow('test') as flow:
    credentials = PrefectSecret('NAME_OF_SECRET')
According to this documentation to be able to set these local secrets I have to 1. Create a custom config file by running:
Copy code
cd ~/.prefect/ && touch config.toml
2. Add the local secrets into this file But the “.prefect” file doesnt exist on my machine. I have tried to uninstall and install prefect again and it doesnt generate. Any idea why this is happening and what I should do to create this file? Thanks in advance for the help! //fyi @Henrietta Salonen @Maximilian Lutz

Kevin Kho

02/23/2022, 4:12 PM
Hi @Amar Eid, you mean the
doesn’t exist right? As long as you didn’t explicitly specify a home directory, you can create both the
folder and the
. I believe if you authenticate to Prefect Cloud, the
folder should exist. It’s more common for
not to, but you can just create it. The one that you make gets merged to the default one.

Amar Eid

02/23/2022, 4:25 PM
Thanks @Kevin Kho for your quick reply. I didnt authenticate to Prefect Cloud so that must be it. Ill do that and see if it works Thanks!!