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.9.tar.gz
(19.5 kB
view hashes)
Built Distributions
Close
Hashes for rython_calc-0.4.9-cp312-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd685d9f8ae331e875d1e7c41388cee3959160a65ea70f4b0ccceb0a824f835c |
|
MD5 | f014d7eea81a5cc74668633ee33aecdf |
|
BLAKE2b-256 | 0ecc9388ef6eabfeeffafb61b5a629fbaade72e2777afdc8b731e42647b3eb1f |
Close
Hashes for rython_calc-0.4.9-cp312-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b465801eda6221968aa33c3fe1c2bf615d47f1a5406a62e106d8888348486e3 |
|
MD5 | 9bc49acf13925299fd2a548b013cf919 |
|
BLAKE2b-256 | 5a0b6e0c11b9ca957afa7648b4be2bfe6afd8e06333404e1c67ca0242a07a7fd |
Close
Hashes for rython_calc-0.4.9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45b02114d840cf7a8c670f163a8289b99e381f0deb40722dd9346f6f0409e4a2 |
|
MD5 | 6ecaad33fa923ed6dd05efc243c5a431 |
|
BLAKE2b-256 | 5bcba678aac46c6876728536a34aac2329d3b947ae411e48fbecfa458ceff560 |
Close
Hashes for rython_calc-0.4.9-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e40979946e380fedbbc813cc7fc4e73a0603eb9fb7c1b6a1d7dc5cce6274b87c |
|
MD5 | 36d19700cf952be241f7d54b49878760 |
|
BLAKE2b-256 | 114b777f3c853870247f0b7bc05b3b005cc0e5cc7e4678d286bac42b2cf18196 |
Close
Hashes for rython_calc-0.4.9-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f035c8c922b3a0687275fa821d5181fb3715efc7beafe8c067d5d0930c9b506 |
|
MD5 | cb75fd8e0f31df8a8f1b12e93859157e |
|
BLAKE2b-256 | 6fa9b7c45482f0e146fa0c938796931755a7bde80599d12f43ff5ed6e5001076 |
Close
Hashes for rython_calc-0.4.9-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b8ee3d6b17e5782f52bc18690920eddc802f408a27015e92506176dd1b94dc8 |
|
MD5 | ce054cc665178c38dc65f3a6e007d784 |
|
BLAKE2b-256 | c0d80c78267d4b35fee7379f54d7d57a0e2a5b37a3ef49f70480a1c44a483c6b |
Close
Hashes for rython_calc-0.4.9-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf82babc5b5424ea0f4330879d124e79f22d96cf68e19a9f4578a3370057ff35 |
|
MD5 | 1be0563c80edac0a52c55d4326bc0cb7 |
|
BLAKE2b-256 | f0954ca52d203264bb959d203bc35de1fbec177f9664ccd5e1126c608b709462 |
Close
Hashes for rython_calc-0.4.9-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be86c91bf0c46695a9d623d136c01b9c4167d1b471edcdebf1e667e5c3b0ef7d |
|
MD5 | cbd738965415290d68348b1ca29e07af |
|
BLAKE2b-256 | de812b302e172e496f5495df816c8860ab183230fabc10adeab0d685f4c36613 |
Close
Hashes for rython_calc-0.4.9-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33ece3375b85c8bb35e28316e97dd48f024b54e3fa4da90d00e49b5e5e091523 |
|
MD5 | fbaf486fd04618b0db8033b5c97f926a |
|
BLAKE2b-256 | e1172d82f667b1083fc4e5321921259cd04d9106bb49eb6ac4ade59c0b82ae46 |
Close
Hashes for rython_calc-0.4.9-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5ec2c165460345e57d6e8831f7815d1b8a2302a59ebe0d29a658e703d3c26ed |
|
MD5 | acc1456e40ae4ab5e4b5c1aaebfe46cd |
|
BLAKE2b-256 | 39b5e770fbcf03910e43e723256d6e2b631a992ebaf45008119ae4ac40239db8 |