- Trigger CI (
ee5d982
)
- chore: Bump deps, might consider >= in the future (
9e4a5b8
)
- Finally formatting changes to README.md (
5820110
) - More formatting changes to README.md (
71a66a8
) - Format code-block in README.md (
0db2207
)
- Pydantic upgrade to v2, maintaining V1 API internally (#45) (
25570ae
) - Pandas upgrade to v2 (#44) (
5d1670b
)
- Update CHANGELOG.md (
7ef0876
)
- Async support for subgrounds (+ more) (#36) (
929a882
) - Ability to create custom clients via
SubgroundsBase
- The entirety of how subgrounds coordinates the production, transformation, and pagination of requests has been completely reworked from the ground up.
- Instead of a recursive call stack, transformation and pagination is lazily computed.
- Then, a client (implementing
SubgroundsBase
), drives the actual processing of requests/responses until completion.
- Subgrounds models the sans-io approach to handling requests
- This means subgrounds is untangled from actually making IO
- This has enabled custom clients, allowing anyone to customize subgrounds interface.
- Various rewrites, reworks, and improvements to documentation.
- Update README links (
f271706
)
- Add open in colab button (
02ff722
) - Add gateway notebook as another example (
98eab32
) - Adjust example notebook for colab (
6210556
) - Adjust wording in example notebook (
357c6d8
) - Add example notebook + swap binder for colab (
06cc728
) - Add CI status badge to README.md (
4c6dca9
) - Broken link in README (#19) (
211f965
)
- Nested orderBy working with DSL (
7e320e8
)
- Fix broken links (
24bd498
) - LICENSE update (
c4c4b3b
) - Adjust twitter badge (
95218d1
) - Fix codespace badge link (
cd5841d
) - Cleanup and improve README.md (
5e524bd
)
- Add
all
as an extra install (f1adacf
) subgrounds[pyodide]
patching for requests (7293262
)- Add
plotly
as an extra (058e28d
)
subgrounds.contrib.dash
andsubgrounds.contrib.plotly
(f1d79e8
)
- Add specific error models (
6218076
)
- Fix changelog formatting (
7f8a630
)
- Bump version (
40004c0
)
- Export more symbols to
subgrounds
(3c59fe9
)
- Add description about testing (
f2231c2
) - Migrated
docs/
and clean up (9deca3b
) - Add CONTRIBUTING.md + README.md edits (
2218d47
) - Trigger docs flow (removed some files) (
1ee17e5
) - Simplify contributing cmds (#3) (
0b4f3a2
)
- Issue causing null object in
SyntheticField
s
- Update
SchemaMeta
toPydantic
model for extra validation
- Schema cache directory path
where
filter getting dropped during pagination
This release overhauls how pagination is performed in Subgrounds.
- The
auto_paginate
argument of toplevel querying functions has been replaced by thepagination_strategy
argument (setting the latter toNone
disables pagination).
-
Subgrounds users can now define and use their own pagination strategy (see Custom pagination strategy for more details).
-
Users select the pagination strategies to use when calling toplevel querying functions:
df = sg.query_df(field_paths, pagination_strategy=MyPaginationStrategy)
-
Subgrounds provides two pagination strategies out of the box:
LegacyStrategy
(the strategy used prior to this update)ShallowStrategy
, which is much faster thanLegacyStrategy
in some cases, but does not support pagination on nested fields (see Available pagination strategies for more details).
- Fix bug that would cause a crash when calling one of the toplevel querying functions with only one
FieldPath
object (e.g.:sg.query_df(pairs.id)
).
- Iterative versions of toplevel querying functions to allow developers to process queried data page by page when automatic pagination returns more than one page
query_df
->query_df_iter
query
->query_iter
query_json
->query_json_iter
execute
->execute_iter
- Add option to set subgraph schema cache directory in
load_subgraph
andload_api
.- Defaults to
./schemas/
- Defaults to
- Add useful
SyntheticField
helperdatetime_of_timestamp
Subgrounds
class can now be imported from toplevel module:from subgrounds import Subgrounds
- Add
SyntheticField.datetime_of_timestamp
helper function to easily create aSyntheticField
that converts a Unix timestamp into a human readable datetime string - Add
SyntheticField.map
helper function to easily create a "map"SyntheticField
from a dictionary
- Fix bug that caused some queries to fail with automatic pagination enabled
- Migrate package manager from
pipenv
topoetry
- Migrate docs from plain
sphinx
tomudkip
- Made
dash
an optional extra dependency.- To use Subgrounds
dash
andplotly
wrappers, runpip install subgrounds[dash]
- To use Subgrounds
- Scalar lists were not handled properly
-
Partial fieldpaths
-
Querying partial fieldpaths will automatically select all non-list fields of the fieldpath leaf.
-
For example, using the Ribbon V2 subgraph, the following Subgrounds query:
sg.query_df([ ribbon.Query.vaults ])
will result in the following query being made to the subgraph:
query { vaults { id name symbol underlyingAsset underlyingName underlyingSymbol underlyingDecimals totalPremiumEarned totalNominalVolume totalNotionalVolume numDepositors totalBalance cap round performanceFeeCollected managementFeeCollected totalFeeCollected } }
-
-
Code completion
- When using Subgrounds in Jupyter notebooks and a subgraph has been loaded in a previous cell, fieldpaths will now autocomplete.
Subgrounds.load_api
- Allows you to safely query non-subgraph GrahpQL APIs with Subgrounds!
- New boolean flag argument,
auto_paginate
, inSubgrounds.query
,Subgrounds.query_json
andSubgrounds.query_df
- Selectively disable automatic pagination
- Refactor, cleanup and add tons of docstrings