SlideShare une entreprise Scribd logo
1  sur  14
Télécharger pour lire hors ligne
IKS Semantic Workshop
                  Amsterdam 2010



  FISE integration with
    Python and Plone

Jens W. Klein <jk@kleinundpartner.at>

            2010-12-09
                              Creative Commons Namensnennung-
                              Keine kommerzielle Nutzung-
               Page 1 of 14   Keine Bearbeitung 3.0 Österreich Lizenz
Who we are

●   Jens Klein
        –   Managing Director an founder of KUP
        –   Software Architect and FOSS Enthusiaist
●   KUP - Klein & Partner KG
        –   web technology agency based in Innsbruck (AT)
        –   focused on Python, App-Engine, BFG, Zope, Plone
        –   founding member of BlueDynamics Alliance
●   BlueDynamics Alliance
        –   cluster of seven companies in region D-A-CH

                                              Creative Commons Namensnennung-
                                              Keine kommerzielle Nutzung-
                            Page 2 of 14      Keine Bearbeitung 3.0 Österreich Lizenz
PYTHON

●   programming language
●   used by Google, NASA and many more
●   increasing number of users
●   interpreted language (byte-code compiler)
●   untyped, lean, easy-to-read and understand
●   functional, object-oriented programming
●   powerful standard library
●   thousands of addon libraries

                                       Creative Commons Namensnennung-
                                       Keine kommerzielle Nutzung-
                       Page 3 of 14    Keine Bearbeitung 3.0 Österreich Lizenz
ZOPE

●   Python Technology for Web Applications
●   Zope 2 Web Application Server
        –   more than 10 years old, but continiously
             modernized
●   Bluebream webapplication framework
        –   application related parts of former Zope 3
●   Zope Toolkit Library
        –   used/created by devs of Zope2, BlueBream, BFG
●   BFG/ Pylons Pyramid light weight web-app
    framework (related)
                                                Creative Commons Namensnennung-
                                                Keine kommerzielle Nutzung-
                            Page 4 of 14        Keine Bearbeitung 3.0 Österreich Lizenz
PLONE

●   Web Content Management System
       –   built on top of Zope 2
       –   large community with >200 core contributors, in
             top 3% of FOSS-communities
       –   trademark and IP managed by non-profit
             Plone Foundation
       –   excellent security record
       –   common WebCMS with focus on users/usability,
             scalability
       –   addons and plugins for hundreds of use-cases

                                             Creative Commons Namensnennung-
                                             Keine kommerzielle Nutzung-
                           Page 5 of 14      Keine Bearbeitung 3.0 Österreich Lizenz
bring FISE to the Plone
                                    Community:
                               Conference 2010
●   Talk at Plone Conference 2010/ Bristol
        –   recorded at
              http://ploneconference2010.blip.tv/file/4317791
●   Open Space Session on Semantics in Plone
●   One Day Sprint (aka Hackathon) on FISE




                                               Creative Commons Namensnennung-
                                               Keine kommerzielle Nutzung-
                            Page 6 of 14       Keine Bearbeitung 3.0 Österreich Lizenz
FISE Python API
                                                 Goals
●   offer a pythonic API to all FISE features exposed
    by its RESTFul API
●   hide as much as possible the HTTP aspect
●   use a widely used, well tested and scaleable
    foss-library for RESTFul http connections
●   full test coverage with Python doctests
●   provide an zc.buildout based installation which
    includes FISE itself and the tests


                                              Creative Commons Namensnennung-
                                              Keine kommerzielle Nutzung-
                        Page 7 of 14          Keine Bearbeitung 3.0 Österreich Lizenz
FISE Python-API
                                              fise.client

Wanna smell code? Doctest style:
FISE „engines“

1   >>> from fise.client import FISE
2   >>> fise = FISE('http://localhost:8080/')
3   >>> somedoc = u"This is an example text."
4   >>> fise.engines(somedoc)
5   '<rdf:RDF...</rdf:RDF>n'
6 >>> fise.engines(somedoc, format='rdfjson')
7 '{"...}'
8 >>> fise.engines(somedoc, parsed=True)
9 <Graph identifier=... (<class 'rdflib.Graph.Graph'>)>

                                                Creative Commons Namensnennung-
                                                Keine kommerzielle Nutzung-
                         Page 8 of 14           Keine Bearbeitung 3.0 Österreich Lizenz
FISE Python-API
                                             fise.client

FISE „store“

1   >>> generated_id = fise.store.add(somedoc)
2   >>> fise.store[existing_id] = somedoc
3   >>> fise.store[generated_id] == somedoc
4   True
5 >>> fise.store.metadata(existing_id)
6 '<rdf:RDF...</rdf:RDF>n'
7 >>> fise.store.metadata(existing_id, parsed=True)
8 <Graph identifie... (<class 'rdflib.Graph.Graph'>)>
 9 >>> fise.store.page(generated_id)
10 '<html>...</html>'

                                               Creative Commons Namensnennung-
                                               Keine kommerzielle Nutzung-
                        Page 9 of 14           Keine Bearbeitung 3.0 Österreich Lizenz
FISE Python API
                      Implementation Details
●   uses restkit as rest library
●   uses rdflib to transform results to Python object
    graphs,
●   uses SuRF library (on top of rdflib) for Sparql
    queries.
●   code at http://github.com/collective/fise.client
●   integration buildout at
    http://github.com/collective/fise-buildout


                                          Creative Commons Namensnennung-
                                          Keine kommerzielle Nutzung-
                         Page 10 of 14    Keine Bearbeitung 3.0 Österreich Lizenz
fise.client
                                        code location
●   Python-API
    http://github.com/collective/fise.client
●   Python Integration Buildout
    http://github.com/collective/fise-buildout
●   Plone Integration Package
    http://github.com/collective/fise.plone




                                             Creative Commons Namensnennung-
                                             Keine kommerzielle Nutzung-
                        Page 11 of 14        Keine Bearbeitung 3.0 Österreich Lizenz
Plone Integration

Work done so far:
●   „indexing“ in FISE after creation and changes of
    content-objects.
Whats missing?
●   query facility
        –   Zope plugin index to FISE sparql endpoint
        –   Integration with Collections
●   passing the site-structure and DC to FISE.
●   asynchronous processing
                                               Creative Commons Namensnennung-
                                               Keine kommerzielle Nutzung-
                            Page 12 of 14      Keine Bearbeitung 3.0 Österreich Lizenz
Plone Demo




DEMO TIME




                     Creative Commons Namensnennung-
                     Keine kommerzielle Nutzung-
  Page 13 of 14      Keine Bearbeitung 3.0 Österreich Lizenz
The End




Questions

 Answers

Discussions


                  Creative Commons Namensnennung-
                  Keine kommerzielle Nutzung-
  Page 14 of 14   Keine Bearbeitung 3.0 Österreich Lizenz

Contenu connexe

Tendances

Madrid .NET Meetup: Microsoft open sources .NET!
Madrid .NET Meetup: Microsoft open sources .NET!Madrid .NET Meetup: Microsoft open sources .NET!
Madrid .NET Meetup: Microsoft open sources .NET!
Alfonso Garcia-Caro
 

Tendances (20)

Last Month in PHP - March 2016
Last Month in PHP - March 2016Last Month in PHP - March 2016
Last Month in PHP - March 2016
 
Developing web APIs using middleware in PHP 7
Developing web APIs using middleware in PHP 7Developing web APIs using middleware in PHP 7
Developing web APIs using middleware in PHP 7
 
Middleware web APIs in PHP 7.x
Middleware web APIs in PHP 7.xMiddleware web APIs in PHP 7.x
Middleware web APIs in PHP 7.x
 
Madrid .NET Meetup: Microsoft open sources .NET!
Madrid .NET Meetup: Microsoft open sources .NET!Madrid .NET Meetup: Microsoft open sources .NET!
Madrid .NET Meetup: Microsoft open sources .NET!
 
Pulp 3 - Simpler, Better, More awesome
Pulp 3 - Simpler, Better, More awesomePulp 3 - Simpler, Better, More awesome
Pulp 3 - Simpler, Better, More awesome
 
GIT pour développeur
GIT pour développeurGIT pour développeur
GIT pour développeur
 
How we do python
How we do pythonHow we do python
How we do python
 
Http2 on go1.6rc2
Http2 on go1.6rc2Http2 on go1.6rc2
Http2 on go1.6rc2
 
Why and what is go
Why and what is goWhy and what is go
Why and what is go
 
Buildout: creating and deploying repeatable applications in python
Buildout: creating and deploying repeatable applications in pythonBuildout: creating and deploying repeatable applications in python
Buildout: creating and deploying repeatable applications in python
 
IPSEC
IPSECIPSEC
IPSEC
 
Conda - alternative packaging for scientific computing
Conda - alternative packaging for scientific computingConda - alternative packaging for scientific computing
Conda - alternative packaging for scientific computing
 
Working with npm packages
Working with npm packagesWorking with npm packages
Working with npm packages
 
NPM THE GUIDE
NPM THE GUIDENPM THE GUIDE
NPM THE GUIDE
 
Go & multi platform GUI Trials and Errors
Go & multi platform GUI Trials and ErrorsGo & multi platform GUI Trials and Errors
Go & multi platform GUI Trials and Errors
 
Lua
LuaLua
Lua
 
Salt and pepper — native code in the browser Browser using Google native Client
Salt and pepper — native code in the browser Browser using Google native ClientSalt and pepper — native code in the browser Browser using Google native Client
Salt and pepper — native code in the browser Browser using Google native Client
 
Tearing down the //build/ 2016 conference
Tearing down the //build/ 2016 conferenceTearing down the //build/ 2016 conference
Tearing down the //build/ 2016 conference
 
Cape Cod Web Technology Meetup - 3
Cape Cod Web Technology Meetup - 3Cape Cod Web Technology Meetup - 3
Cape Cod Web Technology Meetup - 3
 
Elastic network of things with mqtt and micro python
Elastic network of things with mqtt and micro pythonElastic network of things with mqtt and micro python
Elastic network of things with mqtt and micro python
 

En vedette

YAFOWIL - Webformulare in Python ohne Kopfschmerzen
YAFOWIL - Webformulare in Python ohne KopfschmerzenYAFOWIL - Webformulare in Python ohne Kopfschmerzen
YAFOWIL - Webformulare in Python ohne Kopfschmerzen
Jens Klein
 

En vedette (8)

cornerstone.soup Lighning Talk on Plone Conference 2009
cornerstone.soup Lighning Talk on Plone Conference 2009cornerstone.soup Lighning Talk on Plone Conference 2009
cornerstone.soup Lighning Talk on Plone Conference 2009
 
Ausfallsichere Kultur mit Plone
Ausfallsichere Kultur mit PloneAusfallsichere Kultur mit Plone
Ausfallsichere Kultur mit Plone
 
Plone is so semantic, isn't it?
Plone is so semantic,  isn't it?Plone is so semantic,  isn't it?
Plone is so semantic, isn't it?
 
YAFOWIL - Webformulare in Python ohne Kopfschmerzen
YAFOWIL - Webformulare in Python ohne KopfschmerzenYAFOWIL - Webformulare in Python ohne Kopfschmerzen
YAFOWIL - Webformulare in Python ohne Kopfschmerzen
 
Plone Einführung
Plone EinführungPlone Einführung
Plone Einführung
 
Projekte mit Plone
Projekte mit PloneProjekte mit Plone
Projekte mit Plone
 
Was ist Plone?
Was ist Plone?Was ist Plone?
Was ist Plone?
 
Schlangenhochzeit in-der Wolke - Pyramid auf Google Appengine
Schlangenhochzeit in-der Wolke - Pyramid auf Google AppengineSchlangenhochzeit in-der Wolke - Pyramid auf Google Appengine
Schlangenhochzeit in-der Wolke - Pyramid auf Google Appengine
 

Similaire à FISE Integration with Python and Plone

Similaire à FISE Integration with Python and Plone (20)

OpenNTF Webinar 05/07/13: OpenNTF - The IBM Collaboration Solutions App Dev C...
OpenNTF Webinar 05/07/13: OpenNTF - The IBM Collaboration Solutions App Dev C...OpenNTF Webinar 05/07/13: OpenNTF - The IBM Collaboration Solutions App Dev C...
OpenNTF Webinar 05/07/13: OpenNTF - The IBM Collaboration Solutions App Dev C...
 
Discovery the p2 API (updated to Indigo)
Discovery the p2 API (updated to Indigo)Discovery the p2 API (updated to Indigo)
Discovery the p2 API (updated to Indigo)
 
Introduction To Python
Introduction To PythonIntroduction To Python
Introduction To Python
 
Summer Training Project.pdf
Summer Training Project.pdfSummer Training Project.pdf
Summer Training Project.pdf
 
CTE 323 - Lecture 1.pptx
CTE 323 - Lecture 1.pptxCTE 323 - Lecture 1.pptx
CTE 323 - Lecture 1.pptx
 
Ny symfony meetup may 2015
Ny symfony meetup may 2015Ny symfony meetup may 2015
Ny symfony meetup may 2015
 
Multimedia in Plone - Andy Nicholson
Multimedia in Plone - Andy NicholsonMultimedia in Plone - Andy Nicholson
Multimedia in Plone - Andy Nicholson
 
Frappe framework
Frappe framework Frappe framework
Frappe framework
 
Managing Plone Projects with Perl and Subversion
Managing Plone Projects with Perl and SubversionManaging Plone Projects with Perl and Subversion
Managing Plone Projects with Perl and Subversion
 
Overview of Python Development
Overview of Python DevelopmentOverview of Python Development
Overview of Python Development
 
Rapid Web Development with Python for Absolute Beginners
Rapid Web Development with Python for Absolute BeginnersRapid Web Development with Python for Absolute Beginners
Rapid Web Development with Python for Absolute Beginners
 
conjoon - The Open Source Webmail Client
conjoon - The Open Source Webmail Clientconjoon - The Open Source Webmail Client
conjoon - The Open Source Webmail Client
 
Python Web Framework – A Detailed List of Web Frameworks in Python
Python Web Framework – A Detailed List of Web Frameworks in PythonPython Web Framework – A Detailed List of Web Frameworks in Python
Python Web Framework – A Detailed List of Web Frameworks in Python
 
Build Real-World Mobile Applications With Python App Development Services Com...
Build Real-World Mobile Applications With Python App Development Services Com...Build Real-World Mobile Applications With Python App Development Services Com...
Build Real-World Mobile Applications With Python App Development Services Com...
 
introduction to Python (for beginners)
introduction to Python (for beginners)introduction to Python (for beginners)
introduction to Python (for beginners)
 
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
 
HPC Workbench Presentation
HPC Workbench PresentationHPC Workbench Presentation
HPC Workbench Presentation
 
Web Technologies in Automotive & Robotics (BlinkOn 10)
Web Technologies in Automotive & Robotics (BlinkOn 10)Web Technologies in Automotive & Robotics (BlinkOn 10)
Web Technologies in Automotive & Robotics (BlinkOn 10)
 
PHP programmimg
PHP programmimgPHP programmimg
PHP programmimg
 
A complete guide to Python app development.pdf
A complete guide to Python app development.pdfA complete guide to Python app development.pdf
A complete guide to Python app development.pdf
 

Plus de Jens Klein (6)

RelStorage Plone Zope RDB Storage Backend
RelStorage Plone Zope RDB Storage BackendRelStorage Plone Zope RDB Storage Backend
RelStorage Plone Zope RDB Storage Backend
 
Plone Performance, Profiling, Power-Consumption
Plone Performance, Profiling, Power-ConsumptionPlone Performance, Profiling, Power-Consumption
Plone Performance, Profiling, Power-Consumption
 
RelStorage - an alternative ZODB Backend
RelStorage - an alternative ZODB BackendRelStorage - an alternative ZODB Backend
RelStorage - an alternative ZODB Backend
 
AGX - Tree Transformations with Python - Lightning Talk at Plone Conference 2009
AGX - Tree Transformations with Python - Lightning Talk at Plone Conference 2009AGX - Tree Transformations with Python - Lightning Talk at Plone Conference 2009
AGX - Tree Transformations with Python - Lightning Talk at Plone Conference 2009
 
Plone - Community, Entwicklung, Support
Plone - Community, Entwicklung, SupportPlone - Community, Entwicklung, Support
Plone - Community, Entwicklung, Support
 
Plone Conference 2007 Naples: Lightning Talk Daidalos
Plone Conference 2007 Naples: Lightning Talk DaidalosPlone Conference 2007 Naples: Lightning Talk Daidalos
Plone Conference 2007 Naples: Lightning Talk Daidalos
 

FISE Integration with Python and Plone

  • 1. IKS Semantic Workshop Amsterdam 2010 FISE integration with Python and Plone Jens W. Klein <jk@kleinundpartner.at> 2010-12-09 Creative Commons Namensnennung- Keine kommerzielle Nutzung- Page 1 of 14 Keine Bearbeitung 3.0 Österreich Lizenz
  • 2. Who we are ● Jens Klein – Managing Director an founder of KUP – Software Architect and FOSS Enthusiaist ● KUP - Klein & Partner KG – web technology agency based in Innsbruck (AT) – focused on Python, App-Engine, BFG, Zope, Plone – founding member of BlueDynamics Alliance ● BlueDynamics Alliance – cluster of seven companies in region D-A-CH Creative Commons Namensnennung- Keine kommerzielle Nutzung- Page 2 of 14 Keine Bearbeitung 3.0 Österreich Lizenz
  • 3. PYTHON ● programming language ● used by Google, NASA and many more ● increasing number of users ● interpreted language (byte-code compiler) ● untyped, lean, easy-to-read and understand ● functional, object-oriented programming ● powerful standard library ● thousands of addon libraries Creative Commons Namensnennung- Keine kommerzielle Nutzung- Page 3 of 14 Keine Bearbeitung 3.0 Österreich Lizenz
  • 4. ZOPE ● Python Technology for Web Applications ● Zope 2 Web Application Server – more than 10 years old, but continiously modernized ● Bluebream webapplication framework – application related parts of former Zope 3 ● Zope Toolkit Library – used/created by devs of Zope2, BlueBream, BFG ● BFG/ Pylons Pyramid light weight web-app framework (related) Creative Commons Namensnennung- Keine kommerzielle Nutzung- Page 4 of 14 Keine Bearbeitung 3.0 Österreich Lizenz
  • 5. PLONE ● Web Content Management System – built on top of Zope 2 – large community with >200 core contributors, in top 3% of FOSS-communities – trademark and IP managed by non-profit Plone Foundation – excellent security record – common WebCMS with focus on users/usability, scalability – addons and plugins for hundreds of use-cases Creative Commons Namensnennung- Keine kommerzielle Nutzung- Page 5 of 14 Keine Bearbeitung 3.0 Österreich Lizenz
  • 6. bring FISE to the Plone Community: Conference 2010 ● Talk at Plone Conference 2010/ Bristol – recorded at http://ploneconference2010.blip.tv/file/4317791 ● Open Space Session on Semantics in Plone ● One Day Sprint (aka Hackathon) on FISE Creative Commons Namensnennung- Keine kommerzielle Nutzung- Page 6 of 14 Keine Bearbeitung 3.0 Österreich Lizenz
  • 7. FISE Python API Goals ● offer a pythonic API to all FISE features exposed by its RESTFul API ● hide as much as possible the HTTP aspect ● use a widely used, well tested and scaleable foss-library for RESTFul http connections ● full test coverage with Python doctests ● provide an zc.buildout based installation which includes FISE itself and the tests Creative Commons Namensnennung- Keine kommerzielle Nutzung- Page 7 of 14 Keine Bearbeitung 3.0 Österreich Lizenz
  • 8. FISE Python-API fise.client Wanna smell code? Doctest style: FISE „engines“ 1 >>> from fise.client import FISE 2 >>> fise = FISE('http://localhost:8080/') 3 >>> somedoc = u"This is an example text." 4 >>> fise.engines(somedoc) 5 '<rdf:RDF...</rdf:RDF>n' 6 >>> fise.engines(somedoc, format='rdfjson') 7 '{"...}' 8 >>> fise.engines(somedoc, parsed=True) 9 <Graph identifier=... (<class 'rdflib.Graph.Graph'>)> Creative Commons Namensnennung- Keine kommerzielle Nutzung- Page 8 of 14 Keine Bearbeitung 3.0 Österreich Lizenz
  • 9. FISE Python-API fise.client FISE „store“ 1 >>> generated_id = fise.store.add(somedoc) 2 >>> fise.store[existing_id] = somedoc 3 >>> fise.store[generated_id] == somedoc 4 True 5 >>> fise.store.metadata(existing_id) 6 '<rdf:RDF...</rdf:RDF>n' 7 >>> fise.store.metadata(existing_id, parsed=True) 8 <Graph identifie... (<class 'rdflib.Graph.Graph'>)> 9 >>> fise.store.page(generated_id) 10 '<html>...</html>' Creative Commons Namensnennung- Keine kommerzielle Nutzung- Page 9 of 14 Keine Bearbeitung 3.0 Österreich Lizenz
  • 10. FISE Python API Implementation Details ● uses restkit as rest library ● uses rdflib to transform results to Python object graphs, ● uses SuRF library (on top of rdflib) for Sparql queries. ● code at http://github.com/collective/fise.client ● integration buildout at http://github.com/collective/fise-buildout Creative Commons Namensnennung- Keine kommerzielle Nutzung- Page 10 of 14 Keine Bearbeitung 3.0 Österreich Lizenz
  • 11. fise.client code location ● Python-API http://github.com/collective/fise.client ● Python Integration Buildout http://github.com/collective/fise-buildout ● Plone Integration Package http://github.com/collective/fise.plone Creative Commons Namensnennung- Keine kommerzielle Nutzung- Page 11 of 14 Keine Bearbeitung 3.0 Österreich Lizenz
  • 12. Plone Integration Work done so far: ● „indexing“ in FISE after creation and changes of content-objects. Whats missing? ● query facility – Zope plugin index to FISE sparql endpoint – Integration with Collections ● passing the site-structure and DC to FISE. ● asynchronous processing Creative Commons Namensnennung- Keine kommerzielle Nutzung- Page 12 of 14 Keine Bearbeitung 3.0 Österreich Lizenz
  • 13. Plone Demo DEMO TIME Creative Commons Namensnennung- Keine kommerzielle Nutzung- Page 13 of 14 Keine Bearbeitung 3.0 Österreich Lizenz
  • 14. The End Questions Answers Discussions Creative Commons Namensnennung- Keine kommerzielle Nutzung- Page 14 of 14 Keine Bearbeitung 3.0 Österreich Lizenz