Skip to content

Add experimental send_table to Python SDK #9538

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Apr 9, 2025
Merged

Conversation

grtlr
Copy link
Contributor

@grtlr grtlr commented Apr 8, 2025

Related

What

This adds minimal support for send_table to re_grpc_client and implements a new experimental API in the Python SDK:

client = ViewerClient(addr="rerun+http://0.0.0.0:9876")
client.send_table(
    "Hello from Python",
    pa.RecordBatch.from_pydict({
        "id": [1, 2, 3],
        "url": ["https://www.rerun.io", "https://github.com/rerun-io/rerun", "https://crates.io/crates/rerun"],
    }),
)

Testing

Either via the snippet:

pixi run py-build
pixi run -e py python docs/snippets/all/howto/send_table.py

Or via the notebook that was updated in this PR.

@grtlr grtlr added include in changelog 🪵 Log & send APIs Affects the user-facing API for all languages labels Apr 8, 2025
@grtlr grtlr requested a review from abey79 April 8, 2025 09:46
Copy link

github-actions bot commented Apr 8, 2025

Web viewer built successfully. If applicable, you should also test it:

  • I have tested the web viewer
Result Commit Link Manifest
84871e1 https://rerun.io/viewer/pr/9538 +nightly +main

Note: This comment is updated whenever you push a commit.

Copy link
Member

@abey79 abey79 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks very nice and straighforward!

/// table-related operations, most importantly `WriteTable`.
// TODO(grtlr): In the future, we probably want to merge this with the other APIs.
#[derive(Clone)]
pub struct TableConnectionHandle {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't ViewerConnectionHandle be a better name here?

Copy link
Member

@abey79 abey79 Apr 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to cover this feature in the docs. Can you please open an issue and tag it with the 0.23 milestone?

pub type TableClient = MessageProxyServiceClient<tonic::transport::Channel>;

#[cfg(not(target_arch = "wasm32"))]
pub async fn table_client(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, viewer_client?

@grtlr grtlr merged commit efe29aa into main Apr 9, 2025
37 checks passed
@grtlr grtlr deleted the grtlr/send-table-python-sdk branch April 9, 2025 08:48
emilk added a commit that referenced this pull request Apr 10, 2025
@emilk emilk mentioned this pull request Apr 11, 2025
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
include in changelog 🪵 Log & send APIs Affects the user-facing API for all languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Port send_dataframe to Rust and improve usability Proper viewer support for dataframes
2 participants