Skip to content

requester

XdbRequester

Bases: RestClient

A RestClient that encapsulates translating the HTTP responses to Pydantic models. A token is structurally required but is still None default (will just give 401 unauthorized). On initialization, queries API_root/origins to determine the set of origins the query knows.

ref is optional and if supplied, the origin will be automatically prefixed to every query. Escape this behavior by using origin_x routes to supply origin explicitly. (if None, a client will be expected to specify origin in every query

{{What is the difference between .origin and .ref? anyway? why the absurd machinations around catalog_names? ans: something (perhaps superstitious) about provenance- it's about mapping the ref to a 'physical' source }}

pydantic operations use specified ref as origin -get_one -get_many -post_return_one -post_return_many user supplies origin as a positional parameter -origin_get_one -origin_get_many -origin_post_return_one -origin_post_return_many

origins property

generates OriginMeta objects obtained by the server when the token was first authenticated Returns OriginMeta data-- this should probably include config information !

Returns:

Type Description