type-python 0.2.0__py3-none-win_amd64.whl → 0.3.0__py3-none-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- type_python-0.3.0.dist-info/METADATA +118 -0
- type_python-0.3.0.dist-info/RECORD +11 -0
- typepython/__init__.py +1 -1
- typepython/bin/typepython.exe +0 -0
- type_python-0.2.0.dist-info/METADATA +0 -98
- type_python-0.2.0.dist-info/RECORD +0 -11
- {type_python-0.2.0.dist-info → type_python-0.3.0.dist-info}/WHEEL +0 -0
- {type_python-0.2.0.dist-info → type_python-0.3.0.dist-info}/entry_points.txt +0 -0
- {type_python-0.2.0.dist-info → type_python-0.3.0.dist-info}/licenses/LICENSE +0 -0
- {type_python-0.2.0.dist-info → type_python-0.3.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: type-python
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: A statically-typed authoring language that compiles to standard Python
|
|
5
|
+
Author: unadlib
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/type-python/type-python
|
|
8
|
+
Project-URL: Repository, https://github.com/type-python/type-python
|
|
9
|
+
Project-URL: Documentation, https://github.com/type-python/type-python/tree/main/docs
|
|
10
|
+
Project-URL: Issues, https://github.com/type-python/type-python/issues
|
|
11
|
+
Keywords: typepython,type-checking,compiler,python,static-typing
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Rust
|
|
20
|
+
Classifier: Topic :: Software Development :: Compilers
|
|
21
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
22
|
+
Classifier: Typing :: Typed
|
|
23
|
+
Requires-Python: >=3.9
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Dynamic: license-file
|
|
27
|
+
|
|
28
|
+
<p align="center">
|
|
29
|
+
<img src="https://raw.githubusercontent.com/type-python/type-python/main/logo.png" alt="TypePython" width="128" />
|
|
30
|
+
</p>
|
|
31
|
+
|
|
32
|
+
<h1 align="center">TypePython</h1>
|
|
33
|
+
|
|
34
|
+
<p align="center">
|
|
35
|
+
<strong>Write richer types. Emit standard Python.</strong>
|
|
36
|
+
</p>
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
A statically-typed authoring language that compiles to standard Python.
|
|
41
|
+
|
|
42
|
+
Write `.tpy` source files with `interface`, `data class`, `sealed class`, inline generics, and strict null safety. The compiler emits standard `.py` + `.pyi` files for Python 3.10-3.14. No custom runtime, no vendor lock-in.
|
|
43
|
+
|
|
44
|
+
## Install
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
pip install type-python
|
|
48
|
+
typepython --help
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
The Python package bridge supports **Python 3.9+**. Generated projects can target **Python 3.10 through 3.14**.
|
|
52
|
+
|
|
53
|
+
Published wheels bundle the Rust CLI binary. Prebuilt wheels are available for Windows AMD64, macOS x86_64, macOS arm64, and Linux x86_64. Other platforms fall back to the source distribution and require Rust + `cargo`.
|
|
54
|
+
|
|
55
|
+
## Quick Start
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
typepython init --dir my-project
|
|
59
|
+
cd my-project
|
|
60
|
+
typepython check --project .
|
|
61
|
+
typepython build --project .
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Example source:
|
|
65
|
+
|
|
66
|
+
```python
|
|
67
|
+
# src/app/__init__.tpy
|
|
68
|
+
|
|
69
|
+
sealed class Expr:
|
|
70
|
+
pass
|
|
71
|
+
|
|
72
|
+
data class Num(Expr):
|
|
73
|
+
value: int
|
|
74
|
+
|
|
75
|
+
data class Add(Expr):
|
|
76
|
+
left: Expr
|
|
77
|
+
right: Expr
|
|
78
|
+
|
|
79
|
+
def evaluate(expr: Expr) -> int:
|
|
80
|
+
match expr:
|
|
81
|
+
case Num(value=v):
|
|
82
|
+
return v
|
|
83
|
+
case Add(left=l, right=r):
|
|
84
|
+
return evaluate(l) + evaluate(r)
|
|
85
|
+
# Compiler proves all cases are covered -- no default needed.
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## What You Get
|
|
89
|
+
|
|
90
|
+
| Your code (`.tpy`) | Emitted output (`.py` / `.pyi`) |
|
|
91
|
+
| --------------------------------- | -------------------------------------------------- |
|
|
92
|
+
| `sealed class Expr:` | `class Expr: # tpy:sealed` |
|
|
93
|
+
| `data class Num(Expr):` | `@dataclass` plus ordinary `class Num(Expr):` |
|
|
94
|
+
| `interface Drawable:` | `class Drawable(Protocol):` |
|
|
95
|
+
| `overload def f(x: int) -> int:` | `@overload` plus ordinary `def f(x: int) -> int:` |
|
|
96
|
+
| `typealias Pair[T] = tuple[T, T]` | `T = TypeVar("T"); Pair: TypeAlias = tuple[T, T]` |
|
|
97
|
+
|
|
98
|
+
- **Rich type system** -- `unknown`, `dynamic`, `Never`, strict nulls, sealed exhaustiveness, generic defaults, TypeVarTuple
|
|
99
|
+
- **TypedDict utilities** -- `Partial`, `Required_`, `Readonly`, `Mutable`, `Pick`, `Omit`
|
|
100
|
+
- **Full toolchain** -- `init`, `check`, `build`, `watch`, `clean`, `verify`, `lsp`, `migrate`
|
|
101
|
+
- **LSP server** -- hover, go-to-definition, references, rename, completions, signature help, diagnostics
|
|
102
|
+
- **Standard output** -- emitted `.py` + `.pyi` work with mypy, pyright, and ty out of the box
|
|
103
|
+
|
|
104
|
+
## Documentation
|
|
105
|
+
|
|
106
|
+
- [Getting Started](https://github.com/type-python/type-python/blob/main/docs/getting-started.md)
|
|
107
|
+
- [Syntax Guide](https://github.com/type-python/type-python/blob/main/docs/syntax-guide.md)
|
|
108
|
+
- [Type System](https://github.com/type-python/type-python/blob/main/docs/type-system.md)
|
|
109
|
+
- [Configuration](https://github.com/type-python/type-python/blob/main/docs/configuration.md)
|
|
110
|
+
- [CLI Reference](https://github.com/type-python/type-python/blob/main/docs/cli-reference.md)
|
|
111
|
+
- [Interoperability](https://github.com/type-python/type-python/blob/main/docs/interop.md)
|
|
112
|
+
- [Language Spec](https://github.com/type-python/type-python/blob/main/docs/spec/language-spec-v1.md)
|
|
113
|
+
|
|
114
|
+
## Links
|
|
115
|
+
|
|
116
|
+
- [Repository](https://github.com/type-python/type-python)
|
|
117
|
+
- [Issues](https://github.com/type-python/type-python/issues)
|
|
118
|
+
- [License (MIT)](https://github.com/type-python/type-python/blob/main/LICENSE)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type_python-0.3.0.dist-info/licenses/LICENSE,sha256=BMHUZ3id_LOrEdv_GmAbL1ttlKsqjZz14f1_M1tn73k,1089
|
|
2
|
+
typepython/__init__.py,sha256=j68Z_JZemkGBrmytvTfDu3VOUxN8C5Ajo7ZEpVt1gxY,308
|
|
3
|
+
typepython/__main__.py,sha256=m8cggQyLAOSPtb8r-uUv_g53whMoPXtF2NX9yLuPyLg,89
|
|
4
|
+
typepython/_runner.py,sha256=DySWPTud0FIAv2-0xhmwAyt_kk3w3kFJWK8FcYSe858,1777
|
|
5
|
+
typepython/annotation_compat.py,sha256=VKUJEAj9NdDWr1j5cB2OIWlupmDyWVYvQkpJ2Jer2m8,4223
|
|
6
|
+
typepython/bin/typepython.exe,sha256=TaX26_INBP-1J0PyIAIBlY3tAtKHiPppnUdH0HpJh0o,11883008
|
|
7
|
+
type_python-0.3.0.dist-info/METADATA,sha256=YuEUMYng1t8GVUNRkFlbaIznUDQm44k4-CdksuxHLEc,4864
|
|
8
|
+
type_python-0.3.0.dist-info/WHEEL,sha256=GjDPPQwEcripVP6P2r3RxLa-h5Lb9ifGB7FYYtbLDT0,98
|
|
9
|
+
type_python-0.3.0.dist-info/entry_points.txt,sha256=B5Yjdi-RWaeRy7YUcni1lU_ya2lVZXM8llSFNSKEq0U,56
|
|
10
|
+
type_python-0.3.0.dist-info/top_level.txt,sha256=JFRFjt3AXvRQ99SKMxUVu9e3TOp2QpspvE-jk85uMjU,11
|
|
11
|
+
type_python-0.3.0.dist-info/RECORD,,
|
typepython/__init__.py
CHANGED
typepython/bin/typepython.exe
CHANGED
|
Binary file
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: type-python
|
|
3
|
-
Version: 0.2.0
|
|
4
|
-
Summary: A statically-typed authoring language that compiles to standard Python
|
|
5
|
-
Author: unadlib
|
|
6
|
-
License-Expression: MIT
|
|
7
|
-
Project-URL: Homepage, https://github.com/type-python/type-python
|
|
8
|
-
Project-URL: Repository, https://github.com/type-python/type-python
|
|
9
|
-
Project-URL: Documentation, https://github.com/type-python/type-python/tree/main/docs
|
|
10
|
-
Project-URL: Issues, https://github.com/type-python/type-python/issues
|
|
11
|
-
Keywords: typepython,type-checking,compiler,python,static-typing
|
|
12
|
-
Classifier: Development Status :: 3 - Alpha
|
|
13
|
-
Classifier: Intended Audience :: Developers
|
|
14
|
-
Classifier: Programming Language :: Python :: 3
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
-
Classifier: Programming Language :: Rust
|
|
20
|
-
Classifier: Topic :: Software Development :: Compilers
|
|
21
|
-
Classifier: Topic :: Software Development :: Quality Assurance
|
|
22
|
-
Classifier: Typing :: Typed
|
|
23
|
-
Requires-Python: >=3.9
|
|
24
|
-
Description-Content-Type: text/markdown
|
|
25
|
-
License-File: LICENSE
|
|
26
|
-
Dynamic: license-file
|
|
27
|
-
|
|
28
|
-
# TypePython
|
|
29
|
-
|
|
30
|
-
**A statically-typed authoring language that compiles to standard Python.**
|
|
31
|
-
|
|
32
|
-
TypePython lets you write `.tpy` source files with features such as `interface`, `data class`, `sealed class`, inline generics, and strict null safety. The compiler emits standard `.py` and `.pyi` files that run on ordinary Python interpreters and type-check with mypy or pyright.
|
|
33
|
-
|
|
34
|
-
## Install
|
|
35
|
-
|
|
36
|
-
```bash
|
|
37
|
-
pip install type-python
|
|
38
|
-
typepython --help
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
Published wheels are platform-specific because they bundle the Rust CLI binary. Supported releases publish prebuilt wheels for Windows AMD64, macOS x86_64, macOS arm64, and Linux x86_64, so those platforms can install and run TypePython without Rust. Other platforms fall back to the source distribution and require a Rust toolchain with `cargo`.
|
|
42
|
-
|
|
43
|
-
The Python package bridge supports Python 3.9+. Generated TypePython projects currently target Python 3.10, 3.11, or 3.12.
|
|
44
|
-
|
|
45
|
-
## Quick Start
|
|
46
|
-
|
|
47
|
-
Create a project:
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
typepython init --dir my-project
|
|
51
|
-
cd my-project
|
|
52
|
-
typepython check --project .
|
|
53
|
-
typepython build --project .
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
Example source:
|
|
57
|
-
|
|
58
|
-
```python
|
|
59
|
-
sealed class Expr:
|
|
60
|
-
pass
|
|
61
|
-
|
|
62
|
-
data class Num(Expr):
|
|
63
|
-
value: int
|
|
64
|
-
|
|
65
|
-
data class Add(Expr):
|
|
66
|
-
left: Expr
|
|
67
|
-
right: Expr
|
|
68
|
-
|
|
69
|
-
def evaluate(expr: Expr) -> int:
|
|
70
|
-
match expr:
|
|
71
|
-
case Num(value=v):
|
|
72
|
-
return v
|
|
73
|
-
case Add(left=l, right=r):
|
|
74
|
-
return evaluate(l) + evaluate(r)
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
## What You Get
|
|
78
|
-
|
|
79
|
-
- Standard `.py` and `.pyi` output with no custom runtime
|
|
80
|
-
- Type system features such as `unknown`, strict nulls, sealed exhaustiveness, `TypedDict` utilities, and generic defaults
|
|
81
|
-
- CLI commands for `init`, `check`, `build`, `watch`, `clean`, `verify`, `lsp`, and `migrate`
|
|
82
|
-
- Interoperability with standard Python typing tools and package publishing workflows
|
|
83
|
-
|
|
84
|
-
## Documentation
|
|
85
|
-
|
|
86
|
-
- Getting started: <https://github.com/type-python/type-python/blob/main/docs/getting-started.md>
|
|
87
|
-
- Syntax guide: <https://github.com/type-python/type-python/blob/main/docs/syntax-guide.md>
|
|
88
|
-
- Type system: <https://github.com/type-python/type-python/blob/main/docs/type-system.md>
|
|
89
|
-
- Configuration: <https://github.com/type-python/type-python/blob/main/docs/configuration.md>
|
|
90
|
-
- CLI reference: <https://github.com/type-python/type-python/blob/main/docs/cli-reference.md>
|
|
91
|
-
- Interoperability: <https://github.com/type-python/type-python/blob/main/docs/interop.md>
|
|
92
|
-
- Language spec: <https://github.com/type-python/type-python/blob/main/docs/spec/language-spec-v1.md>
|
|
93
|
-
|
|
94
|
-
## Project Links
|
|
95
|
-
|
|
96
|
-
- Repository: <https://github.com/type-python/type-python>
|
|
97
|
-
- Issues: <https://github.com/type-python/type-python/issues>
|
|
98
|
-
- License: <https://github.com/type-python/type-python/blob/main/LICENSE>
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
type_python-0.2.0.dist-info/licenses/LICENSE,sha256=BMHUZ3id_LOrEdv_GmAbL1ttlKsqjZz14f1_M1tn73k,1089
|
|
2
|
-
typepython/__init__.py,sha256=kCK2IS4kVa6N1RsNikfR1sn_tnZ-v_RkAvNCmqMnYgA,308
|
|
3
|
-
typepython/__main__.py,sha256=m8cggQyLAOSPtb8r-uUv_g53whMoPXtF2NX9yLuPyLg,89
|
|
4
|
-
typepython/_runner.py,sha256=DySWPTud0FIAv2-0xhmwAyt_kk3w3kFJWK8FcYSe858,1777
|
|
5
|
-
typepython/annotation_compat.py,sha256=VKUJEAj9NdDWr1j5cB2OIWlupmDyWVYvQkpJ2Jer2m8,4223
|
|
6
|
-
typepython/bin/typepython.exe,sha256=nVmVjeYOX1bMA_nZbP5M82hlMpsmEaN-G-XnBtQRYKE,11372544
|
|
7
|
-
type_python-0.2.0.dist-info/METADATA,sha256=Qn5P8Hw8w6N-1sX8H__xcIip6rlFRG2DymiaLI-wDnI,3930
|
|
8
|
-
type_python-0.2.0.dist-info/WHEEL,sha256=GjDPPQwEcripVP6P2r3RxLa-h5Lb9ifGB7FYYtbLDT0,98
|
|
9
|
-
type_python-0.2.0.dist-info/entry_points.txt,sha256=B5Yjdi-RWaeRy7YUcni1lU_ya2lVZXM8llSFNSKEq0U,56
|
|
10
|
-
type_python-0.2.0.dist-info/top_level.txt,sha256=JFRFjt3AXvRQ99SKMxUVu9e3TOp2QpspvE-jk85uMjU,11
|
|
11
|
-
type_python-0.2.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|