danielgtaylor / danielgtaylor/python-betterproto

Cast python dictionary into the betterpoto struct

Open
#505 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.8k
Forks
234
PR merge metrics
No merged PRs in 30d

Description

Here the template as example:
```
message Test {
google.protobuf.Struct data = 1;
}
```
So, the idea is to add a function to cast a python dictionary in the protobuf structure. The value of dictionary can be any type: int, str, list, dict but we need to automatically set up the fields attribute for the `betterproto.lib.google.protobuf.Struct` instance.
Is this functionality exists? (for now, I just wrote a custom function for it)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.