Skip to content

Templates

Templates

Bases: Endpoint

Queries templates/ endpoints

Functions

get()

Queries templates/

Returns:

Name Type Description
Response list

A list containing all the templates present in the database

Examples:

>>> import pyconceptlibraryclient
>>> client = Client(public=False)
>>> client.templates.get()

get_detail(id, version_id=None)

Queries templates/{id}/detail/ or templates/{id}/versions/{version_id}/detail/ if version_id is supplied

Parameters:

Name Type Description Default
id int

Template ID

required
version_id int

Version ID

None

Returns:

Name Type Description
Response list

Details of queried template

Examples:

>>> import pyconceptlibraryclient
>>> client = Client(public=False)
>>> # Get detail of a template
>>> client.templates.get_detail(1)
>>> # Get detail of a template with specific version
>>> client.templates.get_detail(1, version_id=1)

get_versions(id)

Queries templates/{id}/get-versions/

Parameters:

Name Type Description Default
id int

Template ID

required

Returns:

Name Type Description
Response list

Version list of queried template

Examples:

>>> import pyconceptlibraryclient
>>> client = Client(public=False)
>>> client.templates.get_versions(1)