CAVEconnectome / CAVEclient

This is the python client for accessing REST APIs within the Connectome Annotation Versioning Engine.
https://caveconnectome.github.io/CAVEclient/
MIT License
19 stars 12 forks source link

Table manager #101

Closed ceesem closed 11 months ago

ceesem commented 1 year ago

Building on #100, add an optional table manager class to lower barriers to entry for querying tables.

ceesem commented 11 months ago

As happened before, I started to write documentation for how to do queries and the complexity of "oh, but this is a reference table so it's all different" seemed too much to try to communicate (or remember). I wanted to bump this commit to get it into testing and use. I added a warning to querying through this, similar to the live_live_query warning.

ceesem commented 11 months ago

As a reminder, the general format is something like:

client.materialize.tables.aibs_soma_nuc_metamodel_preds_v117(
    pt_root_id=864691136522768017,
).query(desired_resolution=[1,1,1])

Where the function named after the table name has query filters for both the table and any reference tables (these can be seen in the docstring) and the arguments for query (or live_query, which is live_live_query) are things like timestamp, split_positions, desired_resolution and other higher level parameters.

A similar interface applies to client.materialize.views but currently only offers query and not live_query as an option.