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.6.tar.gz
(11.5 kB
view hashes)
Built Distributions
Close
Hashes for rython_calc-0.4.6-cp312-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fef57d68fa9cb6f8597db8da0a4cceed3716a8dfbd5e64cf08d470af5507630e |
|
MD5 | 859092e90242069e96eca1dca4148701 |
|
BLAKE2b-256 | 7fda7ce999e830a48dedcf7e81e9e6cc43b94ad0f167e0244f37fafd0d685b58 |
Close
Hashes for rython_calc-0.4.6-cp312-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 942aa2158a0f100187e4d88e420bc692445e1340c95545278a189982f6d5407b |
|
MD5 | 09f181c6344ea173dbf1c807293bc476 |
|
BLAKE2b-256 | 3608d63a5be1dd8b920c1fe39707ee81ce640d77ff1648aa0049480f43e5f504 |
Close
Hashes for rython_calc-0.4.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8dbdfb3ec4e5dc009080042af612bc6afcd88b58646cea5bd20ad233a56af52c |
|
MD5 | 811871e10d320f57ce249e1758151ce1 |
|
BLAKE2b-256 | 3dbb3641c1b95657fe1b15932207d02bb8499f0a70078fddb3fdbed72492b157 |
Close
Hashes for rython_calc-0.4.6-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 202d594460308434e28a7b8fe1164348a08a783d10ef2647d5bbc9b0c2aed61d |
|
MD5 | b435a772f1ce07f272d5e496a1bbfa02 |
|
BLAKE2b-256 | 593c97e138e9144588c0ab38af23adaedd41b3ae68ff1f8ed50287a864e58375 |
Close
Hashes for rython_calc-0.4.6-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ced72b5c8285df568ce07e3fcad82ff84a7b3040f0465aa6fb45a67dd0751ebd |
|
MD5 | 87d6628cc04d9afebf3cfa4b25752d96 |
|
BLAKE2b-256 | c4311a6f7c2d3753e24495b2cbaf086dbf3aaf0267acfbe82e5678015e369eea |
Close
Hashes for rython_calc-0.4.6-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 201ad164e53151e843393d01a17432c0acf77497546f09a94ec37c74e1074147 |
|
MD5 | 071e592c416a682ee3be032e23f26d1f |
|
BLAKE2b-256 | 3e8818113f53c1adf26ead0d50ba9f1d323aa3f53612bf334b76d6ffd1a80b2f |
Close
Hashes for rython_calc-0.4.6-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b41eaf6cd7eb7f3aad7d1f69613a72d5ba96cabb26608d9f0d2e2c2089c048d8 |
|
MD5 | b339950cbbeaae0688e43b8ce51ce1b1 |
|
BLAKE2b-256 | aa998b71b7a82032511c64b30c6f8dcf6e052df89429fe2194580cd84e0c8525 |
Close
Hashes for rython_calc-0.4.6-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08ff099630a21351ab3a5655717a8dba603eea39545e5395d29c143fb61aaa63 |
|
MD5 | ddf6c8c9e7e25cbb76677be6464d8681 |
|
BLAKE2b-256 | 0453f848055709b6d68e5d02676880b3de02b3ab21276518131448279a80a989 |
Close
Hashes for rython_calc-0.4.6-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84a400331659c9ae731d1f0668b2d6b7746e1e1b59ac8847f8cc915f008b7826 |
|
MD5 | 48d125e601a4319c14832ad1cd6eb647 |
|
BLAKE2b-256 | 52681cf1cb7fbc80475b2689b1440419d74cc5aa3352de1db531679f8ba1b701 |
Close
Hashes for rython_calc-0.4.6-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42c042acc6de66d3fe2a5f2a1925a30728dff10683a07d3fc3d07dee4e1f607c |
|
MD5 | 3ada6515defad786c4df8a7fba9ec6a5 |
|
BLAKE2b-256 | 715fa15371d49dd38e11c95d1e3c9e5f9b33061e217c75faace1701cdd24e1f0 |