Outside of Python in unix system, environment variables can be easily controlled at the shell level. I don't do production python in this manner. My experience for all other languages like Java, Perl, C, shell scripts and more will be simply a shell source command as such
Bash:
$ cat ./setenv.opt_ext_you_like
export ABC=DEF
$ cat ./sample.py
#!/usr/bin/env python3
import os
print(os.getenv('ABC', '"ABC" env var not found'))
$ set | grep ABC
$ ./sample.py
"ABC" env var not found
$ . ./setenv.opt_ext_you_like
$ set | grep ABC
ABC=DEF
$ ./sample.py
DEF
If your are doing CI/CD, you can always control which environment variables you want to inject. Using any deployment tools like Chef, Ansible, Saltstack, there will be some form of approach to control environment variables of the process being executed. Same for any CI/CD environment. A simple shell script file is all you need. That .env file is just a very python thing. Ultimately you don't need to restrict yourself to one form of ecosystem management. Environment variables are not language specific concept. It's actually a base system feature either at the shell level or OS level.
In fact for controlling of multiple environments, you can even go as far as sourcing your environmental properties using remote redis, memcache, or any other in-memory approaches. I highly doubt there is one best way, it's all about how much effort you want to build an infrastructure for maintainability. It can also be incorporated into things like cloud-init, which is a mechanism one can find out cloud computing environments like AWS, which things are control during instance booting and instantiation. You can also control via retrieval from database.
In all the ways I have suggested, you find there is no one best way, only the way that works best for you.