pronotepy
pronotepy copied to clipboard
Add json serialization
I would like to create rest service using this lib to get data from pronote. Idea is to provide one endpoint per method, but i need to serialize object in json.
I want to create one docker accessing to pronote, and using this service from nodered to push data to mqtt and then homeassistant Unfortunately, i don't know anything about python to create such PR to provide serialization of object to json, would it be possible to add this ?
Regards, Eric
I've been thinking about adding serialization to dict for some time now. I we could use the __slots__
attribute for this. Converting a dict to json is as simple as json.dumps()
.
here my project, actually i'm building myself the payload, but would be better if we can use someting more generic
https://github.com/bdbogjoe/pronote-rest
Hi, sorry for blocking for so long. Pronotepy's objects can now be serialized to dict
. See docs for information about JSON serialization.