@@ -403,50 +403,60 @@ Frequently Asked Questions
403
403
404
404
.. code-block :: python
405
405
406
- >> > import os
407
- >> > from decouple import Config, RepositoryEnv
408
- >> > config = Config(RepositoryEnv(" path/to/.env" ))
406
+ import os
407
+ from decouple import Config, RepositoryEnv
408
+
409
+
410
+ config = Config(RepositoryEnv(" path/to/.env" ))
409
411
410
412
411
413
2) How to use python-decouple with Jupyter?
412
414
-------------------------------------------
413
415
414
416
.. code-block :: python
415
417
416
- >> > import os
417
- >> > from decouple import Config, RepositoryEnv
418
- >> > config = Config(RepositoryEnv(" path/to/.env" ))
418
+ import os
419
+ from decouple import Config, RepositoryEnv
420
+
421
+
422
+ config = Config(RepositoryEnv(" path/to/.env" ))
419
423
420
424
421
425
3) How to specify a file with another name instead of `.env `?
422
426
----------------------------------------------------------------
423
427
424
428
.. code-block :: python
425
429
426
- >> > import os
427
- >> > from decouple import Config, RepositoryEnv
428
- >> > config = Config(RepositoryEnv(" path/to/somefile-like-env" ))
430
+ import os
431
+ from decouple import Config, RepositoryEnv
432
+
433
+
434
+ config = Config(RepositoryEnv(" path/to/somefile-like-env" ))
429
435
430
436
431
437
4) How to define the path to my env file on a env var?
432
438
--------------------------------------------------------
433
439
434
440
.. code-block :: python
435
441
436
- >> > import os
437
- >> > from decouple import Config, RepositoryEnv
438
- >> > DOTENV_FILE = os.environ.get(" DOTENV_FILE" , " .env" ) # only place using os.environ
439
- >> > config = Config(RepositoryEnv(DOTENV_FILE ))
442
+ import os
443
+ from decouple import Config, RepositoryEnv
444
+
445
+
446
+ DOTENV_FILE = os.environ.get(" DOTENV_FILE" , " .env" ) # only place using os.environ
447
+ config = Config(RepositoryEnv(DOTENV_FILE ))
440
448
441
449
442
450
5) How can I have multiple *env * files working together?
443
451
--------------------------------------------------------
444
452
445
453
.. code-block :: python
446
454
447
- >> > from collections import ChainMap
448
- >> > from decouple import Config, RepositoryEnv
449
- >> > config = Config(ChainMap(RepositoryEnv(" .private.env" ), RepositoryEnv(" .env" )))
455
+ from collections import ChainMap
456
+ from decouple import Config, RepositoryEnv
457
+
458
+
459
+ config = Config(ChainMap(RepositoryEnv(" .private.env" ), RepositoryEnv(" .env" )))
450
460
451
461
452
462
Contribute
0 commit comments