☂ general awesomeness for klein.Plating
Open
Nobody has claimed this yet.
documentation
feature
- Dominant language
- Python
- Stars
- 838
- Forks
- 123
- Avg merge
- 7h 58m
- Merged PRs (30d)
- 12
Description
Here are some things that should be added to klein.Plating to make it really complete, which were left out of the initial implementation (#118) to keep it compact:
- Support for different types of templates
- the ones from twisted;
XMLFile#121 - and
XMLStringas implied by #89's basic prototype #122 - HTML5Lib #123
- the ones from twisted;
- Deferred support #131
- including some kind of solution for asynchronous JSON serialization #124
- More documentation, particularly for how to use widgets #125
- Something on the input side, for conveniently parsing JSON post bodies and handling form data submission - something that doesn't involve handling state in memory, by the way, since that doesn't scale. (Is there even a way in werkzeug's routing syntax to extract a query arg as a python parameter, or doe sit only accept path segments?) #126
-
attr.ssupport - specifically, automatically invokingasdictso applications can work entirely in terms of nice data structures and not manually decompose things into dicts and lists #127 - pluggable renderer support. the example even has a great use-case: latitude and longitude are conventionally presented as "east" and "west", "north" and "south", not positive and negative numbers. We may want to present an individual serializable value in a different way. I think that the way to do this might be
@plating.renderer("blub") def blubrender(plated_data, request, tag): "..."to stuff things into a specific renderer's element. Still not sure how to do composition / renderer libraries nicely, but at the very least you could write a function and then doadd_utility_renderers(my_plating)#128 and #130 - closely related, possibly resolvable with the same implementation - datetime serialization (what even is the best practice for this in JSON) #129
- real content-type negotiation #132
- support for methods #133 (oops)
- allow for nesting within
:listrenderer #161
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 initial implementation in #118, then review the linked subissues (#121–#133 and #161), which split this umbrella request into individual features. Done would require completing the selected subissue or the full checklist, including templates, deferred and serialization support, documentation, input handling, renderers, negotiation, methods, and nesting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 20/100