際際滷

際際滷Share a Scribd company logo
PyOSLC
The Python SDK for OSLC APIs
Mario Jim辿nez Carrasco
Senior Developer at Koneksys
OSLC FEST
May 19, 2020
Who am I ?
2
Mario Jim辿nez Carrasco
Senior Developer at Koneksys
Backend developer with Java & Python 
Worked with JAX-RS, Spring, Flask among others to
develop REST services for OSLC, Linked Data solutions
and integration with IBM CLM applications such as DNG,
RQM, RTC.
email: mario.carrasco@koneksys.com
PyOSLC Architecture
3
Data
GET
POST
PUT
DELETE
OSLC API
Client
Request
Response/Body
in RDFRDF Lib
Python
Example Data: CSV Files About Requirements
4
Data
= Multiple CSV files
GET
POST
PUT
DELETE
OSLC API
Client
CSV
OSLC Core Resources
5
Data = Multiple CSV
files
GET
POST
PUT
DELETE
Mapping between Data and OSLC Concepts
6
CSV
One cvs file corresponds to
one container, aka OSLC
ServiceProvider
One row in the csv file describes one
requirement, aka OSLC Resource
Curl for GET on SPC
OSLC Service Provider Catalog
7
Curl for GET on query resource
GET All Requirements Request
8
Curl for GET on requirement
GET Speci鍖c Requirement Request
9
The RDF representation of requirements comply with the OSLC speci鍖cation for
Requirement Management.
RM spec
10
PyOSLC requires some topics for the implementation of an OSLC API
- OSLC resource types described as Python classes and objects
- Python objects need to translated to RDF
- Decoration of classes and methods for using the Swagger doc for simpler OSLC
API consumption
Implementation topic
11
The PyOSLC contains decorators (annotations) which are used to generate the
Open API spec, from which the HTML doc is generated.
Swagger Doc
12
OSLC Resources described as Python Classes
13
The PyOSLC project de鍖nes the classes
required to implement an OSLC
Resource Classes
OSLC Requirement Resources described as Python Class
14
The PyOSLC project de鍖nes the classes
required to implement an OSLC
Resource Classes
RDF Vocabularies as Python Closed List
15
The PyOSLC project de鍖nes the vocabularies required
for managing the concepts de鍖ned by the speci鍖cation.
OSLC Core / RM
vocabulary
Mapping
16
Requirement /
Speci鍖cation
attributes
Dictionary to create a relation
between the external data
attributes with the de鍖ned
resource attributes, here is an
example for mapping
Requirement.
Translation of Python objects to RDF
17
Python object OSLC - RDF/XML
Transformation from Python to RDF
18
The capability to (un-)marshalling from python objects to RDF and vice versa.
Here is an example of how the requirement loaded from the CSV 鍖le is converted
from a Speci鍖cation into a Requirement.
Python Objects
Python Object RDF(un-)marshalling method
Next Steps
19
Rootservices
Implementation
of elements to
add a PyOSLC
API as a friend or
consumer.
Service Provider
Speci鍖c Domain
for managing
resources,
example:
Requirements.
Authentication
Enable OAuth for
managing
authentication to
interact with Jazz
Delegated Dialog
Integration of
Delegated
Dialogs to show
resources with
the Jazz
applications.
Final Goal
Open Source release
20
Thanks!!
Does anyone have any questions?
mario.carrasco@koneksys.com

More Related Content

PyOSLC SDK - OSLCFEST

  • 1. PyOSLC The Python SDK for OSLC APIs Mario Jim辿nez Carrasco Senior Developer at Koneksys OSLC FEST May 19, 2020
  • 2. Who am I ? 2 Mario Jim辿nez Carrasco Senior Developer at Koneksys Backend developer with Java & Python Worked with JAX-RS, Spring, Flask among others to develop REST services for OSLC, Linked Data solutions and integration with IBM CLM applications such as DNG, RQM, RTC. email: mario.carrasco@koneksys.com
  • 4. Example Data: CSV Files About Requirements 4 Data = Multiple CSV files GET POST PUT DELETE OSLC API Client CSV
  • 5. OSLC Core Resources 5 Data = Multiple CSV files GET POST PUT DELETE
  • 6. Mapping between Data and OSLC Concepts 6 CSV One cvs file corresponds to one container, aka OSLC ServiceProvider One row in the csv file describes one requirement, aka OSLC Resource
  • 7. Curl for GET on SPC OSLC Service Provider Catalog 7
  • 8. Curl for GET on query resource GET All Requirements Request 8
  • 9. Curl for GET on requirement GET Speci鍖c Requirement Request 9
  • 10. The RDF representation of requirements comply with the OSLC speci鍖cation for Requirement Management. RM spec 10
  • 11. PyOSLC requires some topics for the implementation of an OSLC API - OSLC resource types described as Python classes and objects - Python objects need to translated to RDF - Decoration of classes and methods for using the Swagger doc for simpler OSLC API consumption Implementation topic 11
  • 12. The PyOSLC contains decorators (annotations) which are used to generate the Open API spec, from which the HTML doc is generated. Swagger Doc 12
  • 13. OSLC Resources described as Python Classes 13 The PyOSLC project de鍖nes the classes required to implement an OSLC Resource Classes
  • 14. OSLC Requirement Resources described as Python Class 14 The PyOSLC project de鍖nes the classes required to implement an OSLC Resource Classes
  • 15. RDF Vocabularies as Python Closed List 15 The PyOSLC project de鍖nes the vocabularies required for managing the concepts de鍖ned by the speci鍖cation. OSLC Core / RM vocabulary
  • 16. Mapping 16 Requirement / Speci鍖cation attributes Dictionary to create a relation between the external data attributes with the de鍖ned resource attributes, here is an example for mapping Requirement.
  • 17. Translation of Python objects to RDF 17 Python object OSLC - RDF/XML
  • 18. Transformation from Python to RDF 18 The capability to (un-)marshalling from python objects to RDF and vice versa. Here is an example of how the requirement loaded from the CSV 鍖le is converted from a Speci鍖cation into a Requirement. Python Objects Python Object RDF(un-)marshalling method
  • 19. Next Steps 19 Rootservices Implementation of elements to add a PyOSLC API as a friend or consumer. Service Provider Speci鍖c Domain for managing resources, example: Requirements. Authentication Enable OAuth for managing authentication to interact with Jazz Delegated Dialog Integration of Delegated Dialogs to show resources with the Jazz applications. Final Goal Open Source release
  • 20. 20 Thanks!! Does anyone have any questions? mario.carrasco@koneksys.com