Skip to main content

A Pythonic data access layer for applications querying data from The Graph Network.

Project description


PyPI PyPI - Python Version Code style: black

Discord Twitter Follow

An intuitive python library for interfacing with Subgraphs.


  • Simple: Leverage a Pythonic API to easily build queries and transformations without the need for raw GraphQL manipulation.
  • Automated: Automatically handle pagination and schema introspection for effortless data retrieval.
  • Powerful: Create sophisticated queries using the SyntheticFields transformation system.



Subgrounds requires atleast Python 3.10+

Subgrounds is available on PyPi. To install it, run the following:
pip install subgrounds.

Subgrounds also comes bundled with some handy dash wrappers. To use those wrappers, you can install the extra dash dependencies.
pip install subgrounds[dash].

Simple example

>>> from subgrounds import Subgrounds

>>> sg = Subgrounds()

>>> # Load
>>> aave_v2 = sg.load_subgraph('')

>>> # Construct the query
>>> latest =

>>> # Return query to a dataframe
>>> sg.query_df([,
                  markets_name  markets_totalValueLockedUSD
0  Aave interest bearing STETH                 1.522178e+09
1   Aave interest bearing WETH                 1.221299e+09
2   Aave interest bearing USDC                 8.140547e+08
3   Aave interest bearing WBTC                 6.615692e+08
4   Aave interest bearing USDT                 3.734017e+08

About Us

Playgrounds Analytics was started by web3 data enthusiasts to build open source tooling for The Graph Network as part of its grants program. Playgrounds Analytics are a data solutions company leveraging The Graph to provide serverless on-chain data infrastructures and services for data teams, analysts, and engineers. Checkout us out here to learn more!


This software project would not be possible without the support of The Graph Foundation. You can learn more about The Graph and its mission here.

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

subgrounds-1.1.2.tar.gz (55.7 kB view hashes)

Uploaded Source

Built Distribution

subgrounds-1.1.2-py3-none-any.whl (60.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page