Skip to content
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

Add pathlib-style handling of entity path #4596

Open
abey79 opened this issue Dec 20, 2023 · 0 comments
Open

Add pathlib-style handling of entity path #4596

abey79 opened this issue Dec 20, 2023 · 0 comments
Labels
enhancement New feature or request 🐍 Python API Python logging API

Comments

@abey79
Copy link
Member

abey79 commented Dec 20, 2023

#4595 introduced an API to escape entity path in the Python SDK. We should follow this thread and go for the more modern and familiar pathlib.Path approach:

rr.EntityPath("world") / "robot"
rr.EntityPath.root() / "world" / file_name / "some string"

Log operations could be added as helper method:

entity = rr.EntityPath("world") / "camera"
entity.log(rr.Points3D(...))

Overall, this would give a very Pythonic look:

world = rr.EntityPath("world")
world.log(rr.Transform(....)

for stuff in my_world:
    entity = world / stuff.name()
    entity.log(rr.Points3D(...))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 🐍 Python API Python logging API
Projects
None yet
Development

No branches or pull requests

1 participant