{"id":13743363,"url":"https://github.com/0xPlaygrounds/subgrounds","last_synced_at":"2025-05-09T01:30:44.113Z","repository":{"id":102670298,"uuid":"586063464","full_name":"0xPlaygrounds/subgrounds","owner":"0xPlaygrounds","description":"An intuitive Python library for interfacing with subgraphs and GraphQL","archived":false,"fork":false,"pushed_at":"2024-06-20T14:28:14.000Z","size":1838,"stargazers_count":63,"open_issues_count":31,"forks_count":11,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-21T04:54:08.711Z","etag":null,"topics":["analytics","blockchain","data","decentralized","graph","graphql","pandas","python","subgraphs","substreams"],"latest_commit_sha":null,"homepage":"http://docs.playgrounds.network","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0xPlaygrounds.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-06T20:59:21.000Z","updated_at":"2025-03-31T02:37:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"4870e0cd-7671-4d1f-a59e-f8443adafcb8","html_url":"https://github.com/0xPlaygrounds/subgrounds","commit_stats":{"total_commits":277,"total_committers":8,"mean_commits":34.625,"dds":"0.12996389891696747","last_synced_commit":"d0468b147877d0527a33d0ad8539db8b0b8e63a7"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xPlaygrounds%2Fsubgrounds","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xPlaygrounds%2Fsubgrounds/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xPlaygrounds%2Fsubgrounds/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xPlaygrounds%2Fsubgrounds/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xPlaygrounds","download_url":"https://codeload.github.com/0xPlaygrounds/subgrounds/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253174191,"owners_count":21865829,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analytics","blockchain","data","decentralized","graph","graphql","pandas","python","subgraphs","substreams"],"created_at":"2024-08-03T05:00:45.286Z","updated_at":"2025-05-09T01:30:43.112Z","avatar_url":"https://github.com/0xPlaygrounds.png","language":"Python","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# Subgrounds\n\u003c!-- [![GitHub Actions](https://github.com/0xPlaygrounds/subgrounds/workflows/CI/badge.svg)](https://github.com/0xPlaygrounds/subgrounds/actions) --\u003e\n[![PyPI](https://img.shields.io/pypi/v/subgrounds.svg)](https://pypi.org/project/subgrounds/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/subgrounds.svg)](https://pypi.org/project/subgrounds/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n[![CI](https://github.com/0xPlaygrounds/subgrounds/actions/workflows/main.yml/badge.svg)](https://github.com/0xPlaygrounds/subgrounds/actions/workflows/main.yml)\n\u003cbr\u003e\n\n[![Discord](https://img.shields.io/discord/896944341598208070?color=7289DA\u0026label=discord\u0026logo=discord\u0026logoColor=fff)](https://discord.gg/gMSSh5bjvk)\n[![Twitter Follow](https://img.shields.io/badge/Playgrounds-Analytics-31fa1f2Playgrounds0x?color=%231fa1f2\u0026logo=Twitter\u0026logoColor=1fa1f2\u0026style=flat)](https://twitter.com/Playgrounds0x)\n\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/0xPlaygrounds/subgrounds/blob/main/examples/notebook.ipynb)\n[![Github Codepsaces](https://img.shields.io/badge/Github-Codespaces-24292f.svg?logo=Github)](https://codespaces.new/0xPlaygrounds/subgrounds-template?quickstart=1)\n\n\u003c!-- start elevator-pitch --\u003e\nAn intuitive Python library for interfacing with subgraphs and GraphQL.\n\n## Features\n- **Simple**: Leverage a Pythonic API to easily build queries and transformations without the need for raw GraphQL manipulation.\n- **Automated**: Automatically handle pagination and schema introspection for effortless data retrieval.\n- **Powerful**: Create sophisticated queries using the `SyntheticFields` transformation system.\n\u003c!-- end elevator-pitch --\u003e\n\n## Resources\n- [**Docs**](http://docs.playgrounds.network/): User guide and API documentation\n- [**Snippets**](https://github.com/0xPlaygrounds/subgrounds/tree/main/examples): A list of examples showcasing Subgrounds integration with Dash and Plotly\n- [**Examples**](http://docs.playgrounds.network/subgrounds/examples/): An ever growing list of projects created by our community members and team\n- [**Videos**](https://docs.playgrounds.network/subgrounds/videos/): Video workshops on Subgrounds\n\n## Installation\n\u003e Subgrounds **requires** atleast Python 3.10+\n\nSubgrounds is available on PyPi. To install it, run the following:\u003cbr\u003e\n`pip install subgrounds`.\n\nSubgrounds also comes bundled with extra modules that may require extra libraries. You can get all functionality of `subgrounds` via the following:\u003cbr\u003e\n`pip install subgrounds[all]`.\n\n## Simple example\n\u003c!-- start simple-example --\u003e\n```python\n\u003e\u003e\u003e from subgrounds import Subgrounds\n\n\u003e\u003e\u003e sg = Subgrounds()\n\n\u003e\u003e\u003e # Load\n\u003e\u003e\u003e aave_v3 = sg.load_subgraph(\"https://api.thegraph.com/subgraphs/name/messari/aave-v3-ethereum\")\n\n\u003e\u003e\u003e # Construct the query\n\u003e\u003e\u003e largest_markets = aave_v3.Query.markets(\n...     orderBy=aave_v3.Market.totalValueLockedUSD,\n...     orderDirection='desc',\n...     first=5,\n... )\n\n\u003e\u003e\u003e # Return query to a dataframe\n\u003e\u003e\u003e sg.query_df([\n...     largest_markets.name,\n...     largest_markets.totalValueLockedUSD,\n... ])\n          markets_name  markets_totalValueLockedUSD\n0 Aave Ethereum wstETH                 1.915090e+09\n1   Aave Ethereum WETH                 1.047417e+09\n2   Aave Ethereum WBTC                 6.049655e+08\n3   Aave Ethereum USDC                 4.482461e+08\n4   Aave Ethereum USDT                 4.280103e+08\n```\n\u003c!-- end simple-example --\u003e\n\n\n## About Us\nPlaygrounds Analytics is a data solutions company providing data infrastructures and services for data teams, analysts, and engineers. Check us out [here](https://playgrounds.network/) to learn more!\n\n\n## Acknowledgments\nThis software project would not be possible without the support of The Graph Foundation. You can learn more about The Graph and its mission [here](https://thegraph.com/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xPlaygrounds%2Fsubgrounds","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xPlaygrounds%2Fsubgrounds","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xPlaygrounds%2Fsubgrounds/lists"}