python_struct

Structs in Python


Keywords
struct, python-3, x, python-2, 7
License
Other
Install
pip install python_struct==1.0

Documentation

Python Struct Code Health Latest VersionPython Version

Struct class in Python

Example:

from python_struct import *

Point2D = Struct("Point2D", "x y")
p2d = Point2D(x=8, y=12)
print(p2d.x, p2d.y)

This code will return:

8 12