Writer Factory
get_writer(writer_type, **auth)
Factory function to get the appropriate writer based on the type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
writer_type
|
str
|
The type of writer to create. Supported values are "local" and "azure". |
required |
**auth
|
Additional authentication parameters for the writer, if needed. |
{}
|
Returns:
| Name | Type | Description |
|---|---|---|
Writer |
LocalWriter | AzureBlobWriter
|
An instance of the specified writer type. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the specified writer type is not supported. |
Source code in WriterFactory.py
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | |