Matlab like structure for python, allowing for fast and easy indexing
Project description
struct4py
Matlab like structure for python
An example on how to use it in your workflow. Functions like Matlab structs where you can directly assign multiple levels of data.
from struct4py import Struct
# Example usage
data = Struct()
# Assigning primitive value
data.a = 10
print(data) # Struct({'a': 10})
print(data.a) # 10
data.b.c = 20
print(data.b.c) # 20
print(data) # Struct({'a': 10, 'b': Struct({'c': 20})})
data.a.c = 10 # will fail as data.a already exists
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
struct4py-1.0.0.tar.gz
(2.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file struct4py-1.0.0.tar.gz.
File metadata
- Download URL: struct4py-1.0.0.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.11 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
653ee2dcec2dea5baaae423f05b135a37c4c29bccb174bff98a89549e625e489
|
|
| MD5 |
0d455ffa6939ce8356103e579b79227f
|
|
| BLAKE2b-256 |
3a164114c7e592dc745583f769eae738aef3f0a820ca9d6ff38b84da19965aca
|
File details
Details for the file struct4py-1.0.0-py3-none-any.whl.
File metadata
- Download URL: struct4py-1.0.0-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.11 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5dabc68458094d06231aee6c668938809fb494013bb19966c02bea981e5f8b82
|
|
| MD5 |
74a3d388f28c9b2388cd05dcc7e847ad
|
|
| BLAKE2b-256 |
e78347969f2979f15923fe38dba62d6a812f22c67d99ce88148cbb956805dd50
|