-
Notifications
You must be signed in to change notification settings - Fork 24
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
WIP Py3 bindings #51
base: master
Are you sure you want to change the base?
WIP Py3 bindings #51
Conversation
Identified and patched a bug in array handling here https://github.com/dfxmachina/vision/pull/103#pullrequestreview-41849394 Gotta incorporate that into this PR |
Currently, python bindings don't support |
Validation of unions is broken. This is because avro deserializes unions into python dicts with a different expected shape than the shape that courier deserializes them into. For example: given We will have to either not validate unions, or bring legit validation into the python bindings. |
Another feature request: would be really great for the objects to have |
Bug report: double quotes in the comment result in an invalid schema. Description:
After generating courier bindings
No error if |
@eboto I was looking into python bindings for courier and found this PR thread. I would like to help with this PR to prepare it for master. Are there any tasks which could help this branch? Thanks. |
WORK IN PROGRESS DO NOT MERGE
Discussion here
Python3 Courier Data Binding Generator
Courier bindings for Python 3 (tested against Python 3.6)
Features missing in action
Mainline Courier features that are not yet supported, but will be by the time
this thing is ready for submit:
non-primitives.
avro libraries.
MyRecord.create
arerequired. These should be easy to add.
Fruits.BANANA.property("color")
Additional tasks before merging to courier master:
TODO(py3)
items from the changelist.__init__.py
rather than per-class filesAdditional desirable tasks for later:
courier.py
as a package throughpip
instead of through thegenerator
Pythonic API Questions
cookie.fortune.message = 'Hello World'
will change the json value ofcourier.dumps(cookie)
?courier.loads(MyRecordType, json_string
)courier.validate(my_record)
of courseNotes from interviews with a real python dev:
create
. Instead, just enforce the contract in the init function itself, throwing a courier.ValidationErrormy_union = /* get the union of Cookie | FortuneCookie */
my_union.calories
AttributeError
or whatever the right one is