This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This Python file module is responsible for compose and request to a GraphQL API using the "requests" library. | |
# The main function, "post_generator" takes in a URL, a query function, and optional parameters for "skip" and "block_number". | |
# This script requests ens domain subgraph. It can be changed by the use of another subgraph and query data. | |
# Recommended to use Graph Explorer with "API_KEY" and "SUBGRAPH_ID". For more information, visit https://thegraph.com/explorer | |
# In some situations, you can use "Hosted Service". But this option is not recommended due to | |
# the fact that this method will soon become deprecated | |
# The "post_generator" function in the provided code is a generator that retrieves data from the GraphQL API | |
# in a continuous manner. It uses the "yield" keyword to generate a sequence of API responses. | |
# This allows for data to be fetched in batches or pages, making it useful for handling large datasets. | |
# To launch the script, it is necessary to install the requests library and the python- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This pyth file is a module for connecting to the Ethereum network and interaction with Ethereum smart contract. | |
# Then he imports the necessary modules from the Web3 library, | |
# which allow you to connect to Ethereum and operate with smart contracts. | |
# To launch the script, it is necessary to install the web3 library and the python-dotenv library | |
# pip install python-dotenv | |
# pip install web3 | |
import settings | |
from web3 import Web3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pprint import pprint | |
import httplib2 | |
import apiclient.discovery | |
from oauth2client.service_account import ServiceAccountCredentials | |
# Файл, полученный в Google Developer Console | |
CREDENTIALS_FILE = 'creds.json' | |
# ID Google Sheets документа (можно взять из его URL) |