Skip to main content
Solved

Incorporate python libraries inside workbench

  • February 9, 2015
  • 3 replies
  • 36 views

Forum|alt.badge.img
With FME moving toward the ability to continuously run on FME Server and FME Cloud, I am wondering if there is a way to incorporate python libraries (ie NLTK, GeoPY, etc) for real-time web mapping.

 

 

For example, I would like the ability to strip the body text of an XML feed and send it to the NLTK library for semantic learning and strip it of geo location data. From there. I would send it to the GeoPy library for geocoding. 

 

 

I am a bit out of my element here and I know that with the python caller I can incorporate simply python scripts, but I would like the ability to call entire libraries from GitHub.

 

 

Has anyone had any luck with or experience in this regard?

Best answer by david_r

Hi,

 

 

sure, I've done it on several occasions and it works well, although it can sometimes be a bit finicky to configure the first time. Here are a few starting points: David
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

david_r
Celebrity
  • Best Answer
  • February 9, 2015
Hi,

 

 

sure, I've done it on several occasions and it works well, although it can sometimes be a bit finicky to configure the first time. Here are a few starting points: David

Forum|alt.badge.img
Ok great, thanks for the resources. One last question, If I want to use multiple libraries will I need multiple workspaces. A read through of the resources tells me it is a single python library per workspace.

 

 

For example, if I have one workspace that loads the NLTK library, work its magic, then have another workspace caller that loads GeoPy. 

david_r
Celebrity
  • February 10, 2015
Hi,

 

 

You can install as many modules as you like, there is nothing in particular that differs fundamentally from regular use of Python.

 

 

Your best bet is to download and install a regular distribution of Python 2.7 and install all your modules there. You then set FME to use this installation as its interpreter.

 

 

David