This release is a pre-release and may not be stable for production use.
basedpython
a python type checker and a python-like language that transpiles to pure python
enum class Shape:
case Circle(radius: int)
case Rect(width: int, height: int)
def area(self) -> int:
match self:
case Shape.Circle(r): return 3 * r * r
case Shape.Rect(w, h): return w * h
extension list[Element: Shape]:
def first_circle(self) -> Shape.Circle?:
for shape in self:
if shape is Shape.Circle:
return shape
return None
def stats(shapes: list[Shape]) -> (count: int, total: int):
return (len(shapes), sum(s.area() for s in shapes))
def main():
let shapes = [Shape.Circle(1), Shape.Rect(2, 3)]
let summary = stats(shapes)
print(f"{summary.count} shapes, {summary.total} total")
print(shapes.first_circle()?.radius ?? 0)
installation
uv add --dev basedpython
by run main
documentation
kotlinisland.github.io/basedpython
acknowledgements
basedpython is a fork of astral-sh/ruff — it reuses ruff's parser, AST, and fix-application machinery, and the type checker is built on ty. none of this would exist without the work of the astral team and the wider ruff community
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file basedpython-0.0.1a7.tar.gz.
File metadata
- Download URL: basedpython-0.0.1a7.tar.gz
- Upload date:
- Size: 10.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
418897dccc5f5b18532e82d73e75626bb3af6de021a500d3f9f1ce600986765a
|
|
| MD5 |
5647dea2f3b158e36776ea4952534443
|
|
| BLAKE2b-256 |
b91768146d3885b6493bd37ba9515273028026b9d5c3eba845af9ca816dafd45
|
File details
Details for the file basedpython-0.0.1a7-py3-none-win_arm64.whl.
File metadata
- Download URL: basedpython-0.0.1a7-py3-none-win_arm64.whl
- Upload date:
- Size: 25.5 MB
- Tags: Python 3, Windows ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
beb28b9afa2d7e7f5599c2d88e0c724910d15147cbc2df8bf8a83e3a1c29cd61
|
|
| MD5 |
52ba6b6d1b69173126269814dbc62270
|
|
| BLAKE2b-256 |
acef94d2b5335f2adcf761ac1625cef3c2c36035691d3af3878282b5714dcdb6
|
File details
Details for the file basedpython-0.0.1a7-py3-none-win_amd64.whl.
File metadata
- Download URL: basedpython-0.0.1a7-py3-none-win_amd64.whl
- Upload date:
- Size: 26.9 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84fab87a8e4088a3aac41d63f6e0b6cfa58be4d704b6a090d775ab9288514093
|
|
| MD5 |
ef3f9db25a1d9b69ad5726c0694a7cd7
|
|
| BLAKE2b-256 |
0e1a98f26b31c79d4ed9bf544b37d6f19367c146ae628e6653b6beb17bf70232
|
File details
Details for the file basedpython-0.0.1a7-py3-none-win32.whl.
File metadata
- Download URL: basedpython-0.0.1a7-py3-none-win32.whl
- Upload date:
- Size: 24.4 MB
- Tags: Python 3, Windows x86
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d916b3a948c660a509df78bb979d19a2f0fcb5cd26b651b83eb9f6510e6b5bc0
|
|
| MD5 |
c9fd9108cb30fd4ec25bf4f80938c2da
|
|
| BLAKE2b-256 |
c564cf82f52d0c5bef06befec61c4b09ace53367ee8a37f6bcc4efc7f73a6d8e
|
File details
Details for the file basedpython-0.0.1a7-py3-none-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: basedpython-0.0.1a7-py3-none-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 26.9 MB
- Tags: Python 3, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54d89b2e46a8cb0757d208a7e25ba20030a90d55024deb70ae2f2f15e1f513ef
|
|
| MD5 |
2b886bcd739a9a5f1b99b25353d41115
|
|
| BLAKE2b-256 |
147bd4f60466176bacca5b0f98df5775954eb3735898aebabb7f5836a0e04535
|
File details
Details for the file basedpython-0.0.1a7-py3-none-musllinux_1_2_i686.whl.
File metadata
- Download URL: basedpython-0.0.1a7-py3-none-musllinux_1_2_i686.whl
- Upload date:
- Size: 26.7 MB
- Tags: Python 3, musllinux: musl 1.2+ i686
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ad14b3aae6fb39a77064ba6161219923d0e354363015d89414555888877c16e
|
|
| MD5 |
b8ee1eaef024966491a240b24ea88ae4
|
|
| BLAKE2b-256 |
31b0e029765308e74599ca06a5488bb62fa511d58edd25bc563ad35d9f0d88f6
|
File details
Details for the file basedpython-0.0.1a7-py3-none-musllinux_1_2_armv7l.whl.
File metadata
- Download URL: basedpython-0.0.1a7-py3-none-musllinux_1_2_armv7l.whl
- Upload date:
- Size: 24.4 MB
- Tags: Python 3, musllinux: musl 1.2+ ARMv7l
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba01e7e1b1e7ac8e8f5a46bbb611252b166d223210f0f1e1b388ef8dcd2934ee
|
|
| MD5 |
8187507f007f55746f3cd1af26790fd8
|
|
| BLAKE2b-256 |
0c5549ba9f13a5ff70d19b389892efd7f7dc3e47d744e2d9e45002a5a66bf216
|
File details
Details for the file basedpython-0.0.1a7-py3-none-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: basedpython-0.0.1a7-py3-none-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 25.1 MB
- Tags: Python 3, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dab7f83a46723d5115c3ea20a3cf4a2fa4aaaeeb9d7eeb4df02994e5610c255f
|
|
| MD5 |
21be27f7bbd3a5349553c0211ca414d9
|
|
| BLAKE2b-256 |
9c4e3db3b7d3cc2309f38da4478898eb214d4b9993a379eb31a1df9d6a835487
|
File details
Details for the file basedpython-0.0.1a7-py3-none-manylinux_2_31_riscv64.whl.
File metadata
- Download URL: basedpython-0.0.1a7-py3-none-manylinux_2_31_riscv64.whl
- Upload date:
- Size: 26.9 MB
- Tags: Python 3, manylinux: glibc 2.31+ riscv64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
813de4daf4074d9edfcce723d212647a8e738dd9a10ed3cf29ea9a0ed939579a
|
|
| MD5 |
b6b119b98ddb259a5b4ec22c49780b66
|
|
| BLAKE2b-256 |
49f93ce2f34f8d6dd6fff7714d3eba615a24238cee737510d53a7c11f48361aa
|
File details
Details for the file basedpython-0.0.1a7-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: basedpython-0.0.1a7-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 26.8 MB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad3307b53c18f4dfab2b3f73fee7a0940878eabc451a78de1be3d8245f7b0d0e
|
|
| MD5 |
778f4da1ccd2b88f4d28dfbe9e21749f
|
|
| BLAKE2b-256 |
f7e24cde7b6e35e6e4425830347469ccc48d22028d1b65ee1cd37baab43f1e0f
|
File details
Details for the file basedpython-0.0.1a7-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl.
File metadata
- Download URL: basedpython-0.0.1a7-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
- Upload date:
- Size: 26.0 MB
- Tags: Python 3, manylinux: glibc 2.17+ s390x
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f8b04132f36b6544b784e82400c324b4d212a88d4f0a8da3c4aee211675f259
|
|
| MD5 |
7f0e058535c9e9531ad336d894063612
|
|
| BLAKE2b-256 |
e82f5566906ff410d41c7be886030a700ef24e524c778fbef15008ba946560e3
|
File details
Details for the file basedpython-0.0.1a7-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.
File metadata
- Download URL: basedpython-0.0.1a7-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
- Upload date:
- Size: 29.2 MB
- Tags: Python 3, manylinux: glibc 2.17+ ppc64le
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc808f6f63ed4737c71d4e5b0b8a82948761b2438d0578762fe65423bd4f3c8c
|
|
| MD5 |
042be78ec1049d0d3fde51e6134d181f
|
|
| BLAKE2b-256 |
5efbb1dbc3cebd2a61467943f656caa144594861e1898edccecae22fddf04f27
|
File details
Details for the file basedpython-0.0.1a7-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: basedpython-0.0.1a7-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 28.6 MB
- Tags: Python 3, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
836c4a4c74fbc479edd1e24c9cbf72aad8eb5f4c6633b480c67ec93fec45961d
|
|
| MD5 |
bfe8f1b9c58b358ae5461927e93989b7
|
|
| BLAKE2b-256 |
4595fb09afde8b3e4a0ffcdb8ae58ca5488a9b51e6ee9f23b88926e31c250207
|
File details
Details for the file basedpython-0.0.1a7-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.
File metadata
- Download URL: basedpython-0.0.1a7-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
- Upload date:
- Size: 24.5 MB
- Tags: Python 3, manylinux: glibc 2.17+ ARMv7l
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be0c48bc7c9ce1346281870bd5ec8c137ed02386a7a3eb7fa531a0a774073025
|
|
| MD5 |
b48917c1b45962fd5d57cf4810d93832
|
|
| BLAKE2b-256 |
77910fea87356efe5bdeb06abd44b93ae1e330d5047bcd70ba7601b90cf2d363
|
File details
Details for the file basedpython-0.0.1a7-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: basedpython-0.0.1a7-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 25.3 MB
- Tags: Python 3, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf1d3320e18678ef0d90113f4c0aa5ff910fc553cb5c22b92721d635c097ba65
|
|
| MD5 |
1d7942307e7ce3b2f893e8c31bb49333
|
|
| BLAKE2b-256 |
fd4808ed0533d2ce633eb6ba147047b2fcda451e8b95ca3ab8e7a6531988f18a
|
File details
Details for the file basedpython-0.0.1a7-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: basedpython-0.0.1a7-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 24.4 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70a4dab9c7b8aca126c8148286b841b45323f5a1d316665a25d888d04dc01621
|
|
| MD5 |
7c707adb9de772b989c947cdf4f77894
|
|
| BLAKE2b-256 |
7ee00341034c80e7e2a3f0e9f60ea07fa8626ab20489ce15eb9cb5f90c05e2f3
|
File details
Details for the file basedpython-0.0.1a7-py3-none-macosx_10_12_x86_64.whl.
File metadata
- Download URL: basedpython-0.0.1a7-py3-none-macosx_10_12_x86_64.whl
- Upload date:
- Size: 25.1 MB
- Tags: Python 3, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f18dc91df12a4ff9115b66b4416487c8fec7d760884e37b295c2e38d12385922
|
|
| MD5 |
f1443096b93f7525980b46b699db65c2
|
|
| BLAKE2b-256 |
a263d5563035d819d2bbb462ec9a2b68bb887dd7523bd7b62a6a146c3f8a4ff9
|
File details
Details for the file basedpython-0.0.1a7-py3-none-linux_armv6l.whl.
File metadata
- Download URL: basedpython-0.0.1a7-py3-none-linux_armv6l.whl
- Upload date:
- Size: 24.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1bfa8324590ce768834c8317bf2dc32050e55fbce1c3eba672a833792f29ccc9
|
|
| MD5 |
876bf75b3ebd715e79632562a49d01cb
|
|
| BLAKE2b-256 |
33522d4d522b908ca567f580ec9a80189cda9604537f957e3e9432ebb3cd3e4d
|