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.11.tar.gz
(19.5 kB
view hashes)
Built Distributions
Close
Hashes for rython_calc-0.4.11-cp312-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42e3a6e52b576f39acdc0b7b3b21535d82c218131bbe00fbe95422ace5f1971d |
|
MD5 | 0e35fa21eaa3f53641a6faf254d7c692 |
|
BLAKE2b-256 | 0be8f74d85bb9ee226e4c5a916e1d075bde2608b965b139ed235dc916d87b00a |
Close
Hashes for rython_calc-0.4.11-cp312-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 524806719d2965cef4d6e99655b9b8ebaadcc971f0805ea581cd85db962e8c48 |
|
MD5 | ec698bb85fb51f45074bde7fec533942 |
|
BLAKE2b-256 | 8577f37675a3006a0ccc4bcae5d85a7cad88e7d16ed389422b6b7b2be9c9d0d4 |
Close
Hashes for rython_calc-0.4.11-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1abc27fbab0fc9ddc9a217ddd7e989020ec29df9e53e83efd0ff17a860123ac0 |
|
MD5 | 0c76327d794c37d9c7880eb341e8fbb1 |
|
BLAKE2b-256 | 811a4c469d0af23c43cd9538cbcc53b83c68b524a35cf592455818c55601a4e9 |
Close
Hashes for rython_calc-0.4.11-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 048c0d865b66729c69d82bad962bf15f03449f3526aba87bd1a682c2aa3aa25c |
|
MD5 | 813010c96215b9d14c2ae53118f9f251 |
|
BLAKE2b-256 | d453f765d806b8692483051108c9c92826ceb4698c2e43ddf5717eb53e13bca7 |
Close
Hashes for rython_calc-0.4.11-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d141168537b280e723b3f97023ef950e525df1bac6c52a0a6eff25ac50bf56d4 |
|
MD5 | 776ca4454292cc63f2b828225424e852 |
|
BLAKE2b-256 | 6c18814a07df2f7b96ef9eed26eeaa6cae5aac2a176de5863bb99d603532d300 |
Close
Hashes for rython_calc-0.4.11-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57349a279dcb6d712d950d16fd007aa50ca1d49575767aedf07cbf055ea7fe2e |
|
MD5 | 841777541ee0da676304b43cc901e2d8 |
|
BLAKE2b-256 | 6b743b597200f2e564dff65c6170bc61fe1f35e08ef223af909ca540d7d1f77e |
Close
Hashes for rython_calc-0.4.11-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c6e6444bf231aa7e369386f1653e6907fab874b82c13a72f25359c3455644b4 |
|
MD5 | 3ef67a57f85428d1bbf529827522bf52 |
|
BLAKE2b-256 | 08d150e85eff142485a83f780d24197425dda1a6b9aaa2b2d9a2b74ac5b61cfe |
Close
Hashes for rython_calc-0.4.11-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03ea1b77091bd24a94e030162181ba1b7f310656f5f5ea99c90f373a911170c1 |
|
MD5 | 7a5c6bc42a4d8a69c8f19fc578dc59e5 |
|
BLAKE2b-256 | 73b8680c91b869727917b26952bed1788d214aa6d2f81199ba4dd9d28f44a79d |
Close
Hashes for rython_calc-0.4.11-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ae83cebc4261ec5ba9623caccabec7aed1fd64aa7eeca19fb4a65b4c15bb22a |
|
MD5 | a160c030605cad5d9d01c33c7aa3269a |
|
BLAKE2b-256 | 18f2a6649e0e41f50abc8bda27c9c06ccdcf126687a3ec860edf7f18f5d5ee15 |
Close
Hashes for rython_calc-0.4.11-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af70dbcb276988d55ccf1924e64ae0f42dbd783cd80d413f823e923b76752d56 |
|
MD5 | 7320d9bae313090b93ecc9adb711d78e |
|
BLAKE2b-256 | 8af2d13adc0be1060e78289185fdd3cb51ecae995206681068202e3b93536b09 |