Powered by
How do I add my api Key?
# ❓|questions
d
danash_11
04/12/2024, 6:48 AM
Probably a stupid question. I'm just starting to work with similar projects. It's not entirely clear how to add my api Key. Could someone please share a more illustrative example?
https://cdn.discordapp.com/attachments/1228235295246385182/1228235295477075978/image.png?ex=662b4e41&is=6618d941&hm=6e8eaa46a5b01d292b29453fefc8f2a9e5b95039f135d0ce3c8ea9cbd4a2be3b&
h
hkfeeder
04/12/2024, 8:49 AM
You could write it directly in your .bashrc or .zhrsc or whatever shell you are using. Or do like i am doing : use a .env file
hkfeeder
04/12/2024, 8:50 AM
https://cdn.discordapp.com/attachments/1228235295246385182/1228265852223094855/image.png?ex=662b6ab7&is=6618f5b7&hm=345397c8d3576e2519c34f0d81d087fdaa7fcdf940ca070614a3c7ae96ae8364&
hkfeeder
04/12/2024, 8:50 AM
and to import the values
https://cdn.discordapp.com/attachments/1228235295246385182/1228266073833607198/image.png?ex=662b6aec&is=6618f5ec&hm=f07eef04f58ce2bc10b794fd04f45040d0a4f8eb46eef78d034e3c3991daaa84&
hkfeeder
04/12/2024, 8:51 AM
and then you read them directly using os.getenv(YOUR_API_KEY_NAME)
d
danash_11
04/12/2024, 9:16 AM
Thank you!
4
Views
Previous
Next