활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
Hi,
AEM runs inside a JVM and has Java APIs. So if you want to to run Python code inside the JVM, you should use a JVM-based Python engine (maybe Jython).
The next thing is that you need to translate the Java interfaces and make them usable in Python. And the next step would be the tooling (I am specifically talking about the annotations handled by the maven-scr-plugin and the maven-bundle-plugin) to make this approach feasible and not only a proof of concept.
I would not go down this route, but rather take a language, where the tooling already exists and where support is available plus other people who can help you with questions.
If you want to run your python code outside of AEM in a separate process and make it usable via a HTTP interface: That will no be problem, but you always have a network connection.
Jörg
We have no HELPX or docs that can help for this use case. However - community seems to have created a GITHub project -- see:
GitHub - Sensis/pyaem: Python client for Adobe Experience Manager (AEM) API
조회 수
답글
좋아요 수
However - Adobe recommends using HTL for components.
조회 수
답글
좋아요 수
Hi,
AEM runs inside a JVM and has Java APIs. So if you want to to run Python code inside the JVM, you should use a JVM-based Python engine (maybe Jython).
The next thing is that you need to translate the Java interfaces and make them usable in Python. And the next step would be the tooling (I am specifically talking about the annotations handled by the maven-scr-plugin and the maven-bundle-plugin) to make this approach feasible and not only a proof of concept.
I would not go down this route, but rather take a language, where the tooling already exists and where support is available plus other people who can help you with questions.
If you want to run your python code outside of AEM in a separate process and make it usable via a HTTP interface: That will no be problem, but you always have a network connection.
Jörg
This is classic java python integration use case:- How to execute Python script from Java? - Stack Overflow
See this post:- AEM OSGI and PYTHON(yowsup)
I would say that it is not in the spirit of Java to run a shell script from Java. Java is meant to be cross-platform, and running a script would limit its use to just a few. This is also not a scalable approach.
I would also recommend having REST way to get access to the information to/from the python.
~kautuk
kautuksahni wrote:
> I would say that it is not in the spirit of Java to run a shell script from Java. Java is meant to be cross-platform, and running a script would limit its use to just a few. This is also not a scalable approach.
He wants to say: Don't do it!
🙂
Jörg
Hi Jorg,
Thank you for giving such clarity to my query.It was really helpful. One more help from you Jorg, you said about this:
If you want to run your python code outside of AEM in a separate process and make it usable via a HTTP interface: That will no be problem, but you always have a network connection
Can you please give me some more idea about it ..in implementing the same?
Thank You.
Saismita
🙂
조회 수
답글
좋아요 수
Thanks Kautuksahni for your reply 🙂
조회 수
답글
좋아요 수
Typically your python code would expose a HTTP interface, which you can access from AEM.
Jörg
We have article that shows use of HTTP APIs in AEM.
조회 수
답글
좋아요 수
Can you share the link here ?
Thanks
조회 수
답글
좋아요 수