<jupyter_start><jupyter_text>Import<jupyter_code>import sys; sys.path.append("C:/GitWorks/pdb-profiling")
from pdb_profiling.fetcher.dbfetch import Neo4j
from pdb_profiling.processers.pdbe.neo4j_api import Neo4j_API, Entry, SIFTS
from pdb_profiling.commands.interface import init_semaphore
import logging
from unsync import unsync<jupyter_output><empty_output><jupyter_text>Conntect to remote/local `Neo4j` DataBase (PDBe Graph DataBase)<jupyter_code>config = {
        'user': 'your username', 
        'pass': '<PASSWORD>',
        'url': 'your local neo4j db'
        }

Neo4j_API.neo4j_api = Neo4j(
        config=config,
        semaphore=init_semaphore(10).result(),
        log_func=logging.info).connnect().result()
neo4j_api = Neo4j_API.neo4j_api<jupyter_output><empty_output><jupyter_text>Simple Function that Retrieving Data<jupyter_code>def get_info(neo4j_api, func, **kwargs):
    query, newkwargs = func(**kwargs)
    res = neo4j_api.afetch(query, **newkwargs).result()
    return Entry.to_data_frame(res)
get_info(neo4j_api, Entry.summary_method, pdbs=['1a01', '2xyn'])
get_info(neo4j_api, SIFTS.summary_mapping, lyst=['1a01', '2xyn'], id_type='pdb')
get_info(neo4j_api, SIFTS.summary_mapping, lyst=['P42684-7', 'P69905'], id_type='unp')<jupyter_output><empty_output><jupyter_text>Retrieve Handled Data<jupyter_code>@unsync
async def get_ed_sifts_info(neo4j_api, **kwargs):
    query, newkwargs = SIFTS.summary_mapping(**kwargs)
    res = await neo4j_api.afetch(query, **newkwargs)
    res = await SIFTS.deal_mapping(res, neo4j_api)
    return res
%time
get_ed_sifts_info(neo4j_api, lyst=['6bcu', '3vkl', '1a01', '2xyn'], id_type='pdb').result()<jupyter_output>Wall time: 0 ns
{'fraction_non_alphanumeric': 0.1348314606741573, 'fraction_numerical': 0.028385570668243643, 'mean_word_length': 6.324675324675325, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, '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': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '655600', 'license': 'MIT', 'n_tokens_mistral': 700, 'n_tokens_neox': 671, 'n_words': 105, 'path': 'test/demo_func.ipynb', 'repo_name': 'NatureGeorge/pdb-profiling', 'size': '1694'}