Small project developed by me to learn PyO3 library.
Project description
Rython
Use text_signature to create python type
/// Formats the sum of two numbers as string.
#[pyfunction(text_signature = "(a: int, b: int) -> str")]
fn sum_as_string(a: usize, b: usize) -> PyResult<String> {
Ok((a + b).to_string())
}
Add .pyi file using mypy
Keep in mind that is only works for #[pyfunction]
. Macros like #[pyclass]
and #[pymethods]
are still unsupported.
For autocompletion .pyi in bash type:
stubgen -p rython.calc -o python
It will produce calc.pyi with:
def sum_as_string(a: int, b: int) -> str: ...
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rython_calc-0.4.12.tar.gz
(19.1 kB
view hashes)
Built Distributions
Close
Hashes for rython_calc-0.4.12-cp312-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 574d266131d06492a6ae4545830193ff048d736aec06334d0751c0a7b6e956fe |
|
MD5 | c0e7fd1538c7ffe1692e3381c7a0f376 |
|
BLAKE2b-256 | 0f9a3a7814d6be8b3681271db2b9ba44a6c68ca4167a7830a08c1ac4a5cf4564 |
Close
Hashes for rython_calc-0.4.12-cp312-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1756a8a069725e0c59200886c3d81e22f728233b5e7311b6d17d6c621bdc2eb6 |
|
MD5 | 994e1a677da08263e0cad152d9d689eb |
|
BLAKE2b-256 | 27ebbfdf504779b3a04c4300b0117a005b1eec86832f74332bbc93d7de164a91 |
Close
Hashes for rython_calc-0.4.12-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f98908e550fe5a59cc47ebefb2529afa721431fcd7caaeed7c0b3bb0af68d90a |
|
MD5 | 272abe6e7a0f9cf0925f57332db79c20 |
|
BLAKE2b-256 | 8ebc6af99d57ba92f7dac10ddc64ed98574983e138f7671edc69d426afc7b330 |
Close
Hashes for rython_calc-0.4.12-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 079b027d998b8ee3f84d0eb9c5422b97e3fb9348b6ec34ab644f89dd78d4e266 |
|
MD5 | cb1c78c5bbf282c700623191f9bcd55c |
|
BLAKE2b-256 | b3c7b031f80c3573e6707baad876dfe75490c356250bbf20d76c1f8a2bcf7119 |
Close
Hashes for rython_calc-0.4.12-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26fc508c195f1e1289bdae3ca0a1108597822f038a00522d6b1c6b5bce55e31f |
|
MD5 | dddf76ac0367b698219d2d811336d5c7 |
|
BLAKE2b-256 | f7cc69a82d885edb89426c945b5950c4e6f9682a71638c6b901fbc20985fc482 |
Close
Hashes for rython_calc-0.4.12-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2404023b00fdd93ea5b08f35d09420d8bdf6bfba3a851d1ff975d7b064758bf |
|
MD5 | 530e99a6658f5ef198e49230a540f553 |
|
BLAKE2b-256 | 5d74e573710d61e187b1afff1a21ae3f11d33029b871910f1c649b968d798695 |
Close
Hashes for rython_calc-0.4.12-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6d455ef625267f9347f1e858fa9596680deb308e17a62e1132d4e60bd14a816 |
|
MD5 | 8781da742a43762ac2f14606e46ed8a1 |
|
BLAKE2b-256 | b31b76de7df71a5f6ea0ede61b19f432528451acf46db9009474da3e4a053b2f |
Close
Hashes for rython_calc-0.4.12-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc4c310d4aec0e13daea192a334eaa720196f3e502b426811ab24fda02a82756 |
|
MD5 | c0500733acd5c3496130eab22a096361 |
|
BLAKE2b-256 | 415b369af81fe4eb5126c23172fa1220f3317989695a14bd6b083107ac6be2c7 |
Close
Hashes for rython_calc-0.4.12-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4b73e8f5c47c159f3e54e1f99e586273feba84335d58849bbd8b7f18e6cc12e |
|
MD5 | cd98155736390132260ce936e35ad7ae |
|
BLAKE2b-256 | 23b14a0be9038d7774173b82439ee3e68437552bf83f5ffeac9fcd7c0682bd78 |
Close
Hashes for rython_calc-0.4.12-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d05b190bcaabc5fa3ca1ba44a4235d699cb61812b663a199a1d28ae0d26083a |
|
MD5 | 61a16e33c1e8be52cfd61cc97e590b2b |
|
BLAKE2b-256 | f16362a0f98746585394690c40eab8289e870a873fe5123d75a4ae22b9f76872 |