python-attrs / python-attrs/cattrs
Schema generation
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 159
- Avg merge
- 12h 21m
- Merged PRs (30d)
- 6
Description
Hi @Tinche! I really love the combination of attrs and cattrs; it is a great way to organize code! After having shot myself in the foot several times with pydantic, I switched to (c)attrs in most of my projects. However, there is one part where pydantic still has an edge – or at least I couldn't find an immediate solution with (c)attrs – which is generating schemas (JSON or similar) from class definitions.
Perhaps this hasn't been in scope so far, but I think this would be a natural task for cattrs, no? At least I know that other people seem interested in this as well. A quick search yields:
Do you think this is something that should become part of the roadmap?
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 reviewing cattrs' existing scope and the referenced attrs-jsonschema package, then compare the linked discussion about schema generation. Before implementation, clarify whether schema generation belongs in cattrs and agree on supported schema formats, class definitions, and acceptance criteria; done cannot be defined from the current issue alone.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100