Skip to content

Commit 2a88411

Browse files
committed
python: major rewrite with more full-featured edge node examples
Includes: - packaging config using setuptools - regenerated the pb2 files with the current protobuf definition and libprotoc 3.6.1 - convert all tabs to spaces - beautify all code according to PEP8 - updated examples to match new usage
1 parent 44648c9 commit 2a88411

18 files changed

+2272
-1332
lines changed

python/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
build
2+
dist

python/README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
Add in "function annotations" or use "typing" module?
2+
3+
https://docs.python.org/3/tutorial/modules.html
4+
5+
# Python specific hints and tips
6+
7+
Basic instructions used to setup Python packaging found here: https://packaging.python.org/en/latest/tutorials/packaging-projects/
8+
9+
## Building PIP package
10+
11+
From in the `python` directory:
12+
13+
```
14+
python3 -m build
15+
```
16+
17+
## Install PIP package locally for testing
18+
19+
From in the `python` directory:
20+
21+
```
22+
python3 -m pip install .
23+
```
24+
25+
## Recompiling protobuf definition
26+
27+
From the top directory of tahu:
28+
29+
```
30+
protoc -I=sparkplug_b --python_out=python/core/tahu sparkplug_b.proto
31+
```
32+

python/core/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.egg-info

python/core/__init__.py

Whitespace-only changes.

python/core/host_session_establishment.py

Lines changed: 0 additions & 97 deletions
This file was deleted.

python/core/readme.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)