peql.Caller#
peql.Caller(id, purpose, tenant, tier=None, classification=None, roles=None, clearance=None)
The authenticated context supplied to Engine.query, Engine.query_with_envelope and Engine.describe. Your application must verify these values; constructing Caller does not authenticate a user. The object is implemented by the native extension and exposes no public data methods or readable attributes beyond its representation.
Parameter |
Type and default |
Meaning |
|---|---|---|
|
|
Stable caller identifier. |
|
|
Declared purpose of this query. |
|
|
Tenant used for visibility and rules. |
|
`str |
None = None` |
|
`str |
None = None` |
|
`list[str] |
None = None` |
|
`int |
None = None` |
caller = peql.Caller(
id="supplier:acme",
purpose="fulfilment",
tenant="acme",
roles=["supplier"],
)
rows = engine.query('SELECT * FROM "sales/orders"', caller)
The argument order is id, purpose, tenant, so named arguments make their roles clear. The native repr(caller) shows id, purpose and tenant.