NOTE: This is still experimental. Do not use in production.
This package is an abstration of the Typed PID Maker API, making usage via python simple. It contains an automatically generated (using openapi-generator) abstraction layer in the module pytypid_generated_client, and some hand-written, high-level extensions or utilities in pytypid.
The Typed PID Maker is a service for creating, updating, obtaining and validating PID record information using Kernel Information Profiles, as defined by the Research Data Alliance.
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 2.0.0
- Package version: 0.2.0
- Generator version: 7.14.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://github.com/kit-data-manager
Python 3.9+
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)
Then import the package:
import pytypid_generated_clientInstall via Setuptools.
python setup.py install --user(or sudo python setup.py install to install the package for all users)
Then import the package:
import pytypid_generated_clientExecute pytest to run the tests.
Please follow the installation procedure and then run the following:
import pytypid_generated_client
from pytypid_generated_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://typed-pid-maker.datamanager.kit.edu/preview
# See configuration.py for a list of all supported configuration parameters.
configuration = pytypid_generated_client.Configuration(
host = "http://typed-pid-maker.datamanager.kit.edu/preview"
)
# Enter a context with an instance of the API client
with pytypid_generated_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pytypid_generated_client.ActuatorApi(api_client)
try:
# Actuator web endpoint 'health'
api_response = api_instance.health()
print("The response of ActuatorApi->health:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling ActuatorApi->health: %s\n" % e)All URIs are relative to http://typed-pid-maker.datamanager.kit.edu/preview
| Class | Method | HTTP request | Description |
|---|---|---|---|
| ActuatorApi | health | GET /actuator/health | Actuator web endpoint 'health' |
| ActuatorApi | info | GET /actuator/info | Actuator web endpoint 'info' |
| ActuatorApi | links | GET /actuator | Actuator root web endpoint |
| PIDManagementApi | create_pid | POST /api/v1/pit/pid/ | Create a new PID record |
| PIDManagementApi | create_pids | POST /api/v1/pit/pids | Create a multiple, possibly related PID records |
| PIDManagementApi | find_all | GET /api/v1/pit/known-pid | Returns all known PIDs. Supports paging, filtering criteria, and different formats. |
| PIDManagementApi | find_by_pid | GET /api/v1/pit/known-pid/** | Returns a PID and its timestamps from the local store, if available. |
| PIDManagementApi | get_record | GET /api/v1/pit/pid/** | Get the record of the given PID. |
| PIDManagementApi | update_pid | PUT /api/v1/pit/pid/** | Update an existing PID record |
- BatchRecordResponse
- FindAll200Response
- KnownPid
- Link
- PIDRecord
- PIDRecordEntry
- SimplePair
- SimplePidRecord
- TabulatorPaginationFormat
- TabulatorPaginationFormatKnownPid
Authentication schemes defined for the API:
- Type: Bearer authentication (JWT)