Python Project Layout: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 18: Line 18:
  venv/bin/pip install -r requirements.txt
  venv/bin/pip install -r requirements.txt
</font>
</font>
Also see:
 
Example of <code>.gitignore</code>:
 
Example of <code>requirements.txt</code>:
<font size=-1>
datadog == 0.43.0
</font>
 
More details on <code>[[Pip#requirements.txt|requirements.txt]]</code>


{{Internal|Python_Language#Virtual_Environment|Virtual Environment}}
{{Internal|Python_Language#Virtual_Environment|Virtual Environment}}

Revision as of 00:26, 18 February 2022

Internal

Setting a Manual Project

.
├── .gitignore
├── requirements.txt
├── src
│    └── main
│         └── python 
└── venv
     ├── bin

python3 -m venv venv
venv/bin/pip install -r requirements.txt

Example of .gitignore:

Example of requirements.txt:

datadog == 0.43.0

More details on requirements.txt

Virtual Environment

Organizatorium

  • /Users/ovidiu/Library/Python/3.8/bin/ must be in PATH.
  • Python environments on Mac:
    • ~/Library/ApplicationSupport/iTerm2/iterm2env/versions/*/bin/python3
    • ~/Library/ApplicationSupport/iTerm2/Scripts/YourScript/iterm2env/versions/*/bin/python3