This python SDK is build to accelerate your development efforts in getting data from the big blockchains, by utilizing Chainbase's powerful data infrastructure. See the docs here
To install this python Chainbase from the Python Package Index (PyPI) run:
pip install chainbase_sdk
Feature | What is this? | API Reference |
---|---|---|
SQL | Run low-latency SQL queries against all our indexed datasets for your custom needs. | link |
First you need to setup the CHAINBASE_API_KEY
environment variable, or pass it as parameter in Chainbase('[api-key]')
.
Follow the steps below to obtain your API key:
- Go to the Chainbase console
- Under
Dashboard
- Select existing project or
New Project
- Copy the
API Key
.
from chainbase_sdk import Chainbase
client = Chainbase()
df = client.sql.query_pandas("select * from ethereum.blocks limit 10")
print(df)
See more under examples
- Clone:
git clone [email protected]:ppsimatikas/chainbase_python_sdk.git
cd ./chainbase_python_sdk
make install_dev
Declare any dependencies in requirements.txt
for production and requirements_dev.txt
for development.
To install them, run:
For production:
make install
For development:
make install_dev
All test files are under examples. You can run your tests:
make test
This will also run coverage.
This project is using black, flake8 and isort to keep coding formatting standards.
To format your code run:
make format
To check your code formatting:
make lint
Verifying your project requires all the lint formatting to pass and tests to pass. You can run the command bellow to execute:
make verify