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.5.1.tar.gz
(19.8 kB
view hashes)
Built Distributions
Close
Hashes for rython_calc-0.5.1-cp312-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb5f6591eeaa64664429b8e503348fda734ff42c3560b9f625b1e88feedc294a |
|
MD5 | 3925569ee812a22fcb2354f4c5312f9a |
|
BLAKE2b-256 | 287f103991993594c92a440dd1bdb3578dec514a65438c6411be3f5c898c4fcf |
Close
Hashes for rython_calc-0.5.1-cp312-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1742d0c9865a64c84f107dd5394c28f3eb1709c5988320bc57a6dd3a2ddeb7f |
|
MD5 | 14282a600b529860bf5582fe854eafc8 |
|
BLAKE2b-256 | ab840af83d8c0b59874bf01bf30d0fe1656b1ef6a7949979d19ec10966f6327f |
Close
Hashes for rython_calc-0.5.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5713955a2854ba1c9ab5e257b19f04b80d9192153ff09fb34f5d7729b220c2f |
|
MD5 | f8ab539944f2d4ded01336b2b0c7143d |
|
BLAKE2b-256 | 637290c7aaab082f1bc9d57defb8ae20894e7ec8573411f5764a7a7149304fef |
Close
Hashes for rython_calc-0.5.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ecd1ded2a2ededa3cff9bd8ae30bf092381e46a8a0c19096e11c420b1b647089 |
|
MD5 | ca4dbb22f0639c56252f725245a04844 |
|
BLAKE2b-256 | 26765677fd55c73003cfc55d9e26ec0beeeed4c9e284044bea984c89ea9bd490 |
Close
Hashes for rython_calc-0.5.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d5ad46dd681107e8c0257c92cc10a3784ef9fee961a2a192fe8dba844e1b1c1 |
|
MD5 | 75dcbb3ebab915537d6e98e92ccb8fd6 |
|
BLAKE2b-256 | 4dc83a2fb058228c3c41f7b0585726277c104a79ca4e56cfff8b8173f7c58c5e |
Close
Hashes for rython_calc-0.5.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d6bfa65c93be2b9c099fcc6a555c8e407d74be4db15dfd2e43f8582469eeb1d |
|
MD5 | faea49d40dd4f16bb4caec85bea79b19 |
|
BLAKE2b-256 | cd2ef7837fe7a7f0da53218a2ac367f3be1c7e608c9e1836f0b956bfc00c8417 |
Close
Hashes for rython_calc-0.5.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9776e7d98249b0d8291f379d585ec434fcbcbb388efb8016032716f278626489 |
|
MD5 | 3868c0b1c0d1167688a322651f8726ab |
|
BLAKE2b-256 | 07b0b3ae8c4ec808f94b27faffffef5f67a6823cdaa3e4e118f77d3c3c2772cf |
Close
Hashes for rython_calc-0.5.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c88ba95af32f1c336ee2b4170c35fdcefbb830407f1f656faf2823001fbca8d |
|
MD5 | 0f5b250e06c75ceca8556f9195838f7f |
|
BLAKE2b-256 | 84ec684469b8863fa320cb081451f308b39c82a41b4a88f82738c444a9a5f577 |
Close
Hashes for rython_calc-0.5.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c725fb4021f9240157a4a5edbf8f2579a3d064dade07155037f96dbd5d32873 |
|
MD5 | b26e8e26d1f60f9bb42ed6731ac37add |
|
BLAKE2b-256 | bcd8ee40413efb6d0dba78de8ea6ad1f3741227bdadabf0160e4bde18aac3340 |
Close
Hashes for rython_calc-0.5.1-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7858098459fa9dda0eb4995434c67765b5bbf69f7605940ce75105b0d3901c6f |
|
MD5 | f86a2a363a57563260b2d45b1f360841 |
|
BLAKE2b-256 | b779fb2480604cf305b4a5f20a2ae9533cce24d77bad46a95d5ecd019fa0e692 |