di
json-parser-in-typescript-very-bad-idea-please-dont-use
di | json-parser-in-typescript-very-bad-idea-please-dont-use | |
---|---|---|
5 | 4 | |
277 | 431 | |
- | - | |
0.0 | 0.0 | |
7 months ago | over 3 years ago | |
Python | TypeScript | |
MIT License | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
di
-
Python Type Hints Are Turing Complete
Indeed.
The dep injection is fastapi and typer code though, and quite tied to it. So it's worth mentioning that somebody is attempting (quite successfully from the look of it) to create a generic lib of dep injection using annotation named DI, inspired by those libs: https://github.com/adriangb/di
-
I built a standalone version of FastAPI's dependency injection system
Also, to clarify because I realized my comment above was confusing: I did not mean that 1 file == 1 function in the def a_function sense, I meant it in the "functionality" sense. So for example di/_scope_validation.py is a piece of functionality (validating scopes) and so it is in it's own file instead of being at the top of di/container.py. I guess the entire project could be a 1000 LOC container.py file, I think I would personally find that a bit hard to digest, but it's for others to read not me so...
-
di: pythonic dependency injection
We provide some basic benchmarks comparing to FastAPI.
json-parser-in-typescript-very-bad-idea-please-dont-use
-
Python Type Hints Are Turing Complete
[1]: https://github.com/jamiebuilds/json-parser-in-typescript-ver...
- TypeScript Tricks I wish I knew when I learned TypeScript
-
Type-safe regular expression matching with named capture groups
Also, shoutout to this guy who implemented a json parser in typescript types. This is what gave me the idea.
-
I need to learn about TypeScript Template Literal Types
The next examples get progressively more bonkers, so I'm not going to write down all my thinking about them - you should check them out though and see if you can see how they work. The JSON parser is probably the best mix of complex and readable.
What are some alternatives?
xlcalculator - xlcalculator converts MS Excel formulas to Python and evaluates them.
LaTeXML - LaTeXML: a TeX and LaTeX to XML/HTML/ePub/MathML translator.
python-typing-machines - Python type hints are Turing complete.
pydantic - Data validation using Python type hints
awesome-template-literal-types - Curated list of awesome Template Literal Types examples
ideas
typanion - Static and runtime type assertion library with no dependencies
typing-euler - Typing Euler because values are code smells
json-parser-in-typescript-ver