airbyte-source-azure-blob-storage 0.4.2__py3-none-any.whl → 0.4.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of airbyte-source-azure-blob-storage might be problematic. Click here for more details.
- {airbyte_source_azure_blob_storage-0.4.2.dist-info → airbyte_source_azure_blob_storage-0.4.3.dist-info}/METADATA +37 -23
- airbyte_source_azure_blob_storage-0.4.3.dist-info/RECORD +10 -0
- source_azure_blob_storage/config_migrations.py +1 -3
- source_azure_blob_storage/run.py +3 -2
- source_azure_blob_storage/source.py +2 -2
- source_azure_blob_storage/spec.py +2 -1
- source_azure_blob_storage/stream_reader.py +2 -2
- airbyte_source_azure_blob_storage-0.4.2.dist-info/RECORD +0 -10
- {airbyte_source_azure_blob_storage-0.4.2.dist-info → airbyte_source_azure_blob_storage-0.4.3.dist-info}/WHEEL +0 -0
- {airbyte_source_azure_blob_storage-0.4.2.dist-info → airbyte_source_azure_blob_storage-0.4.3.dist-info}/entry_points.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: airbyte-source-azure-blob-storage
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.3
|
|
4
4
|
Summary: Source implementation for Azure Blob Storage.
|
|
5
5
|
Home-page: https://airbyte.com
|
|
6
6
|
License: MIT
|
|
@@ -12,7 +12,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.9
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.10
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
-
Requires-Dist: airbyte-cdk[file-based] (>=
|
|
15
|
+
Requires-Dist: airbyte-cdk[file-based] (>=1,<2)
|
|
16
16
|
Requires-Dist: pytz (==2024.1)
|
|
17
17
|
Requires-Dist: smart-open[azure] (==6.4.0)
|
|
18
18
|
Project-URL: Documentation, https://docs.airbyte.com/integrations/sources/azure-blob-storage
|
|
@@ -21,16 +21,15 @@ Description-Content-Type: text/markdown
|
|
|
21
21
|
|
|
22
22
|
# Azure-Blob-Storage source connector
|
|
23
23
|
|
|
24
|
-
|
|
25
24
|
This is the repository for the Azure-Blob-Storage source connector, written in Python.
|
|
26
25
|
For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.com/integrations/sources/azure-blob-storage).
|
|
27
26
|
|
|
28
27
|
## Local development
|
|
29
28
|
|
|
30
29
|
### Prerequisites
|
|
31
|
-
* Python (~=3.9)
|
|
32
|
-
* Poetry (~=1.7) - installation instructions [here](https://python-poetry.org/docs/#installation)
|
|
33
30
|
|
|
31
|
+
- Python (~=3.9)
|
|
32
|
+
- Poetry (~=1.7) - installation instructions [here](https://python-poetry.org/docs/#installation)
|
|
34
33
|
|
|
35
34
|
### Generate new oauth token
|
|
36
35
|
|
|
@@ -38,35 +37,37 @@ Tenant id should be provided by user, reason:
|
|
|
38
37
|
https://learn.microsoft.com/en-us/answers/questions/1531138/which-tenant-id-do-i-have-to-use-to-get-tokens-and
|
|
39
38
|
|
|
40
39
|
1. GET https://login.microsoftonline.com/<tenant_id>/oauth2/v2.0/authorize
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
?response_type=code
|
|
41
|
+
&client_id=<client_id>
|
|
42
|
+
&scope=offline_access https://storage.azure.com/.default
|
|
43
|
+
&redirect_uri=http://localhost:8000/auth_flow
|
|
44
|
+
&response_mode=query
|
|
45
|
+
&state=1234
|
|
47
46
|
|
|
48
47
|
2. POST https://login.microsoftonline.com/<tenant_id>/oauth2/v2.0/token
|
|
49
|
-
client_id:<client_id>
|
|
50
|
-
code:<code obtained from previous request>
|
|
51
|
-
redirect_uri:http://localhost:8000/auth_flow
|
|
52
|
-
grant_type:authorization_code
|
|
53
|
-
client_secret:<client_secret>
|
|
48
|
+
client_id:<client_id>
|
|
49
|
+
code:<code obtained from previous request>
|
|
50
|
+
redirect_uri:http://localhost:8000/auth_flow
|
|
51
|
+
grant_type:authorization_code
|
|
52
|
+
client_secret:<client_secret>
|
|
54
53
|
|
|
55
54
|
### Installing the connector
|
|
55
|
+
|
|
56
56
|
From this connector directory, run:
|
|
57
|
+
|
|
57
58
|
```bash
|
|
58
59
|
poetry install --with dev
|
|
59
60
|
```
|
|
60
61
|
|
|
61
|
-
|
|
62
62
|
### Create credentials
|
|
63
|
+
|
|
63
64
|
**If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.com/integrations/sources/azure-blob-storage)
|
|
64
65
|
to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_azure_blob_storage/spec.yaml` file.
|
|
65
66
|
Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
|
|
66
67
|
See `sample_files/sample_config.json` for a sample config file.
|
|
67
68
|
|
|
68
|
-
|
|
69
69
|
### Locally running the connector
|
|
70
|
+
|
|
70
71
|
```
|
|
71
72
|
poetry run source-azure-blob-storage spec
|
|
72
73
|
poetry run source-azure-blob-storage check --config secrets/config.json
|
|
@@ -75,23 +76,28 @@ poetry run source-azure-blob-storage read --config secrets/config.json --catalog
|
|
|
75
76
|
```
|
|
76
77
|
|
|
77
78
|
### Running unit tests
|
|
79
|
+
|
|
78
80
|
To run unit tests locally, from the connector directory run:
|
|
81
|
+
|
|
79
82
|
```
|
|
80
83
|
poetry run pytest unit_tests
|
|
81
84
|
```
|
|
82
85
|
|
|
83
86
|
### Building the docker image
|
|
87
|
+
|
|
84
88
|
1. Install [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md)
|
|
85
89
|
2. Run the following command to build the docker image:
|
|
90
|
+
|
|
86
91
|
```bash
|
|
87
92
|
airbyte-ci connectors --name=source-azure-blob-storage build
|
|
88
93
|
```
|
|
89
94
|
|
|
90
95
|
An image will be available on your host with the tag `airbyte/source-azure-blob-storage:dev`.
|
|
91
96
|
|
|
92
|
-
|
|
93
97
|
### Running as a docker container
|
|
98
|
+
|
|
94
99
|
Then run any of the connector commands as follows:
|
|
100
|
+
|
|
95
101
|
```
|
|
96
102
|
docker run --rm airbyte/source-azure-blob-storage:dev spec
|
|
97
103
|
docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-azure-blob-storage:dev check --config /secrets/config.json
|
|
@@ -100,18 +106,23 @@ docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integrat
|
|
|
100
106
|
```
|
|
101
107
|
|
|
102
108
|
### Running our CI test suite
|
|
109
|
+
|
|
103
110
|
You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md):
|
|
111
|
+
|
|
104
112
|
```bash
|
|
105
113
|
airbyte-ci connectors --name=source-azure-blob-storage test
|
|
106
114
|
```
|
|
107
115
|
|
|
108
116
|
### Customizing acceptance Tests
|
|
117
|
+
|
|
109
118
|
Customize `acceptance-test-config.yml` file to configure acceptance tests. See [Connector Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference) for more information.
|
|
110
119
|
If your connector requires to create or destroy resources for use during acceptance tests create fixtures for it and place them inside integration_tests/acceptance.py.
|
|
111
120
|
|
|
112
121
|
### Dependency Management
|
|
113
|
-
|
|
122
|
+
|
|
123
|
+
All of your dependencies should be managed via Poetry.
|
|
114
124
|
To add a new dependency, run:
|
|
125
|
+
|
|
115
126
|
```bash
|
|
116
127
|
poetry add <package-name>
|
|
117
128
|
```
|
|
@@ -119,14 +130,17 @@ poetry add <package-name>
|
|
|
119
130
|
Please commit the changes to `pyproject.toml` and `poetry.lock` files.
|
|
120
131
|
|
|
121
132
|
## Publishing a new version of the connector
|
|
133
|
+
|
|
122
134
|
You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what?
|
|
135
|
+
|
|
123
136
|
1. Make sure your changes are passing our test suite: `airbyte-ci connectors --name=source-azure-blob-storage test`
|
|
124
|
-
2. Bump the connector version (please follow [semantic versioning for connectors](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#semantic-versioning-for-connectors)):
|
|
125
|
-
|
|
126
|
-
|
|
137
|
+
2. Bump the connector version (please follow [semantic versioning for connectors](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#semantic-versioning-for-connectors)):
|
|
138
|
+
- bump the `dockerImageTag` value in in `metadata.yaml`
|
|
139
|
+
- bump the `version` value in `pyproject.toml`
|
|
127
140
|
3. Make sure the `metadata.yaml` content is up to date.
|
|
128
141
|
4. Make sure the connector documentation and its changelog is up to date (`docs/integrations/sources/azure-blob-storage.md`).
|
|
129
142
|
5. Create a Pull Request: use [our PR naming conventions](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#pull-request-title-convention).
|
|
130
143
|
6. Pat yourself on the back for being an awesome contributor.
|
|
131
144
|
7. Someone from Airbyte will take a look at your PR and iterate with you to merge it into master.
|
|
132
145
|
8. Once your PR is merged, the new version of the connector will be automatically published to Docker Hub and our connector registry.
|
|
146
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
source_azure_blob_storage/__init__.py,sha256=Wx4PzvHg900-c2CpOOP1Wk0zcJpNVqJrkMnPtDcuaQM,319
|
|
2
|
+
source_azure_blob_storage/config_migrations.py,sha256=SAcp-Eh8vuu6LgzgmfhRqhpoqWdvE3jBDmfYTlJLHko,4244
|
|
3
|
+
source_azure_blob_storage/run.py,sha256=3rwgY4Qs-KdOKZanpiLmGsQzNW5gUEE9zmrizEpCs20,1999
|
|
4
|
+
source_azure_blob_storage/source.py,sha256=j5ibzjzX_gAi2kASpajoQ8ZMbnJ8LIwuSKChwk5i3vY,2420
|
|
5
|
+
source_azure_blob_storage/spec.py,sha256=rKIdL4DRezxZOXS7dvIvhoxsSJgXBWzEq8Xs5uTAbco,3944
|
|
6
|
+
source_azure_blob_storage/stream_reader.py,sha256=VvskbMNdwCjN4AsZ8rI8FX18bM_wrmTq87FG6XCAIlg,4589
|
|
7
|
+
airbyte_source_azure_blob_storage-0.4.3.dist-info/METADATA,sha256=XIxhQ3TffQKRz5IQhkG1hK9PSElalM3KzghzhU58D0g,6265
|
|
8
|
+
airbyte_source_azure_blob_storage-0.4.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
9
|
+
airbyte_source_azure_blob_storage-0.4.3.dist-info/entry_points.txt,sha256=75v_DA_Xu0qr0eqtEXyh8sPCqcL9eXKWY8UwdST3ANE,79
|
|
10
|
+
airbyte_source_azure_blob_storage-0.4.3.dist-info/RECORD,,
|
|
@@ -7,9 +7,7 @@ import logging
|
|
|
7
7
|
from abc import ABC, abstractmethod
|
|
8
8
|
from typing import Any, List, Mapping
|
|
9
9
|
|
|
10
|
-
from airbyte_cdk
|
|
11
|
-
from airbyte_cdk.entrypoint import AirbyteEntrypoint
|
|
12
|
-
from airbyte_cdk.sources import Source
|
|
10
|
+
from airbyte_cdk import AirbyteEntrypoint, Source, create_connector_config_control_message
|
|
13
11
|
|
|
14
12
|
logger = logging.getLogger("airbyte_logger")
|
|
15
13
|
|
source_azure_blob_storage/run.py
CHANGED
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
|
|
3
3
|
#
|
|
4
4
|
|
|
5
|
+
|
|
5
6
|
import sys
|
|
6
7
|
import traceback
|
|
7
8
|
from datetime import datetime
|
|
8
9
|
|
|
9
|
-
from airbyte_cdk
|
|
10
|
-
from airbyte_cdk.models import AirbyteErrorTraceMessage,
|
|
10
|
+
from airbyte_cdk import AirbyteEntrypoint, AirbyteMessage, Type, launch
|
|
11
|
+
from airbyte_cdk.models import AirbyteErrorTraceMessage, AirbyteTraceMessage, TraceType
|
|
11
12
|
from airbyte_cdk.sources.file_based.stream.cursor import DefaultFileBasedCursor
|
|
12
13
|
from source_azure_blob_storage import SourceAzureBlobStorage, SourceAzureBlobStorageSpec, SourceAzureBlobStorageStreamReader
|
|
13
14
|
from source_azure_blob_storage.config_migrations import MigrateCredentials, MigrateLegacyConfig
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
|
|
3
3
|
#
|
|
4
4
|
|
|
5
|
+
|
|
5
6
|
from typing import Any
|
|
6
7
|
|
|
7
|
-
from airbyte_cdk
|
|
8
|
+
from airbyte_cdk import AdvancedAuth, ConnectorSpecification, OAuthConfigSpecification
|
|
8
9
|
from airbyte_cdk.sources.file_based.file_based_source import FileBasedSource
|
|
9
|
-
from airbyte_protocol.models import AdvancedAuth, ConnectorSpecification
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class SourceAzureBlobStorage(FileBasedSource):
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
|
|
3
3
|
#
|
|
4
4
|
|
|
5
|
+
|
|
5
6
|
from typing import Any, Dict, Literal, Optional, Union
|
|
6
7
|
|
|
7
8
|
import dpath.util
|
|
9
|
+
from airbyte_cdk import OneOfOptionConfig
|
|
8
10
|
from airbyte_cdk.sources.file_based.config.abstract_file_based_spec import AbstractFileBasedSpec
|
|
9
|
-
from airbyte_cdk.utils.oneof_option_config import OneOfOptionConfig
|
|
10
11
|
from pydantic import AnyUrl, BaseModel, Field
|
|
11
12
|
|
|
12
13
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
|
|
2
2
|
|
|
3
|
+
|
|
3
4
|
import logging
|
|
4
5
|
from io import IOBase
|
|
5
6
|
from typing import Iterable, List, Optional, Union
|
|
6
7
|
|
|
7
8
|
import pytz
|
|
9
|
+
from airbyte_cdk import AirbyteTracedException, FailureType
|
|
8
10
|
from airbyte_cdk.sources.file_based.file_based_stream_reader import AbstractFileBasedStreamReader, FileReadMode
|
|
9
11
|
from airbyte_cdk.sources.file_based.remote_file import RemoteFile
|
|
10
12
|
from airbyte_cdk.sources.streams.http.requests_native_auth import Oauth2Authenticator
|
|
11
|
-
from airbyte_cdk.utils import AirbyteTracedException
|
|
12
|
-
from airbyte_protocol.models import FailureType
|
|
13
13
|
from azure.core.credentials import AccessToken
|
|
14
14
|
from azure.core.exceptions import ResourceNotFoundError
|
|
15
15
|
from azure.storage.blob import BlobServiceClient, ContainerClient
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
source_azure_blob_storage/__init__.py,sha256=Wx4PzvHg900-c2CpOOP1Wk0zcJpNVqJrkMnPtDcuaQM,319
|
|
2
|
-
source_azure_blob_storage/config_migrations.py,sha256=NPDwQTWaR2IDOBTEm3Np-S0Gz1phRWbxK-Du8hE2icg,4328
|
|
3
|
-
source_azure_blob_storage/run.py,sha256=muonwvccXCFHBX-MTKFJXgvUGmPWmcrDLSDXhY218YU,2009
|
|
4
|
-
source_azure_blob_storage/source.py,sha256=oExhGYkZh8irsFGBBcCnC2l_TDZ1k-qbRLe1Xd41kjs,2481
|
|
5
|
-
source_azure_blob_storage/spec.py,sha256=DqnKiB_y9PUIQRVzU8bozsdyPIkeJuHCcbMwf-MVtmA,3969
|
|
6
|
-
source_azure_blob_storage/stream_reader.py,sha256=0s9hEeus4Bs1rT4I2fetXEcBwAuTKpt0kWCT3qzz4O8,4629
|
|
7
|
-
airbyte_source_azure_blob_storage-0.4.2.dist-info/METADATA,sha256=-csV1t2RgVs966GYBAw7-zMc4rKf8xli5HV10v2BKKs,6246
|
|
8
|
-
airbyte_source_azure_blob_storage-0.4.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
9
|
-
airbyte_source_azure_blob_storage-0.4.2.dist-info/entry_points.txt,sha256=75v_DA_Xu0qr0eqtEXyh8sPCqcL9eXKWY8UwdST3ANE,79
|
|
10
|
-
airbyte_source_azure_blob_storage-0.4.2.dist-info/RECORD,,
|
|
File without changes
|