<jupyter_start><jupyter_text>Covalent Python API - Garbage<jupyter_code>import covalent_api as cpi
sess = cpi.session.Session(api_key="ckey_5fb2f250010f42438610a820d45")
classb = cpi.class_b.ClassB(sess)
#classb.get_sushiswap_network_assets('1')<jupyter_output><empty_output><jupyter_text>-----------------------  Covalent Data<jupyter_code>import requests
import pandas as pd
API_KEY = 'ckey_5fb2f250010f42438610a820d45'
def unravel_token(df, token):
    df1 = df[token].apply(pd.Series)
    df1.columns = [f'{token}__' + i for i in df1.columns]
    df2 = pd.concat([df1, df.drop([token], axis=1)], axis=1)
    return df2<jupyter_output><empty_output><jupyter_text>pool data<jupyter_code>def get_pools_url(chain_id=1, page_size=1000):
    api_url = 'https://api.covalenthq.com'
    endpoint = f'/v1/{chain_id}/uniswap_v3/pools/?page-size={page_size}'
    url = api_url + endpoint
    return url
response = requests.get(get_pools_url(page_size=5000), auth=(API_KEY,''))
data = response.json()
if data['error']:
    raise Exception(data['error_message'])
pool_df = pd.DataFrame(data['data']['items'])
pool_df = unravel_token(pool_df, 'token_1')
pool_df = unravel_token(pool_df, 'token_0')
pool_df<jupyter_output><empty_output><jupyter_text>liquidity data<jupyter_code>def get_liquidity_url(address, page_size=1000):
    api_url = 'https://api.covalenthq.com'
    endpoint = f'/v1/1/uniswap_v3/liquidity/address/{address}/?page-size={page_size}'
    url = api_url + endpoint
    return url
url = get_liquidity_url('0x5d44a02c9e2ed366fb987793d90216b0609aa55c')

response = requests.get(url, auth=(API_KEY,''))
data = response.json()
if data['error']:
    raise Exception(data['error_message'])
liquidity_df = pd.DataFrame(data['data']['items'])
liquidity_df<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1547085201793722, 'fraction_numerical': 0.0554932735426009, 'mean_word_length': 6.37603305785124, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 2, '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': '424420', 'license': 'MIT', 'n_tokens_mistral': 763, 'n_tokens_neox': 697, 'n_words': 96, 'path': 'archive/covalent_data_api.ipynb', 'repo_name': 'pradeeptadas/uniswap-v3-project', 'size': '1784'}