My understanding is server side is not accessible by the client. But if there is a method that sends that api request to the client with the API key in the request, the client will be able to see the key.
I have definitely been there. I would suggest looking into Anvil Docs | Encrypting Secret Data Documents. It allows you to share your application without worrying about all your sensitive keys.
For anyone later reading this who tldr’d the Docs link above, the cliffnotes version is:
Install The Secrets Service in your app
Put your API keys in the secrets service with a “Name” for that secret.
(Like ‘StripeAPIkey’ or something)
When connecting with the API inside the app server module, use something like:
anvil.secrets.get_secret('StripeAPIkey')
To retrieve the secret information.
This way even if you share your app or you make a git clone public, theres nothing for anyone to have access to, unless they already have access to your anvil IDE.
(…by then everything would be up for grabs at that point so who cares)