Datastores
blackline.models.datastores
DataStore
Bases: BaseSettings
A data model representing a data store, with profiles for connecting to different adapters. # noqa: E501
Parameters:
Name | Type | Description | Default |
---|---|---|---|
profiles |
dict[str, Store]
|
required | |
name |
str
|
required | |
key |
str
|
required | |
env_prefix |
str
|
required |
Source code in BAR /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/blackline/models/datastores.py
__getitem__(key)
Retrieves an adapter profile by name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key |
str
|
The name of the adapter profile to retrieve. |
required |
Raises:
Type | Description |
---|---|
ValueError
|
If the specified adapter profile is not found. |
Returns:
Type | Description |
---|---|
DataStoreBase
|
The adapter profile matching the specified key. |
Source code in /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/blackline/models/datastores.py
DataStores
Bases: BaseModel
A data model representing a collection of data stores.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
stores |
list[DataStore]
|
A list of DataStore objects. | required |
Source code in BAR /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/blackline/models/datastores.py
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 |
|
__getitem__(key)
Retrieves a data store by key.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key |
str
|
The key or name of the data store to retrieve. |
required |
Raises:
Type | Description |
---|---|
ValueError
|
If the specified data store is not found. |
Returns:
Type | Description |
---|---|
DataStore
|
The data store matching the specified key. |
Source code in /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/blackline/models/datastores.py
parse_folder(path)
classmethod
Parses a folder of data store configuration files and adds them to the collection. # noqa: E501
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
Path
|
The path to the folder containing the data store configuration files. |
required |
Source code in /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/blackline/models/datastores.py
store(name, profile=None)
Retrieves a data store by name and returns its adapter profiles or a specific profile. # noqa: E501
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
The name of the data store to retrieve. |
required |
profile |
Optional[str]
|
The name of the adapter profile to retrieve. If None, returns all profiles. Defaults to None. # noqa: E501 |
None
|
Raises:
Type | Description |
---|---|
ValueError
|
If the specified data store is not found. |
Returns:
Type | Description |
---|---|
Union[dict[str, Adapter], Adapter]
|
The adapter profiles for the specified data store, or a specific adapter profile. # noqa: E501 |
Source code in /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/blackline/models/datastores.py
store_by_key(key, profile)
Retrieves a data store by key and returns the specified adapter profile.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key |
str
|
The unique key of the data store to retrieve. |
required |
profile |
str
|
The name of the adapter profile to retrieve. |
required |
Raises:
Type | Description |
---|---|
ValueError
|
If the specified data store is not found. |
Returns:
Name | Type | Description |
---|---|---|
DataStoreBase |
DataStoreBase
|
The adapter configuration for the specified data store and profile. # noqa: E501 |