Env module¶
Give environment and tools for the packages based on pyrs.
Annotations¶
Configuration module¶
Context module¶
Context usage:
ctx = Context(value=1)
with ctx:
call_a_function(ctx=ctx)
A bit more readable version:
ctx = Context(value=1)
with ctx.copy(value=2, new_value=3) as c:
call_a_function(ctx=c)
-
class
pyrs.env.context.
Context
(*args, **kwargs)[source]¶ Bases:
thread._local
This is a thread safe stack based implementation of context.
-
pyrs.env.context.
ctx
= <pyrs.env.context.Context object>¶ pyrs context