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
- a python type checker with framework support — pydantic, sqlalchemy, pytest and django are modelled directly, so the magic they do at runtime checks like ordinary code
- basedpython, a python-like language that builds into python wheels
- compiles into high performance python extension modules
- a language server, formatter and linter —
by serverdrives the editor, andbuffis the basedpython build of ruff
enum class Shape:
case Circle(radius: int)
case Rect(width: int, height: int)
def area(self) -> int:
return match self:
case Shape.Circle(r):
3 * r * r
case Shape.Rect(w, h):
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
echo 'print("hello")' > main.by
by run main
documentation
kotlinisland.github.io/basedpython
acknowledgements
basedpython is built on top of astral-sh/ruff. 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.1a9.tar.gz.
File metadata
- Download URL: basedpython-0.0.1a9.tar.gz
- Upload date:
- Size: 10.7 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 |
e28b6df8f02e3e65129ea34d8ccd1c4289d647ae083aa9ea5e184ec603db63ce
|
|
| MD5 |
5206636428e63e7a080986896dc6f053
|
|
| BLAKE2b-256 |
c71f362dca2c40c673db41d31f6adf1f7597043bc50be620eab2b90b385ac464
|
File details
Details for the file basedpython-0.0.1a9-py3-none-win_arm64.whl.
File metadata
- Download URL: basedpython-0.0.1a9-py3-none-win_arm64.whl
- Upload date:
- Size: 27.2 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 |
e473106d7029feb7805505443bc6dbaeb9cdeae452851404f3fcfcbd93b3b6f5
|
|
| MD5 |
6a0dbe3be21bdf54f57cfb82a18b7adf
|
|
| BLAKE2b-256 |
3e04df578867337a8762631258e1be9c62ebd5eb1303255af20dc8aaed68ec70
|
File details
Details for the file basedpython-0.0.1a9-py3-none-win_amd64.whl.
File metadata
- Download URL: basedpython-0.0.1a9-py3-none-win_amd64.whl
- Upload date:
- Size: 28.8 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 |
942b5e5f3af84b716db51237d7a45a05b9b32d97a2baad21d294b4168d79b77f
|
|
| MD5 |
91edeb31505354480c8e7d3774902d2b
|
|
| BLAKE2b-256 |
30571bc64f4fff0893d8c012964478b948f82de624e1dff179b234f8b01cf0c5
|
File details
Details for the file basedpython-0.0.1a9-py3-none-win32.whl.
File metadata
- Download URL: basedpython-0.0.1a9-py3-none-win32.whl
- Upload date:
- Size: 26.1 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 |
eb7b59527717d2959269950bfc1169fb1df3b86cec472d886bb8888fa80365d8
|
|
| MD5 |
4359178aa87a26a386145549e9c76427
|
|
| BLAKE2b-256 |
04cf97c45d1a48465b2b2dab606dac94ba21ff0428d95433ada0cfdcef11a286
|
File details
Details for the file basedpython-0.0.1a9-py3-none-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: basedpython-0.0.1a9-py3-none-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 28.7 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 |
f68f60a99db04527c95aab83737999f94d210dab597a87f8de0f6383e8b60d0b
|
|
| MD5 |
f3c19b75707133a9e0088613299a61e7
|
|
| BLAKE2b-256 |
d4161b7023872c2f26d984a8dee8a527202bd26260fa44db3e9037419112569d
|
File details
Details for the file basedpython-0.0.1a9-py3-none-musllinux_1_2_i686.whl.
File metadata
- Download URL: basedpython-0.0.1a9-py3-none-musllinux_1_2_i686.whl
- Upload date:
- Size: 28.8 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 |
f4e51d5d68946e50538492e664ed2a62117e75597d4b14284ad06e1d6c6f85f9
|
|
| MD5 |
66df726b0a59533b8f5346f35c2e814a
|
|
| BLAKE2b-256 |
327a0579df03a8bdb68accb6962c9e3a410d989d84059cc69d501b8de0488141
|
File details
Details for the file basedpython-0.0.1a9-py3-none-musllinux_1_2_armv7l.whl.
File metadata
- Download URL: basedpython-0.0.1a9-py3-none-musllinux_1_2_armv7l.whl
- Upload date:
- Size: 26.1 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 |
370cad3f13e7a390b4388c0985a733be4d1a32c39439882cd374407a89d2e861
|
|
| MD5 |
4c6bdccafc142ac5a1480627ef1c6dcf
|
|
| BLAKE2b-256 |
7d0338df09d6b05f77a5d8c712b9fdfa700d4493e8af3b1f6015bfaf1169971c
|
File details
Details for the file basedpython-0.0.1a9-py3-none-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: basedpython-0.0.1a9-py3-none-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 26.8 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 |
ce96f8faae0becb288cd6c096cc998b50259cd19e3086ff35da3ac280adcda31
|
|
| MD5 |
5753b7339146df7159fdd40a0cc8260e
|
|
| BLAKE2b-256 |
dc383e97bef3dd8f25f99aaf084f9484abc068aef8e7ff421a7e294fb203f0e2
|
File details
Details for the file basedpython-0.0.1a9-py3-none-manylinux_2_31_riscv64.whl.
File metadata
- Download URL: basedpython-0.0.1a9-py3-none-manylinux_2_31_riscv64.whl
- Upload date:
- Size: 28.6 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 |
8f5dcc696da29c11c2905ed35d22a28327ed049e02072e6e5f687c5e7805522f
|
|
| MD5 |
deeec3a9ff58bdc6d099222ede7afce8
|
|
| BLAKE2b-256 |
0c4844ae957a80549f17f07e37fb991855118bb97621f53e5c8e98194190b476
|
File details
Details for the file basedpython-0.0.1a9-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: basedpython-0.0.1a9-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 28.4 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 |
d27d7ec6d7f3a881f001c15a4e36bfea8d79d8b159955507c79503d2ec602587
|
|
| MD5 |
3d27d56eeaf01e2d7e8d59eb88ea1574
|
|
| BLAKE2b-256 |
89366ad74eda6b2f32b11a01a72756d1edfcc45eda6fff3b36c7f246036ca607
|
File details
Details for the file basedpython-0.0.1a9-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl.
File metadata
- Download URL: basedpython-0.0.1a9-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
- Upload date:
- Size: 27.9 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 |
ac5936845ec8fce250b45508131439df8dc4d07df4510edc34fb85b70afc0df2
|
|
| MD5 |
75ff7f514549749b724a2f7ade831023
|
|
| BLAKE2b-256 |
cb1cd0996319709b9e0913020d1704b2d6dc71c2f92447662985ca93692292a7
|
File details
Details for the file basedpython-0.0.1a9-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.
File metadata
- Download URL: basedpython-0.0.1a9-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
- Upload date:
- Size: 31.1 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 |
02d1dafa88c6d0e3f2dfca49982b46279c9fade928d5bccffddccb0467c642c6
|
|
| MD5 |
5f191d2f6018cf0467d1d8ee98edb9ab
|
|
| BLAKE2b-256 |
20507126e9d4c0d5f5a01a61042f265005c1dde40d4573ce10bd5f4ca2f31208
|
File details
Details for the file basedpython-0.0.1a9-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: basedpython-0.0.1a9-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 30.9 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 |
c4b3a2cf4a0bbe2bfcb596fa5eb87c48c0f671449daf4b52d47efe93c496d32f
|
|
| MD5 |
6df5ec78714bbdbeef4465b6831d0f9d
|
|
| BLAKE2b-256 |
a19f631c65ae90c9347308f32a32ea46a8572f8dfdb7e50b2bf9452f46fac9c0
|
File details
Details for the file basedpython-0.0.1a9-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.
File metadata
- Download URL: basedpython-0.0.1a9-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
- Upload date:
- Size: 26.2 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 |
de6d437cbce70c5ebad94ccd70bb4d73fd10fdb1e49a3bad057761eae06a8ef0
|
|
| MD5 |
a703b8699d2cc95df63655fb74840683
|
|
| BLAKE2b-256 |
00165f6961d27bcff9263f0b4187a7e9fce58cb3faecfb5bcb61067a432d5dff
|
File details
Details for the file basedpython-0.0.1a9-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: basedpython-0.0.1a9-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 27.0 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 |
40021e50b1e34e95f32a310a0ce005b4c29fcd82f9dcce844516baea6d6b0068
|
|
| MD5 |
8f491557ee190151472e3ad51bf887b0
|
|
| BLAKE2b-256 |
28a1986f91adf0934592f5366a8bedaa31659b8e4276e75e5a1655903a295044
|
File details
Details for the file basedpython-0.0.1a9-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: basedpython-0.0.1a9-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 26.1 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 |
87e58740b55a881c33d11c78b2d737a36adba9004a6f13cc52a23e13c2dd8a09
|
|
| MD5 |
3e5d535dbacadea5078304b00011ef76
|
|
| BLAKE2b-256 |
70adca6541e8fd1c8514621fb8490505743ede8ce72be1951979b681381ecfd6
|
File details
Details for the file basedpython-0.0.1a9-py3-none-macosx_10_12_x86_64.whl.
File metadata
- Download URL: basedpython-0.0.1a9-py3-none-macosx_10_12_x86_64.whl
- Upload date:
- Size: 26.8 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 |
1cb9a69e8665c4026d2e5a0c13e39a14657704229bc709af1ce1dda11f34e780
|
|
| MD5 |
ba8b9eaf0b7100f2839092e871589b3f
|
|
| BLAKE2b-256 |
d4037d9059ad50bbdc8a2a8f153144b55ca535439cf3c90b69946e3336052ecf
|
File details
Details for the file basedpython-0.0.1a9-py3-none-linux_armv6l.whl.
File metadata
- Download URL: basedpython-0.0.1a9-py3-none-linux_armv6l.whl
- Upload date:
- Size: 26.5 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 |
9e9a380c69b3224a5ab35cdb9c4fe321dd2ebaf38681a0cb6e799eb6e412d662
|
|
| MD5 |
d47c41d1d4fc5b73d93c17c14a430255
|
|
| BLAKE2b-256 |
dc56a74a4e75cb41cbe5c237b8ff5eb7cbdcf8b14e46463160e53435ff18ec48
|