python-attrs / python-attrs/cattrs
Extra keys
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 159
- Avg merge
- 12h 21m
- Merged PRs (30d)
- 6
Description
Description
Is it possible to get the keys that were not used during a call to structure(input_dict, SomeClass)?
One way would be to use forbid_extra_keys to get the names of these extra keys, but then you would have to run structure a second time if you still want to use the structured data
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the structure(input_dict, SomeClass) behavior and the forbid_extra_keys option described in the issue. Determine how unused keys could be exposed without requiring a second structuring call, and define tests that confirm both the structured data and the extra-key names are available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100