This repo expose an api end point that runs a model to tag a crypto address
git clone
cd tag-address
Python -m venv venv
venv\Scripts\activate.bat
pip install -r requirements.txt
uvicorn main:app --reload
for that create a variable FLISIDE_API_KEY
with your api key as value
Go to http://127.0.0.1:8000/docs#/default/query_data_query_post
Edit the post data and replace string
with the address you want to tag
{
"data": [
"string"
]
}
for example:
{
"data": [
"0x80c67432656d59144ceff962e8faf8926599bcf8"
]
}
You can pass multiple addresses in the array like this:
{
"data": [
"0xb9726225b711f5ffe1eb3e117e9caaa0f78dcd37",
"0x80c67432656d59144ceff962e8faf8926599bcf8"
]
}
import requests
import pandas as pd
array_list = ["0xb9726225b711f5ffe1eb3e117e9caaa0f78dcd37", "0x80c67432656d59144ceff962e8faf8926599bcf8"]
url = "http://127.0.0.1:8000/query"
response = requests.post(url, json={"data": array_list})
df_prediction = pd.read_json(response.json()['result'], orient='split')
print(df_prediction)
response = requests.post("http://127.0.0.1:8000/query", json={"data": array_list})
This is a lot more efficient to pass many addresses
docker build -t tag_address_api .
docker run -e "FLIPSIDE_API_KEY=replace_with_api_key" -p 8000:80 tag_address_api
http://localhost:8000/docs#/default/query_data_query_post
docker run -e "FLIPSIDE_API_KEY=c1180eca-2d3b-451e-adb7-c93e842c4017" -p 8000:80 tag_address_api