marshmallow-code / marshmallow-code/marshmallow

Number fromhex()

Open
#1,941 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

docs
Dominant language
Python
Stars
7.2k
Forks
738
Avg merge
1d 23h
Merged PRs (30d)
7

Description

In the [documentation ](https://marshmallow.readthedocs.io/en/stable/marshmallow.fields.html#marshmallow.fields.Number) for`Fields.Number` it mentions **fromhex()**. It is not clear to me how I can trigger that.

I would like to convert a hex-like string (e.g. 0x7AB) to a number and check that a non-hex-like string has not been given.

Essentially, is there a built-in way to deserialise/validate a hex-like string or would I need to use `Fields.Method`?

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.

Research direction

Start with the Fields.Number documentation linked in the issue and trace the fromhex() reference to the relevant Python behavior. Clarify whether Number deserializes hex-like strings and, if so, show how; otherwise state the supported approach for validating such input. Done means the documentation answers the question with a usable example.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.