Context Management¶
This module defines a context object which holds on to all global state.
-
class
support.context.
Context
(dev=False, stage_host=None)[source]¶ Context object is meant to be the clearinghouse for global data in an application written using SuPPort. There is only one active Context at a time. Access the context with infra.context.get_context().
Two categories of data in here:
- Global data used internally by the infrastructure.
2. Global data which would otherwise need to be kept track of by user code. (This stuff can be identified by the presence of getters)
There are many configuration attributes. They ALL go to a sane default, it is not necessary to touch them but they are available for advanced users.
-
appname
¶
-
debug_errors
¶
-
dev
¶
-
disable_recent_cache
()[source]¶ Disable caching of recent outgoing network requests. This will help to keep memory footprint small in applications where that is important.
-
greenlet_settrace
¶ check if any greenlet trace function is registered
-
monitoring_greenlet
¶
-
port
¶
-
sampling
¶
-
serve_ufork
¶
-
class
support.context.
StreamSketch
[source]¶ Tracking useful attributes of a data stream. (e.g. cardinality, total count)