{ "info": { "author": "Arnie97", "author_email": "Arnie97@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Java", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Topic :: Software Development :: Libraries :: Java Libraries" ], "description": "# import-java\n[![Build Status](https://travis-ci.org/Arnie97/import-java.svg)](https://travis-ci.org/Arnie97/import-java)\n[![Code Coverage](https://codecov.io/gh/Arnie97/import-java/branch/master/graph/badge.svg)](https://codecov.io/gh/Arnie97/import-java)\n[![PyPI Version](https://img.shields.io/pypi/v/import-java.svg)](https://pypi.org/project/import-java)\n[![Python Compatibility](https://img.shields.io/pypi/pyversions/import-java.svg)](https://pypi.org/project/import-java)\n[![License](https://img.shields.io/pypi/l/import-java.svg)](LICENSE)\n\nImport your Java packages seamlessly into CPython.\n\n## Quick Start\nWe'll create a temporary file in Java and then read it in Python to illustrate the usage:\n\n```python\n>>> import java\n>>> with java:\n... from java.lang import String\n... from java.nio.file import Files\n...\n>>> temp_path = Files.createTempFile('sample', '.tmp')\n>>> sample_text = String('Greetings from Java')\n>>> Files.write(temp_path, sample_text.getBytes())\n\n\n>>> with open(temp_path.toString()) as f:\n... print(repr(f.read()))\n...\n'Greetings from Java'\n\n```\n\nYou can also use `_` as a short alias for `java.lang`:\n\n```python\n>>> with java:\n... from _ import System\n...\n>>> System.getProperties().get('java.specification.version')\n'1.8'\n\n```\n\nWildcard imports (such as `from java.util import *`) are not supported yet.\n\n## Dependencies\nEither [PyJNIus](https://github.com/kivy/pyjnius) or [JavaBridge](https://github.com/LeeKamentsky/python-javabridge). PyJNIus is preferred, as [JavaBridge cannot disambiguate overloaded methods with the same number of parameters](https://github.com/LeeKamentsky/python-javabridge/issues/55).\n\n## Installation\n`$ pip install import-java`\n\n## License\nMIT.\n\n## See also\n* [pythonnet](https://github.com/pythonnet/pythonnet) - Import .NET CLR modules\n* [hack-py-import](https://github.com/iblis17/hack-py-import) - Import your C libraries\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Arnie97/import-java", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "import-java", "package_url": "https://pypi.org/project/import-java/", "platform": "", "project_url": "https://pypi.org/project/import-java/", "project_urls": { "Homepage": "https://github.com/Arnie97/import-java" }, "release_url": "https://pypi.org/project/import-java/0.6/", "requires_dist": [ "javabridge" ], "requires_python": ">=3.0", "summary": "Import Java packages seamlessly into CPython", "version": "0.6" }, "last_serial": 3825697, "releases": { "0.6": [ { "comment_text": "", "digests": { "md5": "ebc37d99c8e9caf8d21ca553b5ad631c", "sha256": "31d742ef021b0036a287a817abbe7e2a4691bfd249fbe14b5d789a1387d24baa" }, "downloads": -1, "filename": "import-java-0.6.tar.gz", "has_sig": false, "md5_digest": "ebc37d99c8e9caf8d21ca553b5ad631c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.0", "size": 4333, "upload_time": "2018-04-30T14:50:31", "url": "https://files.pythonhosted.org/packages/1e/9d/3af732663c61c0662b97db33b4d82d7d6f23f9f3ebe9f093a60c7ebf984a/import-java-0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ebc37d99c8e9caf8d21ca553b5ad631c", "sha256": "31d742ef021b0036a287a817abbe7e2a4691bfd249fbe14b5d789a1387d24baa" }, "downloads": -1, "filename": "import-java-0.6.tar.gz", "has_sig": false, "md5_digest": "ebc37d99c8e9caf8d21ca553b5ad631c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.0", "size": 4333, "upload_time": "2018-04-30T14:50:31", "url": "https://files.pythonhosted.org/packages/1e/9d/3af732663c61c0662b97db33b4d82d7d6f23f9f3ebe9f093a60c7ebf984a/import-java-0.6.tar.gz" } ] }