As far as I know there are 2 ways you can achieve this, you can call python scripts from java using Jython http://www.jython.org/index.html. Or you can run a separate backend api web-server in python using flask. If there is large amounts of computation that needs to be done I would build an API to work with but if not use Jython. Also maybe consider writing the code you want to use in python in java for convenience and simplicity of services. Good luck!