{"id":26925150,"url":"https://github.com/senx/warp10-plugin-py4j","last_synced_at":"2025-04-02T02:32:53.664Z","repository":{"id":40264780,"uuid":"169414783","full_name":"senx/warp10-plugin-py4j","owner":"senx","description":"Warp 10™ Py4J plugin","archived":false,"fork":false,"pushed_at":"2023-07-07T09:07:03.000Z","size":156,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-28T03:11:09.594Z","etag":null,"topics":["py4j","python","warp10","warpscript"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/senx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-06T14:00:10.000Z","updated_at":"2022-04-27T06:39:18.000Z","dependencies_parsed_at":"2022-07-22T08:32:16.339Z","dependency_job_id":null,"html_url":"https://github.com/senx/warp10-plugin-py4j","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/senx%2Fwarp10-plugin-py4j","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/senx%2Fwarp10-plugin-py4j/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/senx%2Fwarp10-plugin-py4j/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/senx%2Fwarp10-plugin-py4j/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/senx","download_url":"https://codeload.github.com/senx/warp10-plugin-py4j/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246743410,"owners_count":20826517,"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":["py4j","python","warp10","warpscript"],"created_at":"2025-04-02T02:30:35.489Z","updated_at":"2025-04-02T02:32:53.618Z","avatar_url":"https://github.com/senx.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Warp 10™ Py4J plugin\n\nThis is a Warp 10 plugin that enables to use Python to interact with the platform.\n\nYou can get it with [Warpfleet](https://warpfleet.senx.io/browse/io.warp10/warp10-plugin-py4j).\n\nMake sure to set these configurations:\n\n```properties\n# register the plugin\nwarp10.plugin.py4j = io.warp10.plugins.py4j.Py4JWarp10Plugin\n# register that there are dependencies to load if any\nplugin.defaultcl.io.warp10.plugins.py4j.Py4JWarp10Plugin = true\n# set to true to allow to find/fetch data through py4j\negress.clients.expose = true\n# set a secret to use an authentication token (strongly advised)\npy4j.authtoken = your-token\n```\n\nMore details [here](https://warp10.io/content/03_Documentation/04__Tooling/03_Python).\n\n### Python example\n\n```python\nfrom py4j.java_gateway import JavaGateway\nfrom py4j.java_gateway import GatewayParameters\n\nparams = GatewayParameters('127.0.0.1', 25333, auto_convert=True, auth_token=\"your-token\")\ngateway = JavaGateway(gateway_parameters=params)\nstack = gateway.entry_point.newStack()\nstack.execMulti('\"Hello Warp 10\"')\nprint(stack.pop())\n```\n\nWe also made a tutorial on how to use this plugin on our [blog](https://blog.senx.io/the-py4j-plugin-for-warp-10/).\n\n### SSL/TLS example\n\nSince revision 1.0.2 it is also possible to use SSL/TLS encryption.\n\nYou will need a key pair with certificate, for example, you can generate them with:\n\n`keytool -genkey -alias some-alias -keyalg RSA -storepass some-password -keystore path/to/keystore.jks`\n\nThen, set these configuration parameters:\n\n```properties\npy4j.use.ssl = true\n# In case previous configuration is true, the following must be set\npy4j.ssl.keystore.path = path/to/keystore.jks\npy4j.ssl.keystore.password = some-password\npy4j.ssl.cert.alias = some-alias\n```\n\nIn python, you will then have to pass a `ssl.SSLContext` object to `GatewayParameters`:\n\n```python\nimport ssl\n\nclient_ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)\nclient_ssl_context.check_hostname = False # you can set this to True if the client loads a certification chain and you specify a hostname in GatewayParameters\nclient_ssl_context.verify_mode = ssl.CERT_NONE # the client won't check the certification chain as we trust the server self-certificate since we generated it\nparams = GatewayParameters('127.0.0.1', 25333, auto_convert=True, auth_token=\"your-token\", ssl_context=client_ssl_context)\ngateway = JavaGateway(gateway_parameters=params)\n\n# The communication is TLS encrypted\n...\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsenx%2Fwarp10-plugin-py4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsenx%2Fwarp10-plugin-py4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsenx%2Fwarp10-plugin-py4j/lists"}