SlideShare a Scribd company logo
Python Component In Mule
The Python language has many similarities to Perl, C, and Java.
However, there are some definite differences between the
languages
 Python also allows the developer to configure
interceptors and alter the values or references of
particular properties in a script. Interceptors are
configured to provide additional services to a
message as it flows through a component. For
example, a developer can configure an
interceptor to execute scheduling or logging of a
particular event while a message is being
processed. The Python component also includes
a custom interceptor which allows you to
configure settings for Spring elements.
 The Python script is generally executed at
runtime (client-side request); the custom logic
embedded in the script can be used to trigger an
application to execute a database transaction, or
modify your web-page interface.
 Accessing Values in Strings
 Python does not support a character
type; these are treated as strings of
length one, thus also considered a
substring.
 To access substrings, use the square
brackets for slicing along with the index
or indices to obtain your substring. For
example −
 #!/usr/bin/python var1 = 'Hello World!'
var2 = "Python Programming" print
"var1[0]: ", var1[0] print "var2[1:5]: ",
 Here is a set of small scripts, which
demonstrate some features of Python
programming.
 # this is the first comment
 #! python
 # integer variables
 SPAM = 1
 #! python print "Hello, Python"
 #! Python
 # string variable
 STRING = "# This is not a comment." print
STRING
 #! Python
 # integer arith
 a=4
 print a
 b=12+5
 print b
 c=b%a
 print c
 #! python
 # input and operator if
 x = int(raw_input("Please enter an integer: "))
 if x < 0:
 x = 0
 print 'Negative changed to zero'
 elif x == 0:
 print 'Zero'
 elif x == 1:
 print 'Single'
 else:
 print 'More'
 ! python
 # range function
 print range(10)
 print range(5, 10)
 print range(0, 10, 3)
 a = ['Mary', 'had', 'a', 'little', 'lamb']
 for i in range(len(a)):
 print i, a[i]
Create a New Project
Enter project name as
demo_python click on finish
Drag components as shown in
the below and configure Http
Drag python component and
configure as below
Paste in script
 #! python
 print "Hello, Python"
Run as Mule Application
 Hit the URL on browser:
 http://localhost:8081/python
 Hello, Python is the output

More Related Content

What's hot

Mule message enricher
Mule message enricherMule message enricher
Mule message enricher
Anirban Sen Chowdhary
 
Integration with Dropbox using Mule ESB
Integration with Dropbox using Mule ESBIntegration with Dropbox using Mule ESB
Integration with Dropbox using Mule ESB
Rupesh Sinha
 
Mulesoft file connector
Mulesoft file connectorMulesoft file connector
Mulesoft file connector
kumar gaurav
 
Testing mule
Testing   muleTesting   mule
Testing mule
Sindhu VL
 
Mule Python component
Mule Python componentMule Python component
Mule Python component
Ankush Sharma
 
Routing in mule
Routing in muleRouting in mule
Routing in mule
Hari Gatadi
 
Mule dataweave
Mule dataweaveMule dataweave
Mule dataweave
Son Nguyen
 
Xslt in mule
Xslt in muleXslt in mule
Xslt in mule
Mohammed246
 
Using spring task scheduler in java in mule
Using spring task scheduler in java in muleUsing spring task scheduler in java in mule
Using spring task scheduler in java in mule
Anirban Sen Chowdhary
 
Runing batch job in mule
Runing batch job in muleRuning batch job in mule
Runing batch job in mule
Son Nguyen
 
Enjoy Munit with Mule
Enjoy Munit with MuleEnjoy Munit with Mule
Enjoy Munit with Mule
Bui Kiet
 
Machine Understandable code
Machine Understandable codeMachine Understandable code
Machine Understandable code
janusathis
 
Chapter 2 - Structure of C++ Program
Chapter 2 - Structure of C++ ProgramChapter 2 - Structure of C++ Program
Chapter 2 - Structure of C++ ProgramDeepak Singh
 
Dynamic file attribute
Dynamic file attributeDynamic file attribute
Dynamic file attribute
Anirban Sen Chowdhary
 
Mule ESB - Mock Salesforce Interface
Mule ESB - Mock Salesforce InterfaceMule ESB - Mock Salesforce Interface
Mule ESB - Mock Salesforce Interface
krishananth
 
Send email attachment using smtp in mule esb
Send email attachment using smtp in mule esbSend email attachment using smtp in mule esb
Send email attachment using smtp in mule esb
Praneethchampion
 
Batch processing
Batch processingBatch processing
Batch processing
Ramakrishna kapa
 
Xml to xml transformation in mule
Xml to xml transformation in muleXml to xml transformation in mule
Xml to xml transformation in mule
Rajkattamuri
 
Codefresh + BlazeMeter Webinar: Continuous Testing for Containerized Applicat...
Codefresh + BlazeMeter Webinar: Continuous Testing for Containerized Applicat...Codefresh + BlazeMeter Webinar: Continuous Testing for Containerized Applicat...
Codefresh + BlazeMeter Webinar: Continuous Testing for Containerized Applicat...
Brittany Ingram
 

What's hot (20)

Mule message enricher
Mule message enricherMule message enricher
Mule message enricher
 
Integration with Dropbox using Mule ESB
Integration with Dropbox using Mule ESBIntegration with Dropbox using Mule ESB
Integration with Dropbox using Mule ESB
 
Mulesoft file connector
Mulesoft file connectorMulesoft file connector
Mulesoft file connector
 
Testing mule
Testing   muleTesting   mule
Testing mule
 
Mule Python component
Mule Python componentMule Python component
Mule Python component
 
Routing in mule
Routing in muleRouting in mule
Routing in mule
 
Mule dataweave
Mule dataweaveMule dataweave
Mule dataweave
 
2310 b 06
2310 b 062310 b 06
2310 b 06
 
Xslt in mule
Xslt in muleXslt in mule
Xslt in mule
 
Using spring task scheduler in java in mule
Using spring task scheduler in java in muleUsing spring task scheduler in java in mule
Using spring task scheduler in java in mule
 
Runing batch job in mule
Runing batch job in muleRuning batch job in mule
Runing batch job in mule
 
Enjoy Munit with Mule
Enjoy Munit with MuleEnjoy Munit with Mule
Enjoy Munit with Mule
 
Machine Understandable code
Machine Understandable codeMachine Understandable code
Machine Understandable code
 
Chapter 2 - Structure of C++ Program
Chapter 2 - Structure of C++ ProgramChapter 2 - Structure of C++ Program
Chapter 2 - Structure of C++ Program
 
Dynamic file attribute
Dynamic file attributeDynamic file attribute
Dynamic file attribute
 
Mule ESB - Mock Salesforce Interface
Mule ESB - Mock Salesforce InterfaceMule ESB - Mock Salesforce Interface
Mule ESB - Mock Salesforce Interface
 
Send email attachment using smtp in mule esb
Send email attachment using smtp in mule esbSend email attachment using smtp in mule esb
Send email attachment using smtp in mule esb
 
Batch processing
Batch processingBatch processing
Batch processing
 
Xml to xml transformation in mule
Xml to xml transformation in muleXml to xml transformation in mule
Xml to xml transformation in mule
 
Codefresh + BlazeMeter Webinar: Continuous Testing for Containerized Applicat...
Codefresh + BlazeMeter Webinar: Continuous Testing for Containerized Applicat...Codefresh + BlazeMeter Webinar: Continuous Testing for Containerized Applicat...
Codefresh + BlazeMeter Webinar: Continuous Testing for Containerized Applicat...
 

Viewers also liked

Tema 2 RRPP
Tema 2 RRPPTema 2 RRPP
STOCK_ANALYSIS_PROJECT
STOCK_ANALYSIS_PROJECTSTOCK_ANALYSIS_PROJECT
STOCK_ANALYSIS_PROJECTLouise Miller
 
Agentschap Integratie en Inburgering heeft geschil met provincies
Agentschap Integratie en Inburgering heeft geschil met provinciesAgentschap Integratie en Inburgering heeft geschil met provincies
Agentschap Integratie en Inburgering heeft geschil met provincies
Thierry Debels
 
Angular js
Angular jsAngular js
Angular js
Ramakrishna kapa
 
Groovy features
Groovy featuresGroovy features
Groovy features
Ramakrishna kapa
 
Listino prezzi BMW Serie 3 Gran Turismo
Listino prezzi BMW Serie 3 Gran Turismo Listino prezzi BMW Serie 3 Gran Turismo
Listino prezzi BMW Serie 3 Gran Turismo
autoblogpuntoit
 
ACI Mercato auto usate novembre 2012
ACI Mercato auto usate novembre 2012ACI Mercato auto usate novembre 2012
ACI Mercato auto usate novembre 2012autoblogpuntoit
 
Workforce Magazine - August 2015
Workforce Magazine - August 2015Workforce Magazine - August 2015
Workforce Magazine - August 2015Dylan Choong
 
1 introduction-to-computer-networking
1 introduction-to-computer-networking1 introduction-to-computer-networking
1 introduction-to-computer-networking
Priya Manik
 
Listino Prezzi McLaren 570GT
Listino Prezzi McLaren 570GTListino Prezzi McLaren 570GT
Listino Prezzi McLaren 570GT
Autoblog.it
 
Luis Alberto Marín- 'Horal', sus orillas extremas
Luis Alberto Marín- 'Horal', sus orillas extremasLuis Alberto Marín- 'Horal', sus orillas extremas
Luis Alberto Marín- 'Horal', sus orillas extremas
Luis Alberto Marín Aguilar
 
Fiat-Chrysler 3,3% VEBA
Fiat-Chrysler 3,3% VEBAFiat-Chrysler 3,3% VEBA
Fiat-Chrysler 3,3% VEBA
Autoblog.it
 
IPC
IPCIPC
Listino Prezzi Lancia Ypsilon
Listino Prezzi Lancia YpsilonListino Prezzi Lancia Ypsilon
Listino Prezzi Lancia Ypsilon
autoblogpuntoit
 
Pembaharuan sumber tenaga
Pembaharuan sumber tenagaPembaharuan sumber tenaga
Pembaharuan sumber tenaga
Zulina Farra Selamat Fawzi
 
group 3
group 3group 3
group 3kilaye
 
Catálogo de plantas para espacios abiertos.
Catálogo de plantas para espacios abiertos.Catálogo de plantas para espacios abiertos.
Catálogo de plantas para espacios abiertos.
Charlsarq
 
Bollo auto più caro con carta di credito: 3 milioni di multa all'Aci
Bollo auto più caro con carta di credito: 3 milioni di multa all'AciBollo auto più caro con carta di credito: 3 milioni di multa all'Aci
Bollo auto più caro con carta di credito: 3 milioni di multa all'Aci
Autoblog.it
 
はじめての UWP アプリ開発
はじめての UWP アプリ開発はじめての UWP アプリ開発
はじめての UWP アプリ開発
hiyohiyo
 

Viewers also liked (20)

Tema 2 RRPP
Tema 2 RRPPTema 2 RRPP
Tema 2 RRPP
 
STOCK_ANALYSIS_PROJECT
STOCK_ANALYSIS_PROJECTSTOCK_ANALYSIS_PROJECT
STOCK_ANALYSIS_PROJECT
 
Agentschap Integratie en Inburgering heeft geschil met provincies
Agentschap Integratie en Inburgering heeft geschil met provinciesAgentschap Integratie en Inburgering heeft geschil met provincies
Agentschap Integratie en Inburgering heeft geschil met provincies
 
Angular js
Angular jsAngular js
Angular js
 
Groovy features
Groovy featuresGroovy features
Groovy features
 
Listino prezzi BMW Serie 3 Gran Turismo
Listino prezzi BMW Serie 3 Gran Turismo Listino prezzi BMW Serie 3 Gran Turismo
Listino prezzi BMW Serie 3 Gran Turismo
 
ACI Mercato auto usate novembre 2012
ACI Mercato auto usate novembre 2012ACI Mercato auto usate novembre 2012
ACI Mercato auto usate novembre 2012
 
Workforce Magazine - August 2015
Workforce Magazine - August 2015Workforce Magazine - August 2015
Workforce Magazine - August 2015
 
1 introduction-to-computer-networking
1 introduction-to-computer-networking1 introduction-to-computer-networking
1 introduction-to-computer-networking
 
Listino Prezzi McLaren 570GT
Listino Prezzi McLaren 570GTListino Prezzi McLaren 570GT
Listino Prezzi McLaren 570GT
 
Luis Alberto Marín- 'Horal', sus orillas extremas
Luis Alberto Marín- 'Horal', sus orillas extremasLuis Alberto Marín- 'Horal', sus orillas extremas
Luis Alberto Marín- 'Horal', sus orillas extremas
 
Fiat-Chrysler 3,3% VEBA
Fiat-Chrysler 3,3% VEBAFiat-Chrysler 3,3% VEBA
Fiat-Chrysler 3,3% VEBA
 
IPC
IPCIPC
IPC
 
Listino Prezzi Lancia Ypsilon
Listino Prezzi Lancia YpsilonListino Prezzi Lancia Ypsilon
Listino Prezzi Lancia Ypsilon
 
Pembaharuan sumber tenaga
Pembaharuan sumber tenagaPembaharuan sumber tenaga
Pembaharuan sumber tenaga
 
group 3
group 3group 3
group 3
 
Reportes
ReportesReportes
Reportes
 
Catálogo de plantas para espacios abiertos.
Catálogo de plantas para espacios abiertos.Catálogo de plantas para espacios abiertos.
Catálogo de plantas para espacios abiertos.
 
Bollo auto più caro con carta di credito: 3 milioni di multa all'Aci
Bollo auto più caro con carta di credito: 3 milioni di multa all'AciBollo auto più caro con carta di credito: 3 milioni di multa all'Aci
Bollo auto più caro con carta di credito: 3 milioni di multa all'Aci
 
はじめての UWP アプリ開発
はじめての UWP アプリ開発はじめての UWP アプリ開発
はじめての UWP アプリ開発
 

Similar to Python component in mule

Python (3).pdf
Python (3).pdfPython (3).pdf
Python (3).pdf
samiwaris2
 
Core python programming tutorial
Core python programming tutorialCore python programming tutorial
Core python programming tutorial
Amarjeetsingh Thakur
 
python-online&offline-training-in-kphb-hyderabad (1) (1).pdf
python-online&offline-training-in-kphb-hyderabad (1) (1).pdfpython-online&offline-training-in-kphb-hyderabad (1) (1).pdf
python-online&offline-training-in-kphb-hyderabad (1) (1).pdf
KosmikTech1
 
Introduction of Python
Introduction of PythonIntroduction of Python
Introduction of Python
ZENUS INFOTECH INDIA PVT. LTD.
 
Python fundamentals
Python fundamentalsPython fundamentals
Python fundamentals
natnaelmamuye
 
Python (Data Analysis) cleaning and visualize
Python (Data Analysis) cleaning and visualizePython (Data Analysis) cleaning and visualize
Python (Data Analysis) cleaning and visualize
IruolagbePius
 
Python Course.docx
Python Course.docxPython Course.docx
Python Course.docx
AdnanAhmad57885
 
First Steps in Python Programming
First Steps in Python ProgrammingFirst Steps in Python Programming
First Steps in Python Programming
Dozie Agbo
 
An Overview Of Python With Functional Programming
An Overview Of Python With Functional ProgrammingAn Overview Of Python With Functional Programming
An Overview Of Python With Functional ProgrammingAdam Getchell
 
Fundamentals of python
Fundamentals of pythonFundamentals of python
Fundamentals of python
BijuAugustian
 
Python Introduction
Python IntroductionPython Introduction
Python Introduction
vikram mahendra
 
Introduction to Python for Data Science and Machine Learning
Introduction to Python for Data Science and Machine Learning Introduction to Python for Data Science and Machine Learning
Introduction to Python for Data Science and Machine Learning
ParrotAI
 
WEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTHWEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTH
Bhavsingh Maloth
 
CSC2308 - PRINCIPLE OF PROGRAMMING II.pdf
CSC2308 - PRINCIPLE OF PROGRAMMING II.pdfCSC2308 - PRINCIPLE OF PROGRAMMING II.pdf
CSC2308 - PRINCIPLE OF PROGRAMMING II.pdf
AbdulmalikAhmadLawan2
 
Py-Slides- easuajsjsjejejjwlqpqpqpp1.pdf
Py-Slides- easuajsjsjejejjwlqpqpqpp1.pdfPy-Slides- easuajsjsjejejjwlqpqpqpp1.pdf
Py-Slides- easuajsjsjejejjwlqpqpqpp1.pdf
shetoooelshitany74
 
notwa dfdfvs gf fdgfgh s thgfgh frg reggg
notwa dfdfvs gf fdgfgh  s thgfgh frg regggnotwa dfdfvs gf fdgfgh  s thgfgh frg reggg
notwa dfdfvs gf fdgfgh s thgfgh frg reggg
Godwin585235
 
Python-01| Fundamentals
Python-01| FundamentalsPython-01| Fundamentals
Python-01| Fundamentals
Mohd Sajjad
 
Python programming msc(cs)
Python programming msc(cs)Python programming msc(cs)
Python programming msc(cs)
KALAISELVI P
 
python ppt | Python Course In Ghaziabad | Scode Network Institute
python ppt | Python Course In Ghaziabad | Scode Network Institutepython ppt | Python Course In Ghaziabad | Scode Network Institute
python ppt | Python Course In Ghaziabad | Scode Network Institute
Scode Network Institute
 

Similar to Python component in mule (20)

Python (3).pdf
Python (3).pdfPython (3).pdf
Python (3).pdf
 
Core python programming tutorial
Core python programming tutorialCore python programming tutorial
Core python programming tutorial
 
python-online&offline-training-in-kphb-hyderabad (1) (1).pdf
python-online&offline-training-in-kphb-hyderabad (1) (1).pdfpython-online&offline-training-in-kphb-hyderabad (1) (1).pdf
python-online&offline-training-in-kphb-hyderabad (1) (1).pdf
 
INTERNSHIP REPORT.docx
 INTERNSHIP REPORT.docx INTERNSHIP REPORT.docx
INTERNSHIP REPORT.docx
 
Introduction of Python
Introduction of PythonIntroduction of Python
Introduction of Python
 
Python fundamentals
Python fundamentalsPython fundamentals
Python fundamentals
 
Python (Data Analysis) cleaning and visualize
Python (Data Analysis) cleaning and visualizePython (Data Analysis) cleaning and visualize
Python (Data Analysis) cleaning and visualize
 
Python Course.docx
Python Course.docxPython Course.docx
Python Course.docx
 
First Steps in Python Programming
First Steps in Python ProgrammingFirst Steps in Python Programming
First Steps in Python Programming
 
An Overview Of Python With Functional Programming
An Overview Of Python With Functional ProgrammingAn Overview Of Python With Functional Programming
An Overview Of Python With Functional Programming
 
Fundamentals of python
Fundamentals of pythonFundamentals of python
Fundamentals of python
 
Python Introduction
Python IntroductionPython Introduction
Python Introduction
 
Introduction to Python for Data Science and Machine Learning
Introduction to Python for Data Science and Machine Learning Introduction to Python for Data Science and Machine Learning
Introduction to Python for Data Science and Machine Learning
 
WEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTHWEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTH
 
CSC2308 - PRINCIPLE OF PROGRAMMING II.pdf
CSC2308 - PRINCIPLE OF PROGRAMMING II.pdfCSC2308 - PRINCIPLE OF PROGRAMMING II.pdf
CSC2308 - PRINCIPLE OF PROGRAMMING II.pdf
 
Py-Slides- easuajsjsjejejjwlqpqpqpp1.pdf
Py-Slides- easuajsjsjejejjwlqpqpqpp1.pdfPy-Slides- easuajsjsjejejjwlqpqpqpp1.pdf
Py-Slides- easuajsjsjejejjwlqpqpqpp1.pdf
 
notwa dfdfvs gf fdgfgh s thgfgh frg reggg
notwa dfdfvs gf fdgfgh  s thgfgh frg regggnotwa dfdfvs gf fdgfgh  s thgfgh frg reggg
notwa dfdfvs gf fdgfgh s thgfgh frg reggg
 
Python-01| Fundamentals
Python-01| FundamentalsPython-01| Fundamentals
Python-01| Fundamentals
 
Python programming msc(cs)
Python programming msc(cs)Python programming msc(cs)
Python programming msc(cs)
 
python ppt | Python Course In Ghaziabad | Scode Network Institute
python ppt | Python Course In Ghaziabad | Scode Network Institutepython ppt | Python Course In Ghaziabad | Scode Network Institute
python ppt | Python Course In Ghaziabad | Scode Network Institute
 

More from Ramakrishna kapa

Load balancer in mule
Load balancer in muleLoad balancer in mule
Load balancer in mule
Ramakrishna kapa
 
Anypoint connectors
Anypoint connectorsAnypoint connectors
Anypoint connectors
Ramakrishna kapa
 
Msmq connectivity
Msmq connectivityMsmq connectivity
Msmq connectivity
Ramakrishna kapa
 
Scopes in mule
Scopes in muleScopes in mule
Scopes in mule
Ramakrishna kapa
 
Data weave more operations
Data weave more operationsData weave more operations
Data weave more operations
Ramakrishna kapa
 
Basic math operations using dataweave
Basic math operations using dataweaveBasic math operations using dataweave
Basic math operations using dataweave
Ramakrishna kapa
 
Dataweave types operators
Dataweave types operatorsDataweave types operators
Dataweave types operators
Ramakrishna kapa
 
Operators in mule dataweave
Operators in mule dataweaveOperators in mule dataweave
Operators in mule dataweave
Ramakrishna kapa
 
Data weave in mule
Data weave in muleData weave in mule
Data weave in mule
Ramakrishna kapa
 
Servicenow connector
Servicenow connectorServicenow connector
Servicenow connector
Ramakrishna kapa
 
Introduction to testing mule
Introduction to testing muleIntroduction to testing mule
Introduction to testing mule
Ramakrishna kapa
 
Choice flow control
Choice flow controlChoice flow control
Choice flow control
Ramakrishna kapa
 
Message enricher example
Message enricher exampleMessage enricher example
Message enricher example
Ramakrishna kapa
 
Mule exception strategies
Mule exception strategiesMule exception strategies
Mule exception strategies
Ramakrishna kapa
 
Anypoint connector basics
Anypoint connector basicsAnypoint connector basics
Anypoint connector basics
Ramakrishna kapa
 
Mule global elements
Mule global elementsMule global elements
Mule global elements
Ramakrishna kapa
 
Mule message structure and varibles scopes
Mule message structure and varibles scopesMule message structure and varibles scopes
Mule message structure and varibles scopes
Ramakrishna kapa
 
How to create an api in mule
How to create an api in muleHow to create an api in mule
How to create an api in mule
Ramakrishna kapa
 
Log4j is a reliable, fast and flexible
Log4j is a reliable, fast and flexibleLog4j is a reliable, fast and flexible
Log4j is a reliable, fast and flexible
Ramakrishna kapa
 
Jsf 2
Jsf 2Jsf 2

More from Ramakrishna kapa (20)

Load balancer in mule
Load balancer in muleLoad balancer in mule
Load balancer in mule
 
Anypoint connectors
Anypoint connectorsAnypoint connectors
Anypoint connectors
 
Msmq connectivity
Msmq connectivityMsmq connectivity
Msmq connectivity
 
Scopes in mule
Scopes in muleScopes in mule
Scopes in mule
 
Data weave more operations
Data weave more operationsData weave more operations
Data weave more operations
 
Basic math operations using dataweave
Basic math operations using dataweaveBasic math operations using dataweave
Basic math operations using dataweave
 
Dataweave types operators
Dataweave types operatorsDataweave types operators
Dataweave types operators
 
Operators in mule dataweave
Operators in mule dataweaveOperators in mule dataweave
Operators in mule dataweave
 
Data weave in mule
Data weave in muleData weave in mule
Data weave in mule
 
Servicenow connector
Servicenow connectorServicenow connector
Servicenow connector
 
Introduction to testing mule
Introduction to testing muleIntroduction to testing mule
Introduction to testing mule
 
Choice flow control
Choice flow controlChoice flow control
Choice flow control
 
Message enricher example
Message enricher exampleMessage enricher example
Message enricher example
 
Mule exception strategies
Mule exception strategiesMule exception strategies
Mule exception strategies
 
Anypoint connector basics
Anypoint connector basicsAnypoint connector basics
Anypoint connector basics
 
Mule global elements
Mule global elementsMule global elements
Mule global elements
 
Mule message structure and varibles scopes
Mule message structure and varibles scopesMule message structure and varibles scopes
Mule message structure and varibles scopes
 
How to create an api in mule
How to create an api in muleHow to create an api in mule
How to create an api in mule
 
Log4j is a reliable, fast and flexible
Log4j is a reliable, fast and flexibleLog4j is a reliable, fast and flexible
Log4j is a reliable, fast and flexible
 
Jsf 2
Jsf 2Jsf 2
Jsf 2
 

Recently uploaded

Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
AI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website CreatorAI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website Creator
Google
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
Roshan Dwivedi
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 

Recently uploaded (20)

Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
AI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website CreatorAI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website Creator
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 

Python component in mule

  • 1. Python Component In Mule The Python language has many similarities to Perl, C, and Java. However, there are some definite differences between the languages
  • 2.  Python also allows the developer to configure interceptors and alter the values or references of particular properties in a script. Interceptors are configured to provide additional services to a message as it flows through a component. For example, a developer can configure an interceptor to execute scheduling or logging of a particular event while a message is being processed. The Python component also includes a custom interceptor which allows you to configure settings for Spring elements.  The Python script is generally executed at runtime (client-side request); the custom logic embedded in the script can be used to trigger an application to execute a database transaction, or modify your web-page interface.
  • 3.  Accessing Values in Strings  Python does not support a character type; these are treated as strings of length one, thus also considered a substring.  To access substrings, use the square brackets for slicing along with the index or indices to obtain your substring. For example −  #!/usr/bin/python var1 = 'Hello World!' var2 = "Python Programming" print "var1[0]: ", var1[0] print "var2[1:5]: ",
  • 4.  Here is a set of small scripts, which demonstrate some features of Python programming.  # this is the first comment  #! python  # integer variables  SPAM = 1  #! python print "Hello, Python"  #! Python  # string variable  STRING = "# This is not a comment." print STRING
  • 5.  #! Python  # integer arith  a=4  print a  b=12+5  print b  c=b%a  print c
  • 6.  #! python  # input and operator if  x = int(raw_input("Please enter an integer: "))  if x < 0:  x = 0  print 'Negative changed to zero'  elif x == 0:  print 'Zero'  elif x == 1:  print 'Single'  else:  print 'More'
  • 7.  ! python  # range function  print range(10)  print range(5, 10)  print range(0, 10, 3)  a = ['Mary', 'had', 'a', 'little', 'lamb']  for i in range(len(a)):  print i, a[i]
  • 8. Create a New Project
  • 9. Enter project name as demo_python click on finish
  • 10. Drag components as shown in the below and configure Http
  • 11. Drag python component and configure as below
  • 12. Paste in script  #! python  print "Hello, Python"
  • 13. Run as Mule Application  Hit the URL on browser:  http://localhost:8081/python  Hello, Python is the output