You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Use `pip` for installing packages if not using `poetry`.
17
17
18
-
18
+
:::info
19
+
Docker based containerized python can be used as well. Official images [here](https://hub.docker.com/_/python). It is better to use virtualenvs in docker as well rather than root based user.
Copy file name to clipboardExpand all lines: docs/python/general.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ It is recommended to upgrade the package dependency whenever possible although v
11
11
:::
12
12
13
13
* See [tools](tools.md) that can be used in development environment setup to ease your coding process.
14
-
* Always use `python3` and try to stay above version `3.7`. **Latest stable** is always recommended.
14
+
* Always use `python3`. **Latest stable** is always recommended. Ensure version is no older than 2 versions back. i.e. if current stable is `3.11` then use atleast `3.9`.
15
15
* Indentation should always be **space** and width should always be **4**.
16
16
* File size and functionality:
17
17
- break files into modules if you feel they have multiple functionalities.
@@ -41,7 +41,7 @@ It is recommended to upgrade the package dependency whenever possible although v
41
41
WHENbreakDOESNOTHAPPEN
42
42
```
43
43
* Use `pathlib`for path related use case rather than `os.path`
44
-
* Use type annotation ortype hints when possible fortype safe code. `mypy` like checker can be used.
44
+
* Use type annotation ortype hints fortype safe code especially for newer projects. Look into [tools](tools.md) for inference checker.
45
45
*`Docker` can be used for deployment. Use `python` images for [`docker`](https://hub.docker.com/_/python).
46
46
* Use `generators`and`yield` instead of data structures for high streams of data.
47
47
* Use `itertools`, `functools`for utilities and`collections`for data structures when needed.
Copy file name to clipboardExpand all lines: docs/python/tools.md
+10-1Lines changed: 10 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,7 @@ These can be used with dependency Management
24
24
### Linters:
25
25
* [flake8](https://flake8.pycqa.org/en/latest/) with [plugins](https://github.com/DmytroLitvinov/awesome-flake8-extensions)
26
26
* Alternative: [pylint](https://www.pylint.org)
27
+
* Alternative: [ruff](https://beta.ruff.rs/docs/)
27
28
* [bandit](https://bandit.readthedocs.io/en/latest/) to find common security issues. This can be used with `flake8` as a [plugin](https://pypi.org/project/flake8-bandit/)
28
29
29
30
### Formatters:
@@ -32,6 +33,13 @@ These can be used with dependency Management
0 commit comments