Named types.
Slowing down. Last release over 2 years ago, little activity since. Fine for existing code; think twice for a new project.
pip install namednamed
Named types.
Installing
Python 3.8 or above is required.
pip
Installing the library with pip is quite simple:
$ pip install named
Alternatively, the library can be installed from source:
$ git clone https://github.com/nekitdev/named.git
$ cd named
$ python -m pip install .
poetry
You can add named as a dependency with the following command:
$ poetry add named
Or by directly specifying it in the configuration like so:
[tool.poetry.dependencies]
named = "^1.4.2"
Alternatively, you can add it directly from the source:
[tool.poetry.dependencies.named]
git = "https://github.com/nekitdev/named.git"
Example
>>> from named import get_name, get_type_name, is_named
>>> print(is_named(int))
True
>>> print(get_name(int))
int
>>> print(is_named(42))
False
>>> print(get_type_name(42))
int