Type Manipulation in Python
This is the development repository for PEP 827 – Type Manipulation, which proposes TypeScript-inspired type-level introspection and construction facilities for the Python type system.
This repository contains an implementation of the proposed additions
to typing (typemap/typing.py), exported as
the module typemap_extensions.
It also contains a prototype runtime evaluator (typemap/type_eval).
Discussion of the PEP is at the PEP 827 discussion thread.
A prototype typechecker implementation lives at https://github.com/msullivan/mypy-typemap and is a test dependency of this repo.
There is an example repo with a straightforward skeleton for playing around with the proposal.
Development
- Clone the repo
$ cd typemap$ uv sync$ uv run pytest
Running the typechecker
The prototype mypy can be run from this repo with uv run mypy.
Stubs are set up so that importing typemap_extensions will do the
right thing.
uv run pytest tests/test_mypy_proto.py will run the mypy prototype
against a supported subset of test files.
You can also run the prototype mypy directly on a file with uv run mypy <file>
Metadata
Release files for python-typemap 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| python_typemap-0.1.0.tar.gz | 63.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| python_typemap-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 100.0 kB
Release files / python_typemap-0.1.0.tar.gz
| Download URL | python_typemap-0.1.0.tar.gz |
|---|---|
| Size | 63.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9b7e76e48ece15b63e8bcda63792f37ac647d927f6f0d3ae74a9bc61e1e54fdf
|
|
BLAKE2b-256 checksum How to use checksums |
6ff0c7f9653a5feeea7aec6afbba25332a8a81782cb74f13c972237ec368ab0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / python_typemap-0.1.0-py3-none-any.whl
| Download URL | python_typemap-0.1.0-py3-none-any.whl |
|---|---|
| Size | 36.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7f5e9e0a3feae37fcbacb6a4ac23b02bb4393adf0caa0fb4f0fdd29aa7fe33b5
|
|
BLAKE2b-256 checksum How to use checksums |
ba09d9cb55844514f40fd0290f0b7a0691d8db5e5808c50032a9b9ab95c4385d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|