A Python library for interacting with the public google BigQuery datasets to extract ERC721 token data.
Project description
Project Description
A simple interface to interact with the ethereum ETL data stored in public Google BigQuery datasets. Requires a GCP Project to interact with the data.
Setup and Installation
Firstly you must have set up a GCP project to interact with the public google BigQuery datasets using Python. To do this follow the instructions located under quick setup here.
Next, install this module from PyPi.
pip install erc721
That's it, once this is setup you should be able to interact with the provided functions.
Interactions
There are a few simple interactions provided:
get_all_collection_transfers_sql(nft_token_address)
This fetches all of the transfers and sales for a single ERC721 token. For example to get all transfers for BAYC, pass the token address "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d" as a string to the function.
This will extract all of the sales and transfer data for that desired collection and return it as a pandas dataframe.
Additionally a highwatermark (of the blocknumber) can be passed to this function to allow for faster batch processing from past that point only. The function will return a second value which is a new highwatermark of the highest block number returned.
get_all_sales(all_data=None, collection_address=None)
This fetches all of the sales data and returns it as a pandas dataframe. This can either be called alone by being passed a collection address (for BAYC: collection_address="0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d") or if you have already extracted data using get_all_collection_transfers, the result of this can be passed.
get_all_transfers(all_data=None, collection_address=None)
Working in the same way as the above function, this function returns all of the transfers (without any payment).
get_all_sales_and_transfers(all_data=None, collection_address=None)
Working in the same way as the two above functions, this function returns two arguments all sales and all transfers respectively as two separate pandas dataframes.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file erc721-0.0.4.tar.gz
.
File metadata
- Download URL: erc721-0.0.4.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29dba4a829a5c379af53ec78557c67e56bd74317a5c29a8bdeb8cee74e9c5993 |
|
MD5 | accf6ac91ac11f434b2b1358c5a96a47 |
|
BLAKE2b-256 | a7fdf85dc4c897558cd907d05133c12d25409cfee4560e22033381a105b149d0 |
File details
Details for the file erc721-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: erc721-0.0.4-py3-none-any.whl
- Upload date:
- Size: 2.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c583e056bc504cb0a2f924edc77178d25dff03605bb40a8fa02402082c2e1e19 |
|
MD5 | e86b53b9c1174fafbd9e4e515c316038 |
|
BLAKE2b-256 | 3942c15145a8a55cef44da67a3bc65d607fbb0b97b9fd22c6e3ca8e7f134c1b1 |