Goal
Add support for creating “plugins” for tapipy providing additional pieces of functionality integrated with the rest of the tapipy core but living in their own repositories and with their own additional (python) dependencies.
Examples of Plugins
Throughout the text, we assume t = Tapis(...) has been instantiated as usual.
sgci-resources
Provides utilities for working with sgci resource descriptions in Tapis.
Example functionality:
t.systems.create_from_sgci_resource(**kwargs) - Create a Tapis system based on an SGCI resource.
t.systems.put_from_sgci_resource(system_id=’..’, **kwargs) - Update a Tapis system definition based on an SGCI resource.
t.systems.push_to_sgci(system_id=’..’, sgci_resource_url=’..’, **kwargs) - Push a Tapis system description to an SGCI resource repository.
Additional Dependencies:
SGCI python sdk.
Git python sdk?
tapis-service
Provides utilities for writing Tapis services in Python.
Can have modules for different web frameworks defined by an interface; e.g.,
tapisflask.py (flask python package)
tapisdjango.py
tapisfastapi.py
Example functionality
t.get_service_tokens()
t...determine_tenant_id_for_service_request()
t...determine_user_for_service_request()
Note: these are both currently called from within the t...call() method
Note: both functions currently try to import the flask thread local (the flask.g object) to look for request headers (e.g., X-Tapis-Tenant).
t.tenant_cache - An object that manages the tenant registry. This is marginally used for “users” to look up the tenant_id or base_url when only one or the other is provided in the Tapis() constructor, but it is used heavily by services to look up sites and tenants information.
There is currently a Tenants() manager in flaskbase, and services often subclass it to add
Most (all?) of the functions in flaskbase could also go here, e.g.,
auth.get_service_tapis_client()
auth.Tenants -- Tenant manager class
3rd party APIs (tapis-icicle, tapis-a2cps, tapis-wma)
Support for additional APIs defined outside of the core Tapis project.
Example functionality
t.models.list_models() -- Work with the new Model Commons API
t.kgs.query(kg_id=’...’) -- Query a knowledge graph.
t.projects.get_project_mounts(...) - Work with WMA’s Projects API
Goal Add support for creating “plugins” for tapipy providing additional pieces of functionality integrated with the rest of the tapipy core but living in their own repositories and with their own additional (python) dependencies.
Examples of Plugins Throughout the text, we assume t = Tapis(...) has been instantiated as usual.
sgci-resources Provides utilities for working with sgci resource descriptions in Tapis. Example functionality:
Additional Dependencies:
tapis-service Provides utilities for writing Tapis services in Python. Can have modules for different web frameworks defined by an interface; e.g.,
Example functionality
Most (all?) of the functions in flaskbase could also go here, e.g.,
3rd party APIs (tapis-icicle, tapis-a2cps, tapis-wma) Support for additional APIs defined outside of the core Tapis project. Example functionality