Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Clarify JSON marshalling of `Decimal` values

Open
#751 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
api, databases

Research direction

Read src/crate/client/http.py at lines 105-106, then compare the Decimal handling shown in the linked meltano-target-cratedb reference and issue #52. Resolve which JSON representation is required for Decimal values and document or test the agreed behavior; the issue is done when that representation is explicit and consistently verified.

Written by the indexing model from the issue text.

Description

About

How to marshal values of Python's Decimal type.

Status quo

Currently, the library is conveying Decimal values as strings.

https://github.com/crate/crate-python/blob/7c7a88521d48a9d5225dbd3842f3c4c07fafd4d8/src/crate/client/http.py#L105-L106

See also

Others apparently need serialization to float.

        if isinstance(obj, Decimal):
            return float(obj)

-- https://github.com/crate-workbench/meltano-target-cratedb/blob/148a2d5ec7131658c1a74aed7d91f23befc81341/target_cratedb/sqlalchemy/patch.py#L65-L66

References

Dominant language
Python
Stars
85
Forks
34
Avg merge
3d 1h
Merged PRs (30d)
4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from crate/crate-python

All issues in crate/crate-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.