as far as I have read, what I am requesting is not possible, so maybe you can alternatively provide me with some best practices 🙂
So I am using a package that I built for client and fastapi use. The method establishes a connection with a SQL database. It looks similar to this:
def connect(environment = ENV):
doSomething()
ENV is a constant that gets predetermined, but in some occasions I need to access different environments on the clientside (migrations, comparisons of data quality, etc., not really for daily use, but still I sometimes need this), but not the serverside.
If I want to use it with a fastapi Depends, I can also pass the environment in fastapi and then write in a db of a different environment. This is kinda problematic, because on the serverside, each container should only write into its own environment.