pytket.config¶
The config module defines a userspace pytket configuration. The configuration is saved to and loaded from file.
- pytket.config.get_config_file_path()[source]¶
Get a path to the config file on this machine.
- Return type:
- class pytket.config.pytket_config.PytketConfig(extensions=None)[source]¶
PytketConfig represents a loaded config file for pytket and extension packages.
- __init__(extensions=None)[source]¶
Construct a PytketConfig object with inital config parameter values.
- Parameters:
extensions (Optional[Dict[str, Any]], optional) – Dictionary holding parameter values for extension packages, defaults to None
- class pytket.config.pytket_config.PytketExtConfig[source]¶
Abstract base class for pytket extension config classes.
- __init__()¶
- classmethod from_default_config_file()[source]¶
Load from default config file.
- Return type:
TypeVar
(T
, bound= PytketExtConfig)
- abstract classmethod from_extension_dict(ext_dict)[source]¶
Abstract method to build PytketExtConfig from dictionary serialized form.
- Return type:
TypeVar
(T
, bound= PytketExtConfig)
- classmethod from_pytketconfig(p_config)[source]¶
Build from PytketConfig instance.
- Return type:
TypeVar
(T
, bound= PytketExtConfig)