Skip to content
Discussion options

You must be logged in to vote

python-jvm@wfouche is a JBang app that streamlines the process of executing Jython programs within a JVM environment.

#!/usr/bin/env python-jvm

# restclient_jython.py
#
# Run: jbang run python-jvm@wfouche restclient_jython.py
#

# /// jbang
# requires-jython = "==2.7.4"
# requires-java = ">=21"
# debug = false
# dependencies = [
#   "org.springframework.boot:spring-boot-starter-web:3.4.4"
# ]
# [java]
#   runtime-options = "-server -Xms2g -Xmx2g -XX:+UseZGC -XX:+ZGenerational"
# ///

import java.lang.String as String
import org.springframework.web.client.RestClient as RestClient

def restApiCall(uri, id):
    restClient = RestClient.create()
    rsp = restClient.get().uri(uri, id).retrieve

Replies: 6 comments 10 replies

Comment options

You must be logged in to vote
2 replies
@wfouche
Comment options

@maxandersen
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@maxandersen
Comment options

Comment options

You must be logged in to vote
7 replies
@quintesse
Comment options

@quintesse
Comment options

@wfouche
Comment options

@wfouche
Comment options

@quintesse
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by wfouche
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
3 participants