Skip to content

Commit

Permalink
docs(remote json): add
Browse files Browse the repository at this point in the history
  • Loading branch information
lmeyerov committed Dec 13, 2024
1 parent 4e9ce4e commit d5624bd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
## [Development]
### Docs

* Update Python remote mode notebook: Fixed engine results
* Python remote mode notebook: Fixed engine results
* Python remote mode: Add JSON example

## [0.35.1 - 2024-12-11]

Expand Down
16 changes: 16 additions & 0 deletions docs/source/gfql/remote.rst
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,19 @@ Run Python on an existing graph, return a table
assert len(some_edges_df) == 10
Run Python on an existing graph, return JSON
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code-block:: python
import graphistry
g = graphistry.bind(dataset_id='ds-abc-123')
def first_n_edges_shape(g):
return {'num_edges': len(g._edges[:10])}
obj = g.remote_python_json(first_n_edges_shape)
assert obj['num_edges'] == 10

0 comments on commit d5624bd

Please sign in to comment.