Skip to content

A Python implementation of a UDP client and server, augmented with Protobuf messages

Notifications You must be signed in to change notification settings

BinghamtonRover/Python-Networking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Onboard-Network-Py

A Python implementation of a UDP client and server, augmented with Protobuf messages

There is no lib folder here as this code is meant to be added as a Git submodule in lib.

To generate Protobuf files:

mkdir generated  # if needed
protoc --python_out=generated Protobuf/*.proto

Importing files

Always treat imports as starting from the top-level directory, not this submodule. For example:

bin/
lib/
  network/  (this repository)
    bin/
    generated/Protobuf/
    Protobuf/
    src/

To import a file in src:

from lib.network import UdpClient

Imports rely on __init__.py spelling out every single file to import. Since this is annoying for generated files, you must import Protobuf files directly:

from lib.network.generated.Protobuf.wrapper_pb2 import WrappedMessage

The Protobuf files must be in generated/Protobuf, not generated, due to the protoc compiler using absolute imports, not relative imports.

About

A Python implementation of a UDP client and server, augmented with Protobuf messages

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages