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.8.tar.gz
(19.5 kB
view hashes)
Built Distributions
Close
Hashes for rython_calc-0.4.8-cp312-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 038137c0d792a6c97070ed487303e289756ad474cc580a8923bce5a2fafaff49 |
|
MD5 | 9752f8b50529d2c8c4b551acce697c1f |
|
BLAKE2b-256 | fc587249cf7b207b3e9f1a69af9cfc0f96703bb9a1edb7aad245df8d6e772a36 |
Close
Hashes for rython_calc-0.4.8-cp312-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67f2d2a4bb4d13a2188c0c9d86c10133170fd665464323699c0ac610d6159779 |
|
MD5 | 1c66bc310e930f35017876c49e5c75f9 |
|
BLAKE2b-256 | ff1e99c3cb6c84c0505f37e9aa39c6520b4eb31859c73be82da5f798cb62a7f4 |
Close
Hashes for rython_calc-0.4.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f41f45f58ce248641cb06e33b1fe7d814a0840e4dd4fc6889130740a17aaef7f |
|
MD5 | 33d8449f382a4e3d905015233685e751 |
|
BLAKE2b-256 | c79826ee2dd1cc3ba095453fd537a2d8b31c8436a5e1bef422bf383fd18a0046 |
Close
Hashes for rython_calc-0.4.8-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e72889ef9256af108827b7471d568a17fc4c91d100236ce9e96626ca2bd1eca5 |
|
MD5 | a89e3ac093121fdb0f6e947ce197aeb6 |
|
BLAKE2b-256 | dba7f8b206badb074fcbbf29e88647033b2b2477e6da3e190652a5d6210c350f |
Close
Hashes for rython_calc-0.4.8-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50f5e6ae46f23f679b1dea50f553fb0f3cd375c932d4a2434a579edd02f52f4a |
|
MD5 | 5b27847cae1a9b96c41058ef2378a2bb |
|
BLAKE2b-256 | 5d6d59dad1f10af51477da959ba1805d3d72e3934e51d4b666e238bc0b45490d |
Close
Hashes for rython_calc-0.4.8-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed3636e29a63a0a4388131432fab1d31c91833df3c8014cd8c31777f3f27933a |
|
MD5 | 3bc66eb012fc567b01e88396ea2f1d84 |
|
BLAKE2b-256 | 7db339fc7a041b2bc80ebdfacb5f9986a8872a8c40c7fee7e39ff9b9ed046ef0 |
Close
Hashes for rython_calc-0.4.8-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c9ec21c4edc497771f1b3ec02e74649594379eb73dca49b5cb0b91ea81a7c49 |
|
MD5 | b1dd242ebb360c82a63aecedb0efcabb |
|
BLAKE2b-256 | a81677193956678509b0c04a5f6531e834aaebd3e56d0d451953e5e69562a0f6 |
Close
Hashes for rython_calc-0.4.8-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b831362ce3eea7cab2acdf35ec1b150f4aa88e8cf6137edb14f3307a0a97e28 |
|
MD5 | 55c244c23f870772fbfdcb70f5523872 |
|
BLAKE2b-256 | d68a98a088cd3546fbd7b1c38e076cbd53817625f72cb36732b9bc68134daf17 |
Close
Hashes for rython_calc-0.4.8-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e863f45bf17431e75d9854b41fde2ca2de3fea1cdbdf7d672396dceec2c17c4 |
|
MD5 | cd8a1b9345e4385e1e1b4318a6889351 |
|
BLAKE2b-256 | ad738457fd211dcb193230b4128ab52d2e88e24d2f3832d727b5a1fc2147e6cb |
Close
Hashes for rython_calc-0.4.8-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc82e2247c66276a2054ab5dd0023b1e89ed46c7e870a6f4132c4c02a4e3846c |
|
MD5 | 846235605afb418fa65240fa19065aca |
|
BLAKE2b-256 | f6e9e33ee6a575dc36716efb2afd83555fa4e9547ed5bc895356b9fc5acf01d0 |