Skip to content

Commit

Permalink
python: major rewrite with more full-featured edge node examples
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jbrzozoski committed Mar 13, 2022
1 parent b47a909 commit f12f2a0
Show file tree
Hide file tree
Showing 18 changed files with 2,272 additions and 1,332 deletions.
2 changes: 2 additions & 0 deletions python/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build
dist
32 changes: 32 additions & 0 deletions python/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Add in "function annotations" or use "typing" module?

https://docs.python.org/3/tutorial/modules.html

# Python specific hints and tips

Basic instructions used to setup Python packaging found here: https://packaging.python.org/en/latest/tutorials/packaging-projects/

## Building PIP package

From in the `python` directory:

```
python3 -m build
```

## Install PIP package locally for testing

From in the `python` directory:

```
python3 -m pip install .
```

## Recompiling protobuf definition

From the top directory of tahu:

```
protoc -I=sparkplug_b --python_out=python/core/tahu sparkplug_b.proto
```

1 change: 1 addition & 0 deletions python/core/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.egg-info
Empty file removed python/core/__init__.py
Empty file.
97 changes: 0 additions & 97 deletions python/core/host_session_establishment.py

This file was deleted.

2 changes: 0 additions & 2 deletions python/core/readme.txt

This file was deleted.

Loading

0 comments on commit f12f2a0

Please sign in to comment.