{ "info": { "author": "Ignacio Duart G\u00f3mez", "author_email": "iduartgomez@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: POSIX", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Rust", "Topic :: Software Development :: Code Generators" ], "description": "RustyPy |Build Status|\n======================\n\nRustyPy is a code generator for generating binding functions between\nRust and Python files. In addition it provides a series of types for\ninterfacing from Python with Rust, with automatic type conversion\nhandling for primitives and other basic types (like vectors, hash maps\nand tuples) and an API for working with those (both from Rust and\nPython).\n\nFeatures\n--------\n\n- Generate bindings in Rust targetting Python functions.\n- Generate bindings in Python targetting Rust functions.\n- Provides types for interfacing between Rust and Python.\n\nInstallation\n------------\n\nTo install RustyPy just use pip:\n\n::\n\n pip install rustypy\n\nRustyPy requires Python 3.5 or more and works with Rust stable.\n\nTo target Python from Rust the package\n`cpython `__ is required to\ninitialize the package.\n\nDocumentation\n-------------\n\n- `Python in\n Rust `__\n- `Rust in\n Python `__\n- `Type\n conversions `__\n\nUsage\n-----\n\nRustyPy includes a command line interface to generate the code, which\nyou can embeed in your build chain if it's necessary.\n\nGenerate Python bindings in Rust\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nYou can execute the script writing:\n\n::\n\n $rustypy -h\n\nor\n\n::\n\n $python -m rustypy -h\n\nmake sure that rustypy is in your current Python path. The help command\nhas all the information to generate bindings succesfully.\n\nIt also includes functions to generate bindings dynamically. In Python\nuse:\n\n::\n\n from rustypy.pywrapper import bind_py_pckg_funcs\n # default prefix is \"rust_bind_\"\n optional = [\"my_bind_prefix_\", \"other_prefix_\"]\n bind_py_pckg_funcs(prefixes=optional)\n\nThis function will generate the bindings for the package from which is\ncalled from (so the package must be initiated placing an \\_\\_init\\_\\_.py\nfile in one of the parents folders).\n\nMore info: `Python in\nRust `__\n\nGenerate Rust bindings in Python\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nDue to the nature of Python this is done dynamically, so no files are\ngenerated and the bindings are wrapped appropriately with their own\ncallables from Python.\n\n::\n\n from rustypy.rswrapper import bind_rs_crate_funcs\n\n source_path = \"/home/user/workspace/rs_test_lib\"\n compiled_lib = \"/home/user/workspace/rs_test_lib/target/debug/libtest_lib.so\"\n\n # default prefix is \"python_bind_\"\n optional = [\"my_bind_prefix_\", \"other_prefix_\"]\n lib_binds = bind_rs_crate_funcs(source_path, compiled_lib, prefixes=optional)\n\n lib_binds.my_bind_prefix__ffi_function(\"Hello from Python!\")\n\nThere is no concept of 'module' in C (which is the language used for\ninterfacing) so the functions cannot be namedspaced as you would in pure\nRust. Read about Rust FFI in `the\nbook `__.\n\nMore info: `Rust in\nPython `__.\n\nRust crate `documentation `__.\n\n.. |Build Status| image:: https://travis-ci.org/iduartgomez/rustypy.svg?branch=master\n :target: https://travis-ci.org/iduartgomez/rustypy", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/iduartgomez/rustypy", "keywords": "rust autogenerated FFI", "license": "BSD 3-Clause", "maintainer": "", "maintainer_email": "", "name": "rustypy", "package_url": "https://pypi.org/project/rustypy/", "platform": "", "project_url": "https://pypi.org/project/rustypy/", "project_urls": { "Homepage": "https://github.com/iduartgomez/rustypy" }, "release_url": "https://pypi.org/project/rustypy/0.1.17/", "requires_dist": null, "requires_python": "", "summary": "Automatic FFI generation for Python <-> Rust interfacing.", "version": "0.1.17", "yanked": false, "yanked_reason": null }, "last_serial": 7055242, "releases": { "0.1.15": [ { "comment_text": "", "digests": { "md5": "6ada4d23882bbd068e5915ad74f54010", "sha256": "64cee02cc169f2cf56a10d2b151d93bd9755e36e7af4984f9e227bbd67d1ecde" }, "downloads": -1, "filename": "rustypy-0.1.15.tar.gz", "has_sig": false, "md5_digest": "6ada4d23882bbd068e5915ad74f54010", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23200, "upload_time": "2017-06-17T17:05:44", "upload_time_iso_8601": "2017-06-17T17:05:44.992112Z", "url": "https://files.pythonhosted.org/packages/ab/ac/ca1cdfc2e44b84af73ee364afd4fb6f6fe54a0c3a8dc426941831e139168/rustypy-0.1.15.tar.gz", "yanked": false, "yanked_reason": null } ], "0.1.16": [ { "comment_text": "", "digests": { "md5": "107686afb4caccac29ebf6b7d06ef2a4", "sha256": "eb26e04f1ea9621ecbe95f47a244ee364fafdac690d8f7021d3a1770ba5b6011" }, "downloads": -1, "filename": "rustypy-0.1.16.tar.gz", "has_sig": false, "md5_digest": "107686afb4caccac29ebf6b7d06ef2a4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 38439, "upload_time": "2019-10-27T11:53:03", "upload_time_iso_8601": "2019-10-27T11:53:03.280614Z", "url": "https://files.pythonhosted.org/packages/18/af/b7547568894c943adbe3b413266171b553998347b27ba8e7ecf5da491766/rustypy-0.1.16.tar.gz", "yanked": false, "yanked_reason": null } ], "0.1.17": [ { "comment_text": "", "digests": { "md5": "f2d1bfb45d4034c5d435da29dfdb8f33", "sha256": "1f9a367ee6f08e554545493cf0ba0fde96e1a4e927702c92aeddb1841ccc3a72" }, "downloads": -1, "filename": "rustypy-0.1.17.tar.gz", "has_sig": false, "md5_digest": "f2d1bfb45d4034c5d435da29dfdb8f33", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39782, "upload_time": "2020-04-19T18:35:28", "upload_time_iso_8601": "2020-04-19T18:35:28.667182Z", "url": "https://files.pythonhosted.org/packages/30/b7/a541634d70596d9934e5a5ad5e29446007ee4bcfbb373537fe4995c07dc8/rustypy-0.1.17.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f2d1bfb45d4034c5d435da29dfdb8f33", "sha256": "1f9a367ee6f08e554545493cf0ba0fde96e1a4e927702c92aeddb1841ccc3a72" }, "downloads": -1, "filename": "rustypy-0.1.17.tar.gz", "has_sig": false, "md5_digest": "f2d1bfb45d4034c5d435da29dfdb8f33", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39782, "upload_time": "2020-04-19T18:35:28", "upload_time_iso_8601": "2020-04-19T18:35:28.667182Z", "url": "https://files.pythonhosted.org/packages/30/b7/a541634d70596d9934e5a5ad5e29446007ee4bcfbb373537fe4995c07dc8/rustypy-0.1.17.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }