airbyte-source-cart 0.3.1__tar.gz

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.
Files changed (29) hide show
  1. airbyte-source-cart-0.3.1/PKG-INFO +98 -0
  2. airbyte-source-cart-0.3.1/README.md +99 -0
  3. airbyte-source-cart-0.3.1/airbyte_source_cart.egg-info/PKG-INFO +98 -0
  4. airbyte-source-cart-0.3.1/airbyte_source_cart.egg-info/SOURCES.txt +28 -0
  5. airbyte-source-cart-0.3.1/airbyte_source_cart.egg-info/dependency_links.txt +1 -0
  6. airbyte-source-cart-0.3.1/airbyte_source_cart.egg-info/entry_points.txt +2 -0
  7. airbyte-source-cart-0.3.1/airbyte_source_cart.egg-info/requires.txt +6 -0
  8. airbyte-source-cart-0.3.1/airbyte_source_cart.egg-info/top_level.txt +2 -0
  9. airbyte-source-cart-0.3.1/integration_tests/__init__.py +0 -0
  10. airbyte-source-cart-0.3.1/integration_tests/abnormal_state.json +9 -0
  11. airbyte-source-cart-0.3.1/integration_tests/acceptance.py +14 -0
  12. airbyte-source-cart-0.3.1/integration_tests/configured_catalog.json +85 -0
  13. airbyte-source-cart-0.3.1/integration_tests/configured_catalog_wo_order_statuses.json +76 -0
  14. airbyte-source-cart-0.3.1/integration_tests/integration_test.py +7 -0
  15. airbyte-source-cart-0.3.1/integration_tests/invalid_config.json +8 -0
  16. airbyte-source-cart-0.3.1/setup.cfg +96 -0
  17. airbyte-source-cart-0.3.1/setup.py +43 -0
  18. airbyte-source-cart-0.3.1/source_cart/__init__.py +27 -0
  19. airbyte-source-cart-0.3.1/source_cart/run.py +14 -0
  20. airbyte-source-cart-0.3.1/source_cart/schemas/addresses.json +67 -0
  21. airbyte-source-cart-0.3.1/source_cart/schemas/customers_cart.json +127 -0
  22. airbyte-source-cart-0.3.1/source_cart/schemas/order_items.json +151 -0
  23. airbyte-source-cart-0.3.1/source_cart/schemas/order_payments.json +109 -0
  24. airbyte-source-cart-0.3.1/source_cart/schemas/order_statuses.json +21 -0
  25. airbyte-source-cart-0.3.1/source_cart/schemas/orders.json +198 -0
  26. airbyte-source-cart-0.3.1/source_cart/schemas/products.json +382 -0
  27. airbyte-source-cart-0.3.1/source_cart/source.py +156 -0
  28. airbyte-source-cart-0.3.1/source_cart/spec.json +86 -0
  29. airbyte-source-cart-0.3.1/source_cart/streams.py +182 -0
@@ -0,0 +1,98 @@
1
+ Metadata-Version: 2.1
2
+ Name: airbyte-source-cart
3
+ Version: 0.3.1
4
+ Summary: Source implementation for Cart.
5
+ Author: Airbyte
6
+ Author-email: contact@airbyte.io
7
+ Description-Content-Type: text/markdown
8
+ Requires-Dist: airbyte-cdk
9
+ Provides-Extra: tests
10
+ Requires-Dist: requests-mock~=1.9.3; extra == "tests"
11
+ Requires-Dist: pytest-mock~=3.6.1; extra == "tests"
12
+ Requires-Dist: pytest~=6.1; extra == "tests"
13
+
14
+ # Cart.com Source
15
+
16
+ This is the repository for the Cart.com source connector, written in Python.
17
+ For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.io/integrations/sources/cart).
18
+
19
+
20
+ **To iterate on this connector, make sure to complete this prerequisites section.**
21
+
22
+
23
+ From this connector directory, create a virtual environment:
24
+ ```
25
+ python -m venv .venv
26
+ ```
27
+
28
+ This will generate a virtualenv for this module in `.venv/`. Make sure this venv is active in your
29
+ development environment of choice. To activate it from the terminal, run:
30
+ ```
31
+ source .venv/bin/activate
32
+ pip install -r requirements.txt
33
+ ```
34
+ If you are in an IDE, follow your IDE's instructions to activate the virtualenv.
35
+
36
+ Note that while we are installing dependencies from `requirements.txt`, you should only edit `setup.py` for your dependencies. `requirements.txt` is
37
+ used for editable installs (`pip install -e`) to pull in Python dependencies from the monorepo and will call `setup.py`.
38
+ If this is mumbo jumbo to you, don't worry about it, just put your deps in `setup.py` but install using `pip install -r requirements.txt` and everything
39
+ should work as you expect.
40
+
41
+ **If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.io/integrations/sources/cart)
42
+ to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_cart/spec.json` file.
43
+ Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
44
+ See `integration_tests/sample_config.json` for a sample config file.
45
+
46
+ **If you are an Airbyte core member**, copy the credentials in Lastpass under the secret name `source cart test creds`
47
+ and place them into `secrets/config.json`.
48
+
49
+ ```
50
+ python main.py spec
51
+ python main.py check --config secrets/config.json
52
+ python main.py discover --config secrets/config.json
53
+ python main.py read --config secrets/config.json --catalog integration_tests/configured_catalog.json
54
+ ```
55
+
56
+
57
+
58
+ **Via [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md) (recommended):**
59
+ ```bash
60
+ airbyte-ci connectors --name=source-cart build
61
+ ```
62
+
63
+ An image will be built with the tag `airbyte/source-cart:dev`.
64
+
65
+ **Via `docker build`:**
66
+ ```bash
67
+ docker build -t airbyte/source-cart:dev .
68
+ ```
69
+
70
+ Then run any of the connector commands as follows:
71
+ ```
72
+ docker run --rm airbyte/source-cart:dev spec
73
+ docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-cart:dev check --config /secrets/config.json
74
+ docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-cart:dev discover --config /secrets/config.json
75
+ docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-cart:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
76
+ ```
77
+
78
+ You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md):
79
+ ```bash
80
+ airbyte-ci connectors --name=source-cart test
81
+ ```
82
+
83
+ Customize `acceptance-test-config.yml` file to configure tests. See [Connector Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference) for more information.
84
+ 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.
85
+
86
+ All of your dependencies should go in `setup.py`, NOT `requirements.txt`. The requirements file is only used to connect internal Airbyte dependencies in the monorepo for local development.
87
+ We split dependencies between two groups, dependencies that are:
88
+ * required for your connector to work need to go to `MAIN_REQUIREMENTS` list.
89
+ * required for the testing need to go to `TEST_REQUIREMENTS` list
90
+
91
+ You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what?
92
+ 1. Make sure your changes are passing our test suite: `airbyte-ci connectors --name=source-cart test`
93
+ 2. Bump the connector version in `metadata.yaml`: increment the `dockerImageTag` value. Please follow [semantic versioning for connectors](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#semantic-versioning-for-connectors).
94
+ 3. Make sure the `metadata.yaml` content is up to date.
95
+ 4. Make the connector documentation and its changelog is up to date (`docs/integrations/sources/cart.md`).
96
+ 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).
97
+ 6. Pat yourself on the back for being an awesome contributor.
98
+ 7. Someone from Airbyte will take a look at your PR and iterate with you to merge it into master.
@@ -0,0 +1,99 @@
1
+ # Cart.com Source
2
+
3
+ This is the repository for the Cart.com source connector, written in Python.
4
+ For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.io/integrations/sources/cart).
5
+
6
+ ## Local development
7
+
8
+ ### Prerequisites
9
+ **To iterate on this connector, make sure to complete this prerequisites section.**
10
+
11
+ #### Minimum Python version required `= 3.7.0`
12
+
13
+ #### Build & Activate Virtual Environment and install dependencies
14
+ From this connector directory, create a virtual environment:
15
+ ```
16
+ python -m venv .venv
17
+ ```
18
+
19
+ This will generate a virtualenv for this module in `.venv/`. Make sure this venv is active in your
20
+ development environment of choice. To activate it from the terminal, run:
21
+ ```
22
+ source .venv/bin/activate
23
+ pip install -r requirements.txt
24
+ ```
25
+ If you are in an IDE, follow your IDE's instructions to activate the virtualenv.
26
+
27
+ Note that while we are installing dependencies from `requirements.txt`, you should only edit `setup.py` for your dependencies. `requirements.txt` is
28
+ used for editable installs (`pip install -e`) to pull in Python dependencies from the monorepo and will call `setup.py`.
29
+ If this is mumbo jumbo to you, don't worry about it, just put your deps in `setup.py` but install using `pip install -r requirements.txt` and everything
30
+ should work as you expect.
31
+
32
+ #### Create credentials
33
+ **If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.io/integrations/sources/cart)
34
+ to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_cart/spec.json` file.
35
+ Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
36
+ See `integration_tests/sample_config.json` for a sample config file.
37
+
38
+ **If you are an Airbyte core member**, copy the credentials in Lastpass under the secret name `source cart test creds`
39
+ and place them into `secrets/config.json`.
40
+
41
+ ### Locally running the connector
42
+ ```
43
+ python main.py spec
44
+ python main.py check --config secrets/config.json
45
+ python main.py discover --config secrets/config.json
46
+ python main.py read --config secrets/config.json --catalog integration_tests/configured_catalog.json
47
+ ```
48
+
49
+ ### Locally running the connector docker image
50
+
51
+
52
+ #### Build
53
+ **Via [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md) (recommended):**
54
+ ```bash
55
+ airbyte-ci connectors --name=source-cart build
56
+ ```
57
+
58
+ An image will be built with the tag `airbyte/source-cart:dev`.
59
+
60
+ **Via `docker build`:**
61
+ ```bash
62
+ docker build -t airbyte/source-cart:dev .
63
+ ```
64
+
65
+ #### Run
66
+ Then run any of the connector commands as follows:
67
+ ```
68
+ docker run --rm airbyte/source-cart:dev spec
69
+ docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-cart:dev check --config /secrets/config.json
70
+ docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-cart:dev discover --config /secrets/config.json
71
+ docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-cart:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
72
+ ```
73
+
74
+ ## Testing
75
+ You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md):
76
+ ```bash
77
+ airbyte-ci connectors --name=source-cart test
78
+ ```
79
+
80
+ ### Customizing acceptance Tests
81
+ Customize `acceptance-test-config.yml` file to configure tests. See [Connector Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference) for more information.
82
+ 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.
83
+
84
+ ## Dependency Management
85
+ All of your dependencies should go in `setup.py`, NOT `requirements.txt`. The requirements file is only used to connect internal Airbyte dependencies in the monorepo for local development.
86
+ We split dependencies between two groups, dependencies that are:
87
+ * required for your connector to work need to go to `MAIN_REQUIREMENTS` list.
88
+ * required for the testing need to go to `TEST_REQUIREMENTS` list
89
+
90
+ ### Publishing a new version of the connector
91
+ You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what?
92
+ 1. Make sure your changes are passing our test suite: `airbyte-ci connectors --name=source-cart test`
93
+ 2. Bump the connector version in `metadata.yaml`: increment the `dockerImageTag` value. Please follow [semantic versioning for connectors](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#semantic-versioning-for-connectors).
94
+ 3. Make sure the `metadata.yaml` content is up to date.
95
+ 4. Make the connector documentation and its changelog is up to date (`docs/integrations/sources/cart.md`).
96
+ 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).
97
+ 6. Pat yourself on the back for being an awesome contributor.
98
+ 7. Someone from Airbyte will take a look at your PR and iterate with you to merge it into master.
99
+
@@ -0,0 +1,98 @@
1
+ Metadata-Version: 2.1
2
+ Name: airbyte-source-cart
3
+ Version: 0.3.1
4
+ Summary: Source implementation for Cart.
5
+ Author: Airbyte
6
+ Author-email: contact@airbyte.io
7
+ Description-Content-Type: text/markdown
8
+ Requires-Dist: airbyte-cdk
9
+ Provides-Extra: tests
10
+ Requires-Dist: requests-mock~=1.9.3; extra == "tests"
11
+ Requires-Dist: pytest-mock~=3.6.1; extra == "tests"
12
+ Requires-Dist: pytest~=6.1; extra == "tests"
13
+
14
+ # Cart.com Source
15
+
16
+ This is the repository for the Cart.com source connector, written in Python.
17
+ For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.io/integrations/sources/cart).
18
+
19
+
20
+ **To iterate on this connector, make sure to complete this prerequisites section.**
21
+
22
+
23
+ From this connector directory, create a virtual environment:
24
+ ```
25
+ python -m venv .venv
26
+ ```
27
+
28
+ This will generate a virtualenv for this module in `.venv/`. Make sure this venv is active in your
29
+ development environment of choice. To activate it from the terminal, run:
30
+ ```
31
+ source .venv/bin/activate
32
+ pip install -r requirements.txt
33
+ ```
34
+ If you are in an IDE, follow your IDE's instructions to activate the virtualenv.
35
+
36
+ Note that while we are installing dependencies from `requirements.txt`, you should only edit `setup.py` for your dependencies. `requirements.txt` is
37
+ used for editable installs (`pip install -e`) to pull in Python dependencies from the monorepo and will call `setup.py`.
38
+ If this is mumbo jumbo to you, don't worry about it, just put your deps in `setup.py` but install using `pip install -r requirements.txt` and everything
39
+ should work as you expect.
40
+
41
+ **If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.io/integrations/sources/cart)
42
+ to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_cart/spec.json` file.
43
+ Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
44
+ See `integration_tests/sample_config.json` for a sample config file.
45
+
46
+ **If you are an Airbyte core member**, copy the credentials in Lastpass under the secret name `source cart test creds`
47
+ and place them into `secrets/config.json`.
48
+
49
+ ```
50
+ python main.py spec
51
+ python main.py check --config secrets/config.json
52
+ python main.py discover --config secrets/config.json
53
+ python main.py read --config secrets/config.json --catalog integration_tests/configured_catalog.json
54
+ ```
55
+
56
+
57
+
58
+ **Via [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md) (recommended):**
59
+ ```bash
60
+ airbyte-ci connectors --name=source-cart build
61
+ ```
62
+
63
+ An image will be built with the tag `airbyte/source-cart:dev`.
64
+
65
+ **Via `docker build`:**
66
+ ```bash
67
+ docker build -t airbyte/source-cart:dev .
68
+ ```
69
+
70
+ Then run any of the connector commands as follows:
71
+ ```
72
+ docker run --rm airbyte/source-cart:dev spec
73
+ docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-cart:dev check --config /secrets/config.json
74
+ docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-cart:dev discover --config /secrets/config.json
75
+ docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-cart:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
76
+ ```
77
+
78
+ You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md):
79
+ ```bash
80
+ airbyte-ci connectors --name=source-cart test
81
+ ```
82
+
83
+ Customize `acceptance-test-config.yml` file to configure tests. See [Connector Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference) for more information.
84
+ 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.
85
+
86
+ All of your dependencies should go in `setup.py`, NOT `requirements.txt`. The requirements file is only used to connect internal Airbyte dependencies in the monorepo for local development.
87
+ We split dependencies between two groups, dependencies that are:
88
+ * required for your connector to work need to go to `MAIN_REQUIREMENTS` list.
89
+ * required for the testing need to go to `TEST_REQUIREMENTS` list
90
+
91
+ You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what?
92
+ 1. Make sure your changes are passing our test suite: `airbyte-ci connectors --name=source-cart test`
93
+ 2. Bump the connector version in `metadata.yaml`: increment the `dockerImageTag` value. Please follow [semantic versioning for connectors](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#semantic-versioning-for-connectors).
94
+ 3. Make sure the `metadata.yaml` content is up to date.
95
+ 4. Make the connector documentation and its changelog is up to date (`docs/integrations/sources/cart.md`).
96
+ 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).
97
+ 6. Pat yourself on the back for being an awesome contributor.
98
+ 7. Someone from Airbyte will take a look at your PR and iterate with you to merge it into master.
@@ -0,0 +1,28 @@
1
+ README.md
2
+ setup.cfg
3
+ setup.py
4
+ airbyte_source_cart.egg-info/PKG-INFO
5
+ airbyte_source_cart.egg-info/SOURCES.txt
6
+ airbyte_source_cart.egg-info/dependency_links.txt
7
+ airbyte_source_cart.egg-info/entry_points.txt
8
+ airbyte_source_cart.egg-info/requires.txt
9
+ airbyte_source_cart.egg-info/top_level.txt
10
+ integration_tests/__init__.py
11
+ integration_tests/abnormal_state.json
12
+ integration_tests/acceptance.py
13
+ integration_tests/configured_catalog.json
14
+ integration_tests/configured_catalog_wo_order_statuses.json
15
+ integration_tests/integration_test.py
16
+ integration_tests/invalid_config.json
17
+ source_cart/__init__.py
18
+ source_cart/run.py
19
+ source_cart/source.py
20
+ source_cart/spec.json
21
+ source_cart/streams.py
22
+ source_cart/schemas/addresses.json
23
+ source_cart/schemas/customers_cart.json
24
+ source_cart/schemas/order_items.json
25
+ source_cart/schemas/order_payments.json
26
+ source_cart/schemas/order_statuses.json
27
+ source_cart/schemas/orders.json
28
+ source_cart/schemas/products.json
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ source-cart = source_cart.run:run
@@ -0,0 +1,6 @@
1
+ airbyte-cdk
2
+
3
+ [tests]
4
+ requests-mock~=1.9.3
5
+ pytest-mock~=3.6.1
6
+ pytest~=6.1
@@ -0,0 +1,2 @@
1
+ integration_tests
2
+ source_cart
@@ -0,0 +1,9 @@
1
+ {
2
+ "customers_cart": { "updated_at": "2051-07-01T08:59:28.457-05:00" },
3
+ "orders": { "updated_at": "2051-07-01T08:59:28.457-05:00" },
4
+ "order_payments": { "updated_at": "2051-07-01T08:59:28.457-05:00" },
5
+ "order_items": { "updated_at": "2051-07-01T08:59:28.457-05:00" },
6
+ "products": { "updated_at": "2051-07-01T08:59:28.457-05:00" },
7
+ "addresses": { "updated_at": "2051-07-01T08:59:28.457-05:00" },
8
+ "order_statuses": { "updated_at": "2051-07-01T08:59:28.457-05:00" }
9
+ }
@@ -0,0 +1,14 @@
1
+ #
2
+ # Copyright (c) 2023 Airbyte, Inc., all rights reserved.
3
+ #
4
+
5
+
6
+ import pytest
7
+
8
+ pytest_plugins = ("connector_acceptance_test.plugin",)
9
+
10
+
11
+ @pytest.fixture(scope="session", autouse=True)
12
+ def connector_setup():
13
+ """This fixture is a placeholder for external resources that acceptance test might require."""
14
+ yield
@@ -0,0 +1,85 @@
1
+ {
2
+ "streams": [
3
+ {
4
+ "stream": {
5
+ "name": "customers_cart",
6
+ "json_schema": {},
7
+ "supported_sync_modes": ["full_refresh", "incremental"],
8
+ "source_defined_cursor": true,
9
+ "default_cursor_field": ["updated_at"]
10
+ },
11
+ "sync_mode": "incremental",
12
+ "cursor_field": ["updated_at"],
13
+ "destination_sync_mode": "append"
14
+ },
15
+ {
16
+ "stream": {
17
+ "name": "orders",
18
+ "json_schema": {},
19
+ "supported_sync_modes": ["full_refresh", "incremental"],
20
+ "source_defined_cursor": true,
21
+ "default_cursor_field": ["updated_at"]
22
+ },
23
+ "sync_mode": "incremental",
24
+ "cursor_field": ["updated_at"],
25
+ "destination_sync_mode": "append"
26
+ },
27
+ {
28
+ "stream": {
29
+ "name": "addresses",
30
+ "json_schema": {},
31
+ "supported_sync_modes": ["full_refresh", "incremental"],
32
+ "source_defined_cursor": true,
33
+ "default_cursor_field": ["updated_at"]
34
+ },
35
+ "sync_mode": "incremental",
36
+ "cursor_field": ["updated_at"],
37
+ "destination_sync_mode": "append"
38
+ },
39
+ {
40
+ "stream": {
41
+ "name": "order_payments",
42
+ "json_schema": {},
43
+ "supported_sync_modes": ["full_refresh", "incremental"],
44
+ "source_defined_cursor": true,
45
+ "default_cursor_field": ["updated_at"]
46
+ },
47
+ "sync_mode": "incremental",
48
+ "cursor_field": ["updated_at"],
49
+ "destination_sync_mode": "append"
50
+ },
51
+ {
52
+ "stream": {
53
+ "name": "order_items",
54
+ "json_schema": {},
55
+ "supported_sync_modes": ["full_refresh", "incremental"],
56
+ "source_defined_cursor": true,
57
+ "default_cursor_field": ["updated_at"]
58
+ },
59
+ "sync_mode": "incremental",
60
+ "cursor_field": ["updated_at"],
61
+ "destination_sync_mode": "append"
62
+ },
63
+ {
64
+ "stream": {
65
+ "name": "order_statuses",
66
+ "json_schema": {},
67
+ "supported_sync_modes": ["full_refresh"]
68
+ },
69
+ "sync_mode": "full_refresh",
70
+ "destination_sync_mode": "overwrite"
71
+ },
72
+ {
73
+ "stream": {
74
+ "name": "products",
75
+ "json_schema": {},
76
+ "supported_sync_modes": ["full_refresh", "incremental"],
77
+ "source_defined_cursor": true,
78
+ "default_cursor_field": ["updated_at"]
79
+ },
80
+ "sync_mode": "incremental",
81
+ "cursor_field": ["updated_at"],
82
+ "destination_sync_mode": "append"
83
+ }
84
+ ]
85
+ }
@@ -0,0 +1,76 @@
1
+ {
2
+ "streams": [
3
+ {
4
+ "stream": {
5
+ "name": "customers_cart",
6
+ "json_schema": {},
7
+ "supported_sync_modes": ["full_refresh", "incremental"],
8
+ "source_defined_cursor": true,
9
+ "default_cursor_field": ["updated_at"]
10
+ },
11
+ "sync_mode": "incremental",
12
+ "cursor_field": ["updated_at"],
13
+ "destination_sync_mode": "append"
14
+ },
15
+ {
16
+ "stream": {
17
+ "name": "orders",
18
+ "json_schema": {},
19
+ "supported_sync_modes": ["full_refresh", "incremental"],
20
+ "source_defined_cursor": true,
21
+ "default_cursor_field": ["updated_at"]
22
+ },
23
+ "sync_mode": "incremental",
24
+ "cursor_field": ["updated_at"],
25
+ "destination_sync_mode": "append"
26
+ },
27
+ {
28
+ "stream": {
29
+ "name": "addresses",
30
+ "json_schema": {},
31
+ "supported_sync_modes": ["full_refresh", "incremental"],
32
+ "source_defined_cursor": true,
33
+ "default_cursor_field": ["updated_at"]
34
+ },
35
+ "sync_mode": "incremental",
36
+ "cursor_field": ["updated_at"],
37
+ "destination_sync_mode": "append"
38
+ },
39
+ {
40
+ "stream": {
41
+ "name": "order_payments",
42
+ "json_schema": {},
43
+ "supported_sync_modes": ["full_refresh", "incremental"],
44
+ "source_defined_cursor": true,
45
+ "default_cursor_field": ["updated_at"]
46
+ },
47
+ "sync_mode": "incremental",
48
+ "cursor_field": ["updated_at"],
49
+ "destination_sync_mode": "append"
50
+ },
51
+ {
52
+ "stream": {
53
+ "name": "order_items",
54
+ "json_schema": {},
55
+ "supported_sync_modes": ["full_refresh", "incremental"],
56
+ "source_defined_cursor": true,
57
+ "default_cursor_field": ["updated_at"]
58
+ },
59
+ "sync_mode": "incremental",
60
+ "cursor_field": ["updated_at"],
61
+ "destination_sync_mode": "append"
62
+ },
63
+ {
64
+ "stream": {
65
+ "name": "products",
66
+ "json_schema": {},
67
+ "supported_sync_modes": ["full_refresh", "incremental"],
68
+ "source_defined_cursor": true,
69
+ "default_cursor_field": ["updated_at"]
70
+ },
71
+ "sync_mode": "incremental",
72
+ "cursor_field": ["updated_at"],
73
+ "destination_sync_mode": "append"
74
+ }
75
+ ]
76
+ }
@@ -0,0 +1,7 @@
1
+ #
2
+ # Copyright (c) 2023 Airbyte, Inc., all rights reserved.
3
+ #
4
+
5
+
6
+ def test_example_method():
7
+ assert True
@@ -0,0 +1,8 @@
1
+ {
2
+ "start_date": "2022-01-01T00:00:00Z",
3
+ "credentials": {
4
+ "auth_type": "SINGLE_STORE_ACCESS_TOKEN",
5
+ "store_name": "www.my_pretyy_store.com",
6
+ "access_token": "1234567890absc"
7
+ }
8
+ }
@@ -0,0 +1,96 @@
1
+ [metadata]
2
+ name = airbyte-source-cart
3
+ version = 0.3.1
4
+ author = Airbyte
5
+ author_email = contact@airbyte.io
6
+ long_description = # Cart.com Source
7
+
8
+ This is the repository for the Cart.com source connector, written in Python.
9
+ For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.io/integrations/sources/cart).
10
+
11
+
12
+ **To iterate on this connector, make sure to complete this prerequisites section.**
13
+
14
+
15
+ From this connector directory, create a virtual environment:
16
+ ```
17
+ python -m venv .venv
18
+ ```
19
+
20
+ This will generate a virtualenv for this module in `.venv/`. Make sure this venv is active in your
21
+ development environment of choice. To activate it from the terminal, run:
22
+ ```
23
+ source .venv/bin/activate
24
+ pip install -r requirements.txt
25
+ ```
26
+ If you are in an IDE, follow your IDE's instructions to activate the virtualenv.
27
+
28
+ Note that while we are installing dependencies from `requirements.txt`, you should only edit `setup.py` for your dependencies. `requirements.txt` is
29
+ used for editable installs (`pip install -e`) to pull in Python dependencies from the monorepo and will call `setup.py`.
30
+ If this is mumbo jumbo to you, don't worry about it, just put your deps in `setup.py` but install using `pip install -r requirements.txt` and everything
31
+ should work as you expect.
32
+
33
+ **If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.io/integrations/sources/cart)
34
+ to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_cart/spec.json` file.
35
+ Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
36
+ See `integration_tests/sample_config.json` for a sample config file.
37
+
38
+ **If you are an Airbyte core member**, copy the credentials in Lastpass under the secret name `source cart test creds`
39
+ and place them into `secrets/config.json`.
40
+
41
+ ```
42
+ python main.py spec
43
+ python main.py check --config secrets/config.json
44
+ python main.py discover --config secrets/config.json
45
+ python main.py read --config secrets/config.json --catalog integration_tests/configured_catalog.json
46
+ ```
47
+
48
+
49
+
50
+ **Via [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md) (recommended):**
51
+ ```bash
52
+ airbyte-ci connectors --name=source-cart build
53
+ ```
54
+
55
+ An image will be built with the tag `airbyte/source-cart:dev`.
56
+
57
+ **Via `docker build`:**
58
+ ```bash
59
+ docker build -t airbyte/source-cart:dev .
60
+ ```
61
+
62
+ Then run any of the connector commands as follows:
63
+ ```
64
+ docker run --rm airbyte/source-cart:dev spec
65
+ docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-cart:dev check --config /secrets/config.json
66
+ docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-cart:dev discover --config /secrets/config.json
67
+ docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-cart:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
68
+ ```
69
+
70
+ You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md):
71
+ ```bash
72
+ airbyte-ci connectors --name=source-cart test
73
+ ```
74
+
75
+ Customize `acceptance-test-config.yml` file to configure tests. See [Connector Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference) for more information.
76
+ 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.
77
+
78
+ All of your dependencies should go in `setup.py`, NOT `requirements.txt`. The requirements file is only used to connect internal Airbyte dependencies in the monorepo for local development.
79
+ We split dependencies between two groups, dependencies that are:
80
+ * required for your connector to work need to go to `MAIN_REQUIREMENTS` list.
81
+ * required for the testing need to go to `TEST_REQUIREMENTS` list
82
+
83
+ You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what?
84
+ 1. Make sure your changes are passing our test suite: `airbyte-ci connectors --name=source-cart test`
85
+ 2. Bump the connector version in `metadata.yaml`: increment the `dockerImageTag` value. Please follow [semantic versioning for connectors](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#semantic-versioning-for-connectors).
86
+ 3. Make sure the `metadata.yaml` content is up to date.
87
+ 4. Make the connector documentation and its changelog is up to date (`docs/integrations/sources/cart.md`).
88
+ 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).
89
+ 6. Pat yourself on the back for being an awesome contributor.
90
+ 7. Someone from Airbyte will take a look at your PR and iterate with you to merge it into master.
91
+ long_description_content_type = text/markdown
92
+
93
+ [egg_info]
94
+ tag_build =
95
+ tag_date = 0
96
+