<jupyter_start><jupyter_text>KLIFS APICheck out result values when using KLIFS API:https://klifs.vu-compmedchem.nl/swagger/<jupyter_code>from bravado.client import SwaggerClient
from bravado_core.exception import SwaggerMappingError

KLIFS_API_DEFINITIONS = "http://klifs.vu-compmedchem.nl/swagger/swagger.json"
KLIFS_CLIENT = SwaggerClient.from_url(
    KLIFS_API_DEFINITIONS, config={"validate_responses": False}
)
def print_result(result):
    """Use when result is a list."""
    if isinstance(result, list):
        print("Result type:", type(result))
        print("Number of list items:", len(result))
        print("List item type:", type(result[0]))
        print("First list item:", result[0])
    if isinstance(result, str):
        print("Result type:", type(result))<jupyter_output><empty_output><jupyter_text>Information<jupyter_code>result = KLIFS_CLIENT.Information.get_kinase_groups().response().result
print_result(result)
result = KLIFS_CLIENT.Information.get_kinase_families().response().result
print_result(result)
type(int)
result = KLIFS_CLIENT.Information.get_kinase_names().response().result
print_result(result)
result = KLIFS_CLIENT.Information.get_kinase_information(kinase_ID=[33]).response().result
print_result(result)
result = KLIFS_CLIENT.Information.get_kinase_ID(kinase_name="EGFR").response().result
print_result(result)<jupyter_output>Result type: <class 'list'>
Number of list items: 2
List item type: <class 'abc.KinaseInformation'>
First list item: KinaseInformation(HGNC='EGFR', family='EGFR', full_name='epidermal growth factor receptor', group='TK', iuphar=1797, kinase_ID=406, kinase_class='', name='EGFR', pocket='KVLGSGAFGTVYKVAIKELEILDEAYVMASVDPHVCRLLGIQLITQLMPFGCLLDYVREYLEDRRLVHRDLAARNVLVITDFGLA', species='Human', uniprot='P00533')<jupyter_text>Interactions<jupyter_code>result = KLIFS_CLIENT.Interactions.get_interactions_get_types().response().result
print_result(result)
result = KLIFS_CLIENT.Interactions.get_interactions_get_IFP(structure_ID=[33]).response().result
print_result(result)
result = KLIFS_CLIENT.Interactions.get_interactions_match_residues(structure_ID=33).response().result
print_result(result)<jupyter_output>Result type: <class 'list'>
Number of list items: 85
List item type: <class 'dict'>
First list item: {'index': 1, 'Xray_position': '367', 'KLIFS_position': 'I.1'}<jupyter_text>Ligands<jupyter_code>result = KLIFS_CLIENT.Ligands.get_ligands_list(kinase_ID=[22]).response().result
print_result(result)
result = KLIFS_CLIENT.Ligands.get_ligands_list_structures(ligand_ID=[22]).response().result
print_result(result)
result = KLIFS_CLIENT.Ligands.get_bioactivity_list_id(ligand_ID=50).response().result
print_result(result)
try:
    result = KLIFS_CLIENT.Ligands.get_bioactivity_list_pdb(ligand_PDB="STU").response().result
except (SwaggerMappingError, ValueError) as e:
    print(e)<jupyter_output>('Error while marshalling value=STU to type=integer/int32.', ValueError("invalid literal for int() with base 10: 'STU'"))<jupyter_text>Structures<jupyter_code>result = KLIFS_CLIENT.Structures.get_structure_list(structure_ID=[33]).response().result
print_result(result)
result = KLIFS_CLIENT.Structures.get_structures_list(kinase_ID=[33]).response().result
print_result(result)
result = KLIFS_CLIENT.Structures.get_structures_pdb_list(pdb_codes=["3w32"]).response().result
print_result(result)
result = KLIFS_CLIENT.Structures.get_structure_get_complex(structure_ID=33).response().result
print_result(result)
result = KLIFS_CLIENT.Structures.get_structure_get_pdb_complex(structure_ID=33).response().result
print_result(result)
result = KLIFS_CLIENT.Structures.get_structure_get_ligand(structure_ID=33).response().result
print_result(result)
result = KLIFS_CLIENT.Structures.get_structure_get_pocket(structure_ID=33).response().result
print_result(result)
result = KLIFS_CLIENT.Structures.get_structure_get_protein(structure_ID=33).response().result
print_result(result)<jupyter_output>Result type: <class 'str'>
{'fraction_non_alphanumeric': 0.12496863237139272, 'fraction_numerical': 0.013801756587202008, 'mean_word_length': 9.544973544973544, 'pattern_counts': {'":': 1, '<': 22, '<?xml version=': 0, '>': 22, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '491897', 'license': 'MIT', 'n_tokens_mistral': 1428, 'n_tokens_neox': 1349, 'n_words': 187, 'path': 'docs/examples/klifs_swagger_api_example_usage.ipynb', 'repo_name': 'volkamerlab/klifs_utils', 'size': '3985'}