Setting up environment variables

Hello all, I’m trying to make api requests to external services within a server script and was wondering if there is any way to store the api key and api secret as environment variables for secure, quick and easy access.

Thank you! I have a new dilemma though, I want to add a button on the standard purchase order doctype that would send n post request to the server script that would go out to the external api, but I’m not able to import the requests module. I did some research and the best alternative I saw was to create a custom app for it but how do I have the custom app add the button to the purchase order doctype and then create the script that will need to import the request module?

Or should I do it like this:
Normal client script adds button that sends post request to backend → backend scripts sends data to custom app script using frappe.make_post_request → custom app scripts sends back response to purchase order server script → server script sends back response to client script.

get_conf is not available in server scripts