Reference
The Config object defines clients and servers and their trust model.
Lookup and return the location of the certified-apis configuration directory.
Priority order is
- certified_config (if not None)
- $CERTIFIED_CONFIG (if CERTIFIED_CONFIG defined)
- $VIRTUAL_ENV/etc/certified (if VIRTUAL_ENV defined)
- /etc/certified
The return value of this function is cached,
so changes to environment variables have no effect after the first return from this function.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
certified_config
|
Optional[Pstr]
|
if defined, this value is returned. |
None
|
should_exist
|
bool
|
require that the directory exist? |
True
|
Raises:
| Type | Description |
|---|---|
NotADirectoryError
|
Raised if the config does not point to a directory. If exists == False, this is only raised when the config exists, but is not a non-directory. |
Source code in certified/layout.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | |