-
Notifications
You must be signed in to change notification settings - Fork 68
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
Python: Unable to construct Statement
objects
#299
Comments
I dug a little further, and this constructed as expected: stmt = Statement(
subjects=[
ResourceDescriptor(
name="lol",
digest={
"sha256": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b"
},
).pb,
],
predicate={},
predicate_type="https://in-toto.io/Statement/v1",
) (Note the explicit So it looks like I can construct |
Apologies for my delayed response. I tend to agree that this level of indirection to properly set the nested protobufs within a Seeing how you'd like to use the API and pass in @woodruffw is this the sort of change that would work for you? |
I think so! It might make sense to align this with #291 -- that will make the underlying protobuf models much more ergonomic and easier to type-check, which will (IMO) eliminate the need to pass in a I can open up a draft PR for that in a moment. |
I've opened #315 for the above -- my thinking there is that |
Fair enough! And thank you for the draft PR! I'm all for removing the clunkiness of protobuf in Python where we can. |
This may be PEBKAC, but filing because I don't see the error 🙂.
I'm trying to use
in_toto_attestation
(the Python package generated from this repository) to build aStatement
. This is what I have so far:however, that fails with the following:
it looks to me like the
Statement
binding is expecting some kind of protobuf object for the inner subjects list member, but it isn't clear to how to construct that object. None of the currently exposed types look right for it.CC @adityasaky @joshuagl (apologies if you're the wrong people to ping)
The text was updated successfully, but these errors were encountered: