SlideShare a Scribd company logo
1 of 9
Python and FME REST
Rob Gaston
Web Developer; FarallonGeographics, Inc.




                                           April 9, 2013
San Francisco EAS


 EAS is an open source system for maintaining
  address data
 At the City and County of San Francisco, FME is
  being used to ETL parcel and street data used by
  EAS
 EAS uses FME Server REST API to check the
  status of ETL jobs before staging new data
EAS, Python and FME


 EAS makes calls to FME Server REST API via
  automation scripts written in Python
 Python is used in EAS both on the backend of the
  web application and for automation

 To support automation of calls to FME Server
  REST services, we built a Python class
  (FmeServerHelper)
Checking for an FME
Workspace with Python

 Without FmeServerHelper    With FmeServerHelper
fme_server_helper.py
FmeServerHelper API
 doesJobExist - Checks to see if FME workspace exists on
  this host
 isJobRunning- Checks to see if FME workspace is
  currently running on this host
 isJobQueued - Checks to see if FME workspace is currently
  queued to run on this host
 getLatestCompletedJob - Gets the data from FME Server
  for the last job from a given workspace
 getJobId- Gets the string id from a FME Server job
 getJobStatus- Gets the string job status from a FME
  Server job


Get the code: https://code.google.com/p/eas/source/browse/trunk/automation/src/fme_server_helper.py
FmeServerHelper API
    Documentation
     doesJobExist(jobDict) : Boolean                                            getLatestCompletedJob(jobDict) : Dict
       Checks to see if FME workspace exists on this host                         Gets the data from FME Server for the last job from a given
       PARAMETERS:                                                                workspace
       jobDict: Dict - a dictionary containing the workspace and repository       PARAMETERS:
       names                                                                      jobDict: Dict - a dictionary containing the workspace and repository
       RETURNS:                                                                   names
       Boolean - the existence state of this workspace on this host               RETURNS:
                                                                                  Dict - a dictionary containing job data from FME Server

     isJobRunning(jobDict) : Boolean
       Checks to see if FME workspace is currently running on this host          getJobId(job) : String
       PARAMETERS:                                                                Gets the string id from a FME Server job
       jobDict: Dict - a dictionary containing the workspace and repository       PARAMETERS:
       names                                                                      job: Dict - a dictionary containing job data from FME Server
       RETURNS:                                                                   RETURNS:
       Boolean - the running state of this workspace on this host                 String - the job id


     isJobQueued(jobDict) : Boolean                                             getJobStatus(job) : String
       Checks to see if FME workspace is currently queued to run on this          Gets the string job status from a FME Server job
       host                                                                       PARAMETERS:
       PARAMETERS:                                                                job: Dict - a dictionary containing job data from FME server
       jobDict: Dict - a dictionary containing the workspace and repository       RETURNS:
       names                                                                      String - the job status
       RETURNS:
       Boolean - the queued state of this workspace on this host




    Get the code: https://code.google.com/p/eas/source/browse/trunk/automation/src/fme_server_helper.py
What’s Next…?

 Following the principle of DTSTTCPW (do the simplest thing
  that could possibly work), FmeServerHelper only currently
  supports the use cases required by EAS
 Since EAS is open source, anyone with the time and
  inclination to create a more complete API for working with
  FME Server can use fme_server_helper.py as a jumping off
  point

 So… get to work and have fun!
Thank You!


 Questions?

 For more information:
     Rob Gaston, rgaston(at)fargeo(dot)com
     FarallonGeographics, Inc.
     http://www.fargeo.com/
     https://code.google.com/p/eas/

More Related Content

What's hot

Rockin' Protobuf in Ruby
Rockin' Protobuf in RubyRockin' Protobuf in Ruby
Rockin' Protobuf in Ruby
BJ Neilsen
 

What's hot (18)

Function in Python
Function in PythonFunction in Python
Function in Python
 
Rockin' Protobuf in Ruby
Rockin' Protobuf in RubyRockin' Protobuf in Ruby
Rockin' Protobuf in Ruby
 
Buffer Overflows 101: Some Assembly Required
Buffer Overflows 101: Some Assembly RequiredBuffer Overflows 101: Some Assembly Required
Buffer Overflows 101: Some Assembly Required
 
OSCON - ES6 metaprogramming unleashed
OSCON -  ES6 metaprogramming unleashedOSCON -  ES6 metaprogramming unleashed
OSCON - ES6 metaprogramming unleashed
 
ZendCon 08 php 5.3
ZendCon 08 php 5.3ZendCon 08 php 5.3
ZendCon 08 php 5.3
 
Computer Science Homework Help
Computer Science Homework HelpComputer Science Homework Help
Computer Science Homework Help
 
Subroutines
SubroutinesSubroutines
Subroutines
 
Linux-Fu for PHP Developers
Linux-Fu for PHP DevelopersLinux-Fu for PHP Developers
Linux-Fu for PHP Developers
 
Learning sed and awk
Learning sed and awkLearning sed and awk
Learning sed and awk
 
newperl5
newperl5newperl5
newperl5
 
Python cheatsheet Indian Servers
Python cheatsheet Indian ServersPython cheatsheet Indian Servers
Python cheatsheet Indian Servers
 
Dataflow: Declarative concurrency in Ruby
Dataflow: Declarative concurrency in RubyDataflow: Declarative concurrency in Ruby
Dataflow: Declarative concurrency in Ruby
 
Git-podstawy
Git-podstawyGit-podstawy
Git-podstawy
 
EuroPython 2017 - Bonono - Simple ETL in python 3.5+
EuroPython 2017 - Bonono - Simple ETL in python 3.5+EuroPython 2017 - Bonono - Simple ETL in python 3.5+
EuroPython 2017 - Bonono - Simple ETL in python 3.5+
 
ROP
ROPROP
ROP
 
Python Programming - Functions and Modules
Python Programming - Functions and ModulesPython Programming - Functions and Modules
Python Programming - Functions and Modules
 
Python Programming Essentials - M18 - Modules and Packages
Python Programming Essentials - M18 - Modules and PackagesPython Programming Essentials - M18 - Modules and Packages
Python Programming Essentials - M18 - Modules and Packages
 
2. reverse primarydns using bind for ptr and cname record ipv4
2. reverse primarydns using bind for ptr and cname record ipv42. reverse primarydns using bind for ptr and cname record ipv4
2. reverse primarydns using bind for ptr and cname record ipv4
 

Viewers also liked

Danska 1
Danska 1Danska 1
Danska 1
jernej
 
Llocs 3r Espanya
Llocs 3r EspanyaLlocs 3r Espanya
Llocs 3r Espanya
guest9389
 
Encuesta De SatisfaccióN
Encuesta De SatisfaccióNEncuesta De SatisfaccióN
Encuesta De SatisfaccióN
guest701994
 

Viewers also liked (20)

FME World Tour 2016: FME and continuous integration
FME World Tour 2016: FME and continuous integrationFME World Tour 2016: FME and continuous integration
FME World Tour 2016: FME and continuous integration
 
Leveraging FME Workbench and Python Scripts to Create Stylized Oil and Gas KM...
Leveraging FME Workbench and Python Scripts to Create Stylized Oil and Gas KM...Leveraging FME Workbench and Python Scripts to Create Stylized Oil and Gas KM...
Leveraging FME Workbench and Python Scripts to Create Stylized Oil and Gas KM...
 
FME Server_Ken Bragg - Safe Software FME World Tour 2013
FME Server_Ken Bragg - Safe Software FME World Tour 2013FME Server_Ken Bragg - Safe Software FME World Tour 2013
FME Server_Ken Bragg - Safe Software FME World Tour 2013
 
Beyond 49x Transformers: Don't be afraid of (the) Python!
Beyond 49x Transformers: Don't be afraid of (the) Python!Beyond 49x Transformers: Don't be afraid of (the) Python!
Beyond 49x Transformers: Don't be afraid of (the) Python!
 
Danska 1
Danska 1Danska 1
Danska 1
 
Ilusion
IlusionIlusion
Ilusion
 
virus informatico
virus informaticovirus informatico
virus informatico
 
Met GIS minder gissen in uw RO-proces
Met GIS minder gissen in uw RO-procesMet GIS minder gissen in uw RO-proces
Met GIS minder gissen in uw RO-proces
 
my
mymy
my
 
Celebraciones 1a1
Celebraciones 1a1Celebraciones 1a1
Celebraciones 1a1
 
Meet Global Voices Polska
Meet Global Voices PolskaMeet Global Voices Polska
Meet Global Voices Polska
 
Wellness Features by Emily Ashman
Wellness Features by Emily AshmanWellness Features by Emily Ashman
Wellness Features by Emily Ashman
 
Llocs 3r Espanya
Llocs 3r EspanyaLlocs 3r Espanya
Llocs 3r Espanya
 
Transceiver – How They Help Support Big Data in Data Centers?
 Transceiver – How They Help Support Big Data in Data Centers? Transceiver – How They Help Support Big Data in Data Centers?
Transceiver – How They Help Support Big Data in Data Centers?
 
Proyectos Praes
Proyectos PraesProyectos Praes
Proyectos Praes
 
Questions Pertinantes
Questions PertinantesQuestions Pertinantes
Questions Pertinantes
 
How to make a salad sandwich
How to make a salad sandwichHow to make a salad sandwich
How to make a salad sandwich
 
Encuesta De SatisfaccióN
Encuesta De SatisfaccióNEncuesta De SatisfaccióN
Encuesta De SatisfaccióN
 
Nature2
Nature2Nature2
Nature2
 
Repaso seleccion san marcos
Repaso seleccion san marcosRepaso seleccion san marcos
Repaso seleccion san marcos
 

Similar to Python and FME REST

JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...
JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...
JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...
Guillaume Laforge
 
Torquebox OSCON Java 2011
Torquebox OSCON Java 2011Torquebox OSCON Java 2011
Torquebox OSCON Java 2011
tobiascrawley
 

Similar to Python and FME REST (20)

Functions in Python Syntax and working .
Functions in Python Syntax and working .Functions in Python Syntax and working .
Functions in Python Syntax and working .
 
Mastering Namespaces in PHP
Mastering Namespaces in PHPMastering Namespaces in PHP
Mastering Namespaces in PHP
 
Java 8 Bootcamp
Java 8 BootcampJava 8 Bootcamp
Java 8 Bootcamp
 
Pfm technical-inside
Pfm technical-insidePfm technical-inside
Pfm technical-inside
 
Python Programming Essentials - M19 - Namespaces, Global Variables and Docstr...
Python Programming Essentials - M19 - Namespaces, Global Variables and Docstr...Python Programming Essentials - M19 - Namespaces, Global Variables and Docstr...
Python Programming Essentials - M19 - Namespaces, Global Variables and Docstr...
 
Php resque
Php resquePhp resque
Php resque
 
PHP 5.3
PHP 5.3PHP 5.3
PHP 5.3
 
Fabric Fast & Furious edition
Fabric Fast & Furious editionFabric Fast & Furious edition
Fabric Fast & Furious edition
 
Fundamentals of matlab programming
Fundamentals of matlab programmingFundamentals of matlab programming
Fundamentals of matlab programming
 
Matlab-fundamentals of matlab-2
Matlab-fundamentals of matlab-2Matlab-fundamentals of matlab-2
Matlab-fundamentals of matlab-2
 
WORKING WITH FUNCTIONS
WORKING WITH FUNCTIONSWORKING WITH FUNCTIONS
WORKING WITH FUNCTIONS
 
Puppet Camp Paris 2015: Power of Puppet 4 (Beginner)
Puppet Camp Paris 2015: Power of Puppet 4 (Beginner) Puppet Camp Paris 2015: Power of Puppet 4 (Beginner)
Puppet Camp Paris 2015: Power of Puppet 4 (Beginner)
 
Rf介绍
Rf介绍Rf介绍
Rf介绍
 
Spring Batch Behind the Scenes
Spring Batch Behind the ScenesSpring Batch Behind the Scenes
Spring Batch Behind the Scenes
 
UNIT 3 python.pptx
UNIT 3 python.pptxUNIT 3 python.pptx
UNIT 3 python.pptx
 
JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...
JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...
JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...
 
Torquebox OSCON Java 2011
Torquebox OSCON Java 2011Torquebox OSCON Java 2011
Torquebox OSCON Java 2011
 
TorqueBox: The beauty of Ruby with the power of JBoss. Presented at Devnexus...
TorqueBox: The beauty of Ruby with the power of JBoss.  Presented at Devnexus...TorqueBox: The beauty of Ruby with the power of JBoss.  Presented at Devnexus...
TorqueBox: The beauty of Ruby with the power of JBoss. Presented at Devnexus...
 
04. WORKING WITH FUNCTIONS-2 (1).pptx
04. WORKING WITH FUNCTIONS-2 (1).pptx04. WORKING WITH FUNCTIONS-2 (1).pptx
04. WORKING WITH FUNCTIONS-2 (1).pptx
 
Computer science notes of functions chapter
Computer science notes of functions chapterComputer science notes of functions chapter
Computer science notes of functions chapter
 

More from Safe Software

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial DataCloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial Data
Safe Software
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Safe Software
 
Introducing the New FME Community Webinar - Feb 21, 2024 (2).pdf
Introducing the New FME Community Webinar - Feb 21, 2024 (2).pdfIntroducing the New FME Community Webinar - Feb 21, 2024 (2).pdf
Introducing the New FME Community Webinar - Feb 21, 2024 (2).pdf
Safe Software
 
Cloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial DataCloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial Data
Safe Software
 
Taking Off with FME: Elevating Airport Operations to New Heights
Taking Off with FME: Elevating Airport Operations to New HeightsTaking Off with FME: Elevating Airport Operations to New Heights
Taking Off with FME: Elevating Airport Operations to New Heights
Safe Software
 
Initiating and Advancing Your Strategic GIS Governance Strategy
Initiating and Advancing Your Strategic GIS Governance StrategyInitiating and Advancing Your Strategic GIS Governance Strategy
Initiating and Advancing Your Strategic GIS Governance Strategy
Safe Software
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Safe Software
 

More from Safe Software (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action:  Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action:  Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
The Critical Role of Spatial Data in Today's Data Ecosystem
The Critical Role of Spatial Data in Today's Data EcosystemThe Critical Role of Spatial Data in Today's Data Ecosystem
The Critical Role of Spatial Data in Today's Data Ecosystem
 
Cloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial DataCloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial Data
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
Mastering MicroStation DGN: How to Integrate CAD and GIS
Mastering MicroStation DGN: How to Integrate CAD and GISMastering MicroStation DGN: How to Integrate CAD and GIS
Mastering MicroStation DGN: How to Integrate CAD and GIS
 
Geospatial Synergy: Amplifying Efficiency with FME & Esri
Geospatial Synergy: Amplifying Efficiency with FME & EsriGeospatial Synergy: Amplifying Efficiency with FME & Esri
Geospatial Synergy: Amplifying Efficiency with FME & Esri
 
Introducing the New FME Community Webinar - Feb 21, 2024 (2).pdf
Introducing the New FME Community Webinar - Feb 21, 2024 (2).pdfIntroducing the New FME Community Webinar - Feb 21, 2024 (2).pdf
Introducing the New FME Community Webinar - Feb 21, 2024 (2).pdf
 
Breaking Barriers & Leveraging the Latest Developments in AI Technology
Breaking Barriers & Leveraging the Latest Developments in AI TechnologyBreaking Barriers & Leveraging the Latest Developments in AI Technology
Breaking Barriers & Leveraging the Latest Developments in AI Technology
 
Best Practices to Navigating Data and Application Integration for the Enterpr...
Best Practices to Navigating Data and Application Integration for the Enterpr...Best Practices to Navigating Data and Application Integration for the Enterpr...
Best Practices to Navigating Data and Application Integration for the Enterpr...
 
Cloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial DataCloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial Data
 
New Year's Fireside Chat with Safe Software’s Founders
New Year's Fireside Chat with Safe Software’s FoundersNew Year's Fireside Chat with Safe Software’s Founders
New Year's Fireside Chat with Safe Software’s Founders
 
Taking Off with FME: Elevating Airport Operations to New Heights
Taking Off with FME: Elevating Airport Operations to New HeightsTaking Off with FME: Elevating Airport Operations to New Heights
Taking Off with FME: Elevating Airport Operations to New Heights
 
Initiating and Advancing Your Strategic GIS Governance Strategy
Initiating and Advancing Your Strategic GIS Governance StrategyInitiating and Advancing Your Strategic GIS Governance Strategy
Initiating and Advancing Your Strategic GIS Governance Strategy
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
 

Recently uploaded

Popular Kala Jadu, Black magic expert in Karachi and Kala jadu expert in Laho...
Popular Kala Jadu, Black magic expert in Karachi and Kala jadu expert in Laho...Popular Kala Jadu, Black magic expert in Karachi and Kala jadu expert in Laho...
Popular Kala Jadu, Black magic expert in Karachi and Kala jadu expert in Laho...
baharayali
 
Real Kala Jadu, Black magic specialist in Lahore and Kala ilam expert in kara...
Real Kala Jadu, Black magic specialist in Lahore and Kala ilam expert in kara...Real Kala Jadu, Black magic specialist in Lahore and Kala ilam expert in kara...
Real Kala Jadu, Black magic specialist in Lahore and Kala ilam expert in kara...
baharayali
 
Certified Amil baba, Black magic specialist in Russia and Kala jadu expert in...
Certified Amil baba, Black magic specialist in Russia and Kala jadu expert in...Certified Amil baba, Black magic specialist in Russia and Kala jadu expert in...
Certified Amil baba, Black magic specialist in Russia and Kala jadu expert in...
makhmalhalaaay
 
Famous No -1 amil baba in Hyderabad ! Best No _ Astrologer in Pakistan, UK, A...
Famous No -1 amil baba in Hyderabad ! Best No _ Astrologer in Pakistan, UK, A...Famous No -1 amil baba in Hyderabad ! Best No _ Astrologer in Pakistan, UK, A...
Famous No -1 amil baba in Hyderabad ! Best No _ Astrologer in Pakistan, UK, A...
No -1 Astrologer ,Amil Baba In Australia | Uk | Usa | Canada | Pakistan
 
Verified Amil baba in Pakistan Amil baba in Islamabad Famous Amil baba in Ger...
Verified Amil baba in Pakistan Amil baba in Islamabad Famous Amil baba in Ger...Verified Amil baba in Pakistan Amil baba in Islamabad Famous Amil baba in Ger...
Verified Amil baba in Pakistan Amil baba in Islamabad Famous Amil baba in Ger...
Amil Baba Naveed Bangali
 
Authentic Black magic, Kala ilam expert in UAE and Kala ilam specialist in S...
Authentic Black magic, Kala ilam expert in UAE  and Kala ilam specialist in S...Authentic Black magic, Kala ilam expert in UAE  and Kala ilam specialist in S...
Authentic Black magic, Kala ilam expert in UAE and Kala ilam specialist in S...
baharayali
 

Recently uploaded (20)

Flores de Mayo-history and origin we need to understand
Flores de Mayo-history and origin we need to understandFlores de Mayo-history and origin we need to understand
Flores de Mayo-history and origin we need to understand
 
Popular Kala Jadu, Black magic expert in Karachi and Kala jadu expert in Laho...
Popular Kala Jadu, Black magic expert in Karachi and Kala jadu expert in Laho...Popular Kala Jadu, Black magic expert in Karachi and Kala jadu expert in Laho...
Popular Kala Jadu, Black magic expert in Karachi and Kala jadu expert in Laho...
 
The_Chronological_Life_of_Christ_Part_99_Words_and_Works
The_Chronological_Life_of_Christ_Part_99_Words_and_WorksThe_Chronological_Life_of_Christ_Part_99_Words_and_Works
The_Chronological_Life_of_Christ_Part_99_Words_and_Works
 
Emails, Facebook, WhatsApp and the Dhamma (English and Chinese).pdf
Emails, Facebook, WhatsApp and the Dhamma  (English and Chinese).pdfEmails, Facebook, WhatsApp and the Dhamma  (English and Chinese).pdf
Emails, Facebook, WhatsApp and the Dhamma (English and Chinese).pdf
 
Real Kala Jadu, Black magic specialist in Lahore and Kala ilam expert in kara...
Real Kala Jadu, Black magic specialist in Lahore and Kala ilam expert in kara...Real Kala Jadu, Black magic specialist in Lahore and Kala ilam expert in kara...
Real Kala Jadu, Black magic specialist in Lahore and Kala ilam expert in kara...
 
St. Louise de Marillac and Galley Prisoners
St. Louise de Marillac and Galley PrisonersSt. Louise de Marillac and Galley Prisoners
St. Louise de Marillac and Galley Prisoners
 
Certified Amil baba, Black magic specialist in Russia and Kala jadu expert in...
Certified Amil baba, Black magic specialist in Russia and Kala jadu expert in...Certified Amil baba, Black magic specialist in Russia and Kala jadu expert in...
Certified Amil baba, Black magic specialist in Russia and Kala jadu expert in...
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
 
From The Heart v8.pdf xxxxxxxxxxxxxxxxxxx
From The Heart v8.pdf xxxxxxxxxxxxxxxxxxxFrom The Heart v8.pdf xxxxxxxxxxxxxxxxxxx
From The Heart v8.pdf xxxxxxxxxxxxxxxxxxx
 
Famous No -1 amil baba in Hyderabad ! Best No _ Astrologer in Pakistan, UK, A...
Famous No -1 amil baba in Hyderabad ! Best No _ Astrologer in Pakistan, UK, A...Famous No -1 amil baba in Hyderabad ! Best No _ Astrologer in Pakistan, UK, A...
Famous No -1 amil baba in Hyderabad ! Best No _ Astrologer in Pakistan, UK, A...
 
St. Louise de Marillac and Care of the Sick Poor
St. Louise de Marillac and Care of the Sick PoorSt. Louise de Marillac and Care of the Sick Poor
St. Louise de Marillac and Care of the Sick Poor
 
MEIDUNIDADE COM JESUS PALESTRA ESPIRITA1.pptx
MEIDUNIDADE COM JESUS  PALESTRA ESPIRITA1.pptxMEIDUNIDADE COM JESUS  PALESTRA ESPIRITA1.pptx
MEIDUNIDADE COM JESUS PALESTRA ESPIRITA1.pptx
 
NoHo First Good News online newsletter May 2024
NoHo First Good News online newsletter May 2024NoHo First Good News online newsletter May 2024
NoHo First Good News online newsletter May 2024
 
Verified Amil baba in Pakistan Amil baba in Islamabad Famous Amil baba in Ger...
Verified Amil baba in Pakistan Amil baba in Islamabad Famous Amil baba in Ger...Verified Amil baba in Pakistan Amil baba in Islamabad Famous Amil baba in Ger...
Verified Amil baba in Pakistan Amil baba in Islamabad Famous Amil baba in Ger...
 
Genesis 1:5 - Meditate the Scripture Daily bit by bit
Genesis 1:5 - Meditate the Scripture Daily bit by bitGenesis 1:5 - Meditate the Scripture Daily bit by bit
Genesis 1:5 - Meditate the Scripture Daily bit by bit
 
Genesis 1:2 - Meditate the Scripture Daily bit by bit
Genesis 1:2 - Meditate the Scripture Daily bit by bitGenesis 1:2 - Meditate the Scripture Daily bit by bit
Genesis 1:2 - Meditate the Scripture Daily bit by bit
 
Genesis 1:8 || Meditate the Scripture daily verse by verse
Genesis 1:8  ||  Meditate the Scripture daily verse by verseGenesis 1:8  ||  Meditate the Scripture daily verse by verse
Genesis 1:8 || Meditate the Scripture daily verse by verse
 
Amil baba in Lahore /Amil baba in Karachi /Amil baba in Pakistan
Amil baba in Lahore /Amil baba in Karachi /Amil baba in PakistanAmil baba in Lahore /Amil baba in Karachi /Amil baba in Pakistan
Amil baba in Lahore /Amil baba in Karachi /Amil baba in Pakistan
 
"The Magnificent Surah Rahman: PDF Version"
"The Magnificent Surah Rahman: PDF Version""The Magnificent Surah Rahman: PDF Version"
"The Magnificent Surah Rahman: PDF Version"
 
Authentic Black magic, Kala ilam expert in UAE and Kala ilam specialist in S...
Authentic Black magic, Kala ilam expert in UAE  and Kala ilam specialist in S...Authentic Black magic, Kala ilam expert in UAE  and Kala ilam specialist in S...
Authentic Black magic, Kala ilam expert in UAE and Kala ilam specialist in S...
 

Python and FME REST

  • 1. Python and FME REST Rob Gaston Web Developer; FarallonGeographics, Inc. April 9, 2013
  • 2. San Francisco EAS  EAS is an open source system for maintaining address data  At the City and County of San Francisco, FME is being used to ETL parcel and street data used by EAS  EAS uses FME Server REST API to check the status of ETL jobs before staging new data
  • 3. EAS, Python and FME  EAS makes calls to FME Server REST API via automation scripts written in Python  Python is used in EAS both on the backend of the web application and for automation  To support automation of calls to FME Server REST services, we built a Python class (FmeServerHelper)
  • 4. Checking for an FME Workspace with Python  Without FmeServerHelper  With FmeServerHelper
  • 6. FmeServerHelper API  doesJobExist - Checks to see if FME workspace exists on this host  isJobRunning- Checks to see if FME workspace is currently running on this host  isJobQueued - Checks to see if FME workspace is currently queued to run on this host  getLatestCompletedJob - Gets the data from FME Server for the last job from a given workspace  getJobId- Gets the string id from a FME Server job  getJobStatus- Gets the string job status from a FME Server job Get the code: https://code.google.com/p/eas/source/browse/trunk/automation/src/fme_server_helper.py
  • 7. FmeServerHelper API Documentation  doesJobExist(jobDict) : Boolean  getLatestCompletedJob(jobDict) : Dict Checks to see if FME workspace exists on this host Gets the data from FME Server for the last job from a given PARAMETERS: workspace jobDict: Dict - a dictionary containing the workspace and repository PARAMETERS: names jobDict: Dict - a dictionary containing the workspace and repository RETURNS: names Boolean - the existence state of this workspace on this host RETURNS: Dict - a dictionary containing job data from FME Server  isJobRunning(jobDict) : Boolean Checks to see if FME workspace is currently running on this host  getJobId(job) : String PARAMETERS: Gets the string id from a FME Server job jobDict: Dict - a dictionary containing the workspace and repository PARAMETERS: names job: Dict - a dictionary containing job data from FME Server RETURNS: RETURNS: Boolean - the running state of this workspace on this host String - the job id  isJobQueued(jobDict) : Boolean  getJobStatus(job) : String Checks to see if FME workspace is currently queued to run on this Gets the string job status from a FME Server job host PARAMETERS: PARAMETERS: job: Dict - a dictionary containing job data from FME server jobDict: Dict - a dictionary containing the workspace and repository RETURNS: names String - the job status RETURNS: Boolean - the queued state of this workspace on this host Get the code: https://code.google.com/p/eas/source/browse/trunk/automation/src/fme_server_helper.py
  • 8. What’s Next…?  Following the principle of DTSTTCPW (do the simplest thing that could possibly work), FmeServerHelper only currently supports the use cases required by EAS  Since EAS is open source, anyone with the time and inclination to create a more complete API for working with FME Server can use fme_server_helper.py as a jumping off point  So… get to work and have fun!
  • 9. Thank You!  Questions?  For more information:  Rob Gaston, rgaston(at)fargeo(dot)com  FarallonGeographics, Inc.  http://www.fargeo.com/  https://code.google.com/p/eas/