Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ESI] Python API: create/expose data classes for structs #4089

Open
teqdruid opened this issue Oct 12, 2022 · 0 comments
Open

[ESI] Python API: create/expose data classes for structs #4089

teqdruid opened this issue Oct 12, 2022 · 0 comments
Labels

Comments

@teqdruid
Copy link
Contributor

teqdruid commented Oct 12, 2022

Generate and use data classes in addition to or instead of StructType. Currently we use dicts, which isn't great.

For example, in the following generated code, create a data class for the StructType.

class ESITypes:

  I3 = IntType(3, False)
  I3.capnp_name = "I3"
  
  I64 = IntType(64, False)
  I64.capnp_name = "I64"
  
  Struct16871797234873963366 = StructType({'address': IntType(3, False), 'data': IntType(64, False)})
  Struct16871797234873963366.capnp_name = "Struct16871797234873963366"
  
  I0 = IntType(0, False)
  I0.capnp_name = "I0"
@teqdruid teqdruid added the ESI label Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant