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.13.tar.gz
(18.2 kB
view hashes)
Built Distributions
Close
Hashes for rython_calc-0.4.13-cp312-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2198e4f626d048769d82950d7a629ab3369a3d6a645335f240a8f4f8373938d |
|
MD5 | 89d370fb552a4635b0b53af6f91ea0c9 |
|
BLAKE2b-256 | a9894bcee33cd7aea6c5887f966d3e00b3b00c07e0681edf7a8b3ea1cbb3ff51 |
Close
Hashes for rython_calc-0.4.13-cp312-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8848dcab71421a698e4fb6da55501d8fe06e8a88c399629be8cfb0d6ee17f7cc |
|
MD5 | 8b29d8a2d053080c4afa3b7b1b322499 |
|
BLAKE2b-256 | 71983468814841c89f96342f42988959829255cfd4f6d9108f79c07c80c9305e |
Close
Hashes for rython_calc-0.4.13-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bb1878148efbf6b1378b60c86e435290fa90434b573eb34043cc51d718951f1 |
|
MD5 | 3feabd2db5e23b2fb3968c30cf9de1e6 |
|
BLAKE2b-256 | 25e3c1d6bc3d6399cc12c83e98d57bb70bb27f18e610407e5b45bd779689e815 |
Close
Hashes for rython_calc-0.4.13-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c222a13bd1c929b9600648ca7a9b370949f0bfd9c2732cfad715653c2ecc598 |
|
MD5 | b9ba7b516c5790873cb26ec70abec9b9 |
|
BLAKE2b-256 | bdb1e67adffc071714a20e9f0214a64d8c3329d25b169a9b3bbb655133b30594 |
Close
Hashes for rython_calc-0.4.13-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b65e61ea3c1e350c2662d45f5874cb10f6777e4658d10bbfc7131b95039f396 |
|
MD5 | c68112acfa83ee9f2169ba193a03e6a9 |
|
BLAKE2b-256 | 049a103724c8b121596321bc53dd80f998839941644a4a6477a4560a842a1d60 |
Close
Hashes for rython_calc-0.4.13-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75536ba5d42a1b68461dd13af4a0c84cd06c1b3161244324621304f890c6211b |
|
MD5 | 3b07dfaddca9f603bb22630bf4149308 |
|
BLAKE2b-256 | fd41b48d16c37b99fa2906339953c3c45d3eb4e5433646434b6970e8fc11e744 |
Close
Hashes for rython_calc-0.4.13-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5de3bf6248a00e69950d0b7d19994de8faa9dd43dbe6c72db9194d6ebd3a23a5 |
|
MD5 | b2f6f70616fd8f1b8844649f841780f3 |
|
BLAKE2b-256 | c381aeb1ca1e3afd594a0fd347734e0e06ed77ab2d7bc1c4dd8be85584a0e1e8 |
Close
Hashes for rython_calc-0.4.13-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60190e4b7ba7a7dab9bdf5db5e2d7cbb5526bafd6e4c3ea469da4ef2ba5ab276 |
|
MD5 | c22a13169b10aafe7d87e9d3fd0bdef9 |
|
BLAKE2b-256 | 57163a07846b6ebf3b8e7ae701d207c3aaaf2c65dcf1304aec4fd78ded6cb8bf |
Close
Hashes for rython_calc-0.4.13-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f19f1fa3b56d1341d33eba37100c5cc36276c3c462a37fa3eaf38fe320d43ff |
|
MD5 | c1eb56c5c5f9fe24f9d817b92dada998 |
|
BLAKE2b-256 | 7223cf6b79560aecdb0165bffc32240c29a16c4864cf4716c26aafaa24be619d |
Close
Hashes for rython_calc-0.4.13-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58fc62527792135396e7eb6107dcfa24a625701bd8913445b4b7f6cc36fc0cc8 |
|
MD5 | 0f7763cf019d982e7f307a32fbfe0d5f |
|
BLAKE2b-256 | f3198d237de1eb2381d7b4b332cd79ff815d55df0fd9430ee6d7fef02971e383 |