Skip to content

2.0.0

Latest
Compare
Choose a tag to compare
@amotl amotl released this 30 Jan 22:45
· 1 commit to main since this release

What's Changed

  • Switched JSON encoder to use the orjson library, to improve JSON
    marshalling performance. Thanks, @widmogrod.

    orjson is fast and in some spots even more correct when compared against
    Python's stdlib json module. Contrary to the stdlib variant, orjson
    will serialize to bytes instead of str. When sending data to CrateDB,
    crate-python uses a custom encoder to add support for additional data
    types.

    • Python's Decimal type will be serialized to str.
    • Python's dt.datetime and dt.date types will be serialized to
      int (LONG) after converting to milliseconds since epoch, to
      optimally accommodate CrateDB's TIMESTAMP representation.
    • NumPy's data types will be handled by orjson without any ado.

Details

Full Changelog: 1.0.1...2.0.0