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.4.tar.gz
(11.5 kB
view hashes)
Built Distributions
Close
Hashes for rython_calc-0.4.4-cp312-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32f2344ba699547e07c4c4d0c7d355ef09ca0f44d453d9dd198afc4152b4c4bd |
|
MD5 | 659376175decc63603d323f61b985c4c |
|
BLAKE2b-256 | 98b3724956ab444ccb88337c3de0f2090ca8c96cdf5fd5b5c23c9ce971b7ed23 |
Close
Hashes for rython_calc-0.4.4-cp312-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7972661f8a866546d24c4826b5f2f1f4a1c7b0f7575ade976701d027bc82b0b |
|
MD5 | 21b4af48ce0d50e6f1b6e326d2ad42b6 |
|
BLAKE2b-256 | 1fa2fa1eca19b92997438685ee8c76fe28666ed9447f489f8457b9fbac870f07 |
Close
Hashes for rython_calc-0.4.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e766a3bf0a11d637ef3b8cbeb712787a94cedc631ffbaf2be53f3d764259d2ae |
|
MD5 | 7cfcd3322109cf9257a9320f13d9e389 |
|
BLAKE2b-256 | 965f67306b51607faa9d43cc7194d23d0a4aa65b4c45c11f52a87dde9f17713d |
Close
Hashes for rython_calc-0.4.4-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f104fd32ef9f32d3822c1c1c9a01ac22f83a3b6470f465e4f882c3c167572e24 |
|
MD5 | 82f65aeb8cae2c748992100c381b5830 |
|
BLAKE2b-256 | 714ee2692cf602afbcbdae0ef5b4564e7327fd0212b0be4263ffdafc4e11122c |
Close
Hashes for rython_calc-0.4.4-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35157ab78348fc9ac15a6498558b1ea6e8cab408051d2ed9ff9ca25b67dfb910 |
|
MD5 | c60268ce4d2c04dde2f1e72995a2aa90 |
|
BLAKE2b-256 | a55ee5bb70caa39a2bcf4850b9eac1c8e823d4cab5ac01f6a4bf68a9b74ec20e |
Close
Hashes for rython_calc-0.4.4-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d404df6a23a83b379150397a6cb494168033344d6ac2ca4219694b64544a40c6 |
|
MD5 | 90d1deb33a60cbd351f7a787664a4f2e |
|
BLAKE2b-256 | 55a52ad67d6cdf147f1ffcd50e1f9db8827f69445aa59d378f0e91a955f8ae26 |
Close
Hashes for rython_calc-0.4.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea08f9fcfac1f89a1995226ad1119b59eac3518c8f704f995beb28a6869db8b5 |
|
MD5 | be54854f043961fbb70848980782e729 |
|
BLAKE2b-256 | 7fa80341539690068a5a8958db2193a676f0c7e14df82dd2e036c316f50e3f89 |
Close
Hashes for rython_calc-0.4.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35709c1ad98fd4d63262638e403f897da093d8c1c6239659a5969018c6ebf09f |
|
MD5 | d845dee76d73740fb7984f907fb7788a |
|
BLAKE2b-256 | b9fe42dbca46b98ccb8d55ebe541ec2eafb6e776165376a1ac79dded3cbe1451 |
Close
Hashes for rython_calc-0.4.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f286924797f6d61e10b7313fb1289533bb032c607959f77df340c76465a3bba |
|
MD5 | f2c832ed51bf825c66f52d67841ece27 |
|
BLAKE2b-256 | 971a3d50a77cafef5fe6f1ab930b1fe0e118998898ced7f4a30c6269ad5765a1 |
Close
Hashes for rython_calc-0.4.4-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86bf95d3aa09783cb89f97feeb25b17f4d7669b88c1cb7fc274531117780ed31 |
|
MD5 | 53d41f50284d7e99b57f6a41da4a0660 |
|
BLAKE2b-256 | 6c9ebb52e908bee92166626a39afd17e59306b3656af70f89ba5c549eb9d7549 |