cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

How to use 3rd party python libraries in python Script

jaybodra
New Contributor III

Please can some shed some light on using a third party library (boto3, requests) in a python script

Thank you in advance!

8 REPLIES 8

Bhavin
Former Employee

AFAIK 3rd party py libs like boto3 are not currently supported within py script, neverthless you can still invoke your your py scripts that has ref to boto3 libs, the flow is

1 - create py scripts using your fav editor, outside snaplogic and save it on all of snaplogic nodes (aka jcc)
2 - get UnixExec snap from you SnapLogic account team (this is a field snap that you can request from SnapLogic), this will help you run py scripts out side of SnapLogic via ssh on JCC node/system
3 - Add UnixExec snap in your pipeline, where ever you need to invoke your py script

8df8ea7dfbd5f3d1204e6cf22989847a330509e5.png
fc8dd2450c66fc72533322425fe9a33f52b99548.png
a52393ef8488c146c5869b89afa13ea820fd08b6.png
d935e823068e97abf88ba02b5e14c4ee5c4cc129.png

jaybodra
New Contributor III

Thank you so much Bhavin!

I am assuming I can pass pipeline variables as parameters to my python script like we run it on shell. Please can you shed some light on this.

Please help me understand your usecase, what are you trying to do?

jaybodra
New Contributor III

this is something I am trying to do,

processing url using python lib and writing results to s3. I need to pass url, sub_dir_name, doc_name and delimiters as argument to the script