Skip to content

Commit 8074768

Browse files
authored
Update README.rst
1 parent 0a63a9e commit 8074768

File tree

1 file changed

+26
-16
lines changed

1 file changed

+26
-16
lines changed

Diff for: README.rst

+26-16
Original file line numberDiff line numberDiff line change
@@ -403,50 +403,60 @@ Frequently Asked Questions
403403

404404
.. code-block:: python
405405
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"))
409411
410412
411413
2) How to use python-decouple with Jupyter?
412414
-------------------------------------------
413415

414416
.. code-block:: python
415417
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"))
419423
420424
421425
3) How to specify a file with another name instead of `.env`?
422426
----------------------------------------------------------------
423427

424428
.. code-block:: python
425429
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"))
429435
430436
431437
4) How to define the path to my env file on a env var?
432438
--------------------------------------------------------
433439

434440
.. code-block:: python
435441
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))
440448
441449
442450
5) How can I have multiple *env* files working together?
443451
--------------------------------------------------------
444452

445453
.. code-block:: python
446454
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")))
450460
451461
452462
Contribute

0 commit comments

Comments
 (0)