python-attrs / python-attrs/attrs
Extended properties
Open
Nobody has claimed this yet.
Feature
- Dominant language
- Python
- Stars
- 5.8k
- Forks
- 480
- Avg merge
- 2h 15m
- Merged PRs (30d)
- 2
Description
It would be a cool feature to have properties that participate in asdict method.
@attr.s
class SomeClass:
@attr.property(asdict=True)
def some_dynamic_attr(self):
return True
print(asdict(SomeClass()))
>> {'some_dynamic_attr': True}
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 at the asdict entry point and inspect how attrs fields are collected and serialized. Use the issue's dynamic property example to define the expected behavior, then add coverage showing that the property appears in the resulting dictionary while existing serialization behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100