plum
runtype
plum | runtype | |
---|---|---|
6 | 4 | |
551 | 162 | |
1.6% | 0.0% | |
8.2 | 8.0 | |
22 days ago | 4 months ago | |
Python | Python | |
MIT License | 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.
plum
- Plum: Multiple Dispatch in Python
-
Writing Python like it’s Rust
You can use https://github.com/beartype/plum instead of that elif chain too
- GitHub - wesselb/plum: Multiple dispatch in Python
- Plum-dispatch: Julia-inspired multiple dispatch in Python
- Is there any language that is as similar as possible to Python in syntax, readability, and features, but is statically typed?
-
How Julia Uses Multiple Dispatch to Beat Python
Singledispatch is old, dates back to py2: https://docs.python.org/3/library/functools.html#functools.s...
I definitely agree that multiple dispatch is a lot harder :). But most of the examples in the article didn't need it, and it would have been appropriate I think to show equivalent code in Python. All that article did was make me think the author didn't know Python very well.
There are several libraries for multiple dispatch too, for e.g. https://github.com/wesselb/plum
runtype
-
Runtype 0.2 - faster than Pydantic, highly configurable, and with unique features for working with types at runtime.
Source code: https://github.com/erezsh/runtype
-
Python and type hints
And you can use https://github.com/erezsh/runtype to verify at runtime that they are created and remain correct.
What are some alternatives?
fast-sqlite3-inserts - Some bunch of test scripts to generate a SQLite DB with 1B rows in fastest possible way
typeshed - Collection of library stubs for Python, with static types
Pomander - Deploy your PHP with PHP. Inspired by Capistrano and Vlad.
typing - Python static typing home. Hosts the documentation and a user help forum.
MonkeyType - A Python library that generates static type annotations by collecting runtime types
unpythonic - Supercharge your Python with parts of Lisp and Haskell.
jaxtyping - Type annotations and runtime checking for shape and dtype of JAX/NumPy/PyTorch/etc. arrays. https://docs.kidger.site/jaxtyping/
pytype - A static type analyzer for Python code
multipledispatch - Multiple dispatch
typedload - Python library to load dynamically typed data into statically typed data structures
Envoy - Elegant SSH tasks for PHP.
dynamic-dns - An automated dynamic DNS solution for Docker and DigitalOcean