{"id":21865672,"url":"https://github.com/arnie97/import-java","last_synced_at":"2025-04-14T21:08:48.248Z","repository":{"id":62570785,"uuid":"131278437","full_name":"Arnie97/import-java","owner":"Arnie97","description":"Import Java packages into Python - Syntax sugar for PyJNIus or JavaBridge","archived":false,"fork":false,"pushed_at":"2018-05-02T12:36:06.000Z","size":9,"stargazers_count":17,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-05T09:47:16.632Z","etag":null,"topics":["ffi","ffi-bindings","ffi-wrapper","magic"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Arnie97.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-27T09:52:54.000Z","updated_at":"2023-12-08T19:35:01.000Z","dependencies_parsed_at":"2022-11-03T18:25:55.759Z","dependency_job_id":null,"html_url":"https://github.com/Arnie97/import-java","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arnie97%2Fimport-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arnie97%2Fimport-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arnie97%2Fimport-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arnie97%2Fimport-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Arnie97","download_url":"https://codeload.github.com/Arnie97/import-java/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226856864,"owners_count":17693016,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ffi","ffi-bindings","ffi-wrapper","magic"],"created_at":"2024-11-28T04:17:24.094Z","updated_at":"2024-11-28T04:17:24.709Z","avatar_url":"https://github.com/Arnie97.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 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\u003e\u003e\u003e import java\n\u003e\u003e\u003e with java:\n...     from java.lang import String\n...     from java.nio.file import Files\n...\n\u003e\u003e\u003e temp_path = Files.createTempFile('sample', '.tmp')\n\u003e\u003e\u003e sample_text = String('Greetings from Java')\n\u003e\u003e\u003e Files.write(temp_path, sample_text.getBytes())\n\u003cjava.nio.file.Path at 0x... jclass=java/nio/file/Path jself=...\u003e\n\n\u003e\u003e\u003e 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\u003e\u003e\u003e with java:\n...     from _ import System\n...\n\u003e\u003e\u003e System.getProperty('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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farnie97%2Fimport-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farnie97%2Fimport-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farnie97%2Fimport-java/lists"}