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.0.tar.gz
(19.7 kB
view hashes)
Built Distributions
Close
Hashes for rython_calc-0.5.0-cp312-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61677fb17bca6ff58711dc016bc936b0dee3e4bbac24163694040d8e560b0179 |
|
MD5 | d7400df739c09b211f92c3f9834a0761 |
|
BLAKE2b-256 | eaf0eccec94525f93943e1612835c6aab1d40a933b2bf866854560d8fb941c79 |
Close
Hashes for rython_calc-0.5.0-cp312-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 500c2c9dc6c681140b85415b574ac2ede7aeea3801ed9b37859752e893763901 |
|
MD5 | 882a63ec3c0a11cdebc87c445bf5ed8e |
|
BLAKE2b-256 | 804a027c3f0ce1a750145e46a4c48ce17c7b4a9b63447077175f49af08e0b489 |
Close
Hashes for rython_calc-0.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c6b11fab981569aa787c0182006fe441dc4498da7ad148dbe186695820387e8 |
|
MD5 | a307357afdd5df041fec6dfa99ad3658 |
|
BLAKE2b-256 | 34c36808a3f6e6e05eaf0c80b4389ca96f34e95d03daec79e5cc1e3d57a57128 |
Close
Hashes for rython_calc-0.5.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc50df87c1e1e4fc6fd486e09a21a79a4bcc8b0a2c23ebc5e3054a75ce5b6b93 |
|
MD5 | a49d13973f92fff7c91b84d4d56f8759 |
|
BLAKE2b-256 | eb915ca7962070180e7c3759922bcb73ac206f4f278c2f84662b68c50a557a7e |
Close
Hashes for rython_calc-0.5.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a6aca8b15b4ba35487a8c95b71d16bee2fc9aa201355a1931764fdcbf9bbd49 |
|
MD5 | c6aa4f2a50a2f4f1cbe4abae58550123 |
|
BLAKE2b-256 | 6b8de74bc6058e512b54e54c146b19716a5d52145314f7928b99b037c1e9b6a5 |
Close
Hashes for rython_calc-0.5.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b32a8459984b737659644dd523b89a57b2de8eb18e7f6424390c8abc776295dc |
|
MD5 | 14ebf97a95c4bfc13f0f373627a508bd |
|
BLAKE2b-256 | 70ecac7244256e50965a38e4621c763142387505973e2ec6680d799ca3624fff |
Close
Hashes for rython_calc-0.5.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b34e617c8ed1e6e085dc4da3a1b38408a7d19ecf991468b8b22e90f43780888 |
|
MD5 | 30a2f671c6bfd99e33a6e49f6c2f9365 |
|
BLAKE2b-256 | afaf9dd5fe695a0df021f2022a23228b56b9c59cb22adacc6dd13ad2db80233a |
Close
Hashes for rython_calc-0.5.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb08847c62839ca874ec010e1ce578ffae836c83a3b32bb98aa5a0b863af1c06 |
|
MD5 | 1c53d186211248c4074275191480c9dc |
|
BLAKE2b-256 | f342744d39e5542321d436055e66b8b63401469b93c63ca509a9b65feed2708e |
Close
Hashes for rython_calc-0.5.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15f8095d12f9fd0d929c4fe6b3446d86e9abedc8cc7aee5924ea026316d249e4 |
|
MD5 | c75ccabd27bf4399c951991551af2285 |
|
BLAKE2b-256 | fcb16842b974fafbe8aa037174a2eb508ab3aa18b650f5e3c46400d39a86573d |
Close
Hashes for rython_calc-0.5.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7c9230e73a24000816e5b361d50d30003a0b91a103fce41930432600840af20 |
|
MD5 | 3fd69c61ea2448c83c87c15f564c7538 |
|
BLAKE2b-256 | eea6a394bb0f1f8616a437a9a14281fcc3b8917cb7827995bfa14bb9799ea1c5 |