aleph-im / aleph-sdk-python

Python SDK library for the Aleph.im network
MIT License
3 stars 4 forks source link

Fix: allow user to specify datetime and UUID objects in post content #61

Closed odesenfans closed 11 months ago

odesenfans commented 11 months ago

Problem: using create_post() with an object containing datetime, UUIDs and other types not serializable by the Python json module fails.

Solution: as we already use Pydantic all over the place, use the Pydantic encoder as default for all the types not serializable by the json module.

hoh commented 11 months ago

Looks like a decent idea :+1: