Source implementation for Braintree.
Project description
Braintree Source
This is the repository for the Braintree source connector, written in Python. For information about how to use this connector within Airbyte, see the documentation.
Local development
Prerequisites
- Python (~=3.9)
- Poetry (~=1.7) - installation instructions here
Installing the connector
From this connector directory, run:
poetry install --with dev
Create credentials
If you are a community contributor, follow the instructions in the documentation
to generate the necessary credentials. Then create a file secrets/config.json
conforming to the source_braintree/spec.json
file.
Note that the secrets
directory is gitignored by default, so there is no danger of accidentally checking in sensitive information.
See integration_tests/sample_config.json
for a sample config file.
If you are an Airbyte core member, copy the credentials in Lastpass under the secret name source braintree test creds
and place them into secrets/config.json
.
Locally running the connector
poetry run source-braintree spec
poetry run source-braintree check --config secrets/config.json
poetry run source-braintree discover --config secrets/config.json
poetry run source-braintree read --config secrets/config.json --catalog sample_files/configured_catalog.json
Running unit tests
To run unit tests locally, from the connector directory run:
poetry run pytest
Locally running the connector docker image
Build
Via airbyte-ci
(recommended):
airbyte-ci connectors --name=source-braintree build
An image will be built with the tag airbyte/source-braintree:dev
.
Run
Then run any of the connector commands as follows:
docker run --rm airbyte/source-braintree:dev spec
docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-braintree:dev check --config /secrets/config.json
docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-braintree:dev discover --config /secrets/config.json
docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-braintree:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
Testing
You can run our full test suite locally using airbyte-ci
:
airbyte-ci connectors --name=source-braintree test
Customizing acceptance Tests
Customize acceptance-test-config.yml
file to configure tests. See Connector Acceptance Tests for more information.
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.
Dependency Management
All of your dependencies should be managed via Poetry. To add a new dependency, run:
poetry add <package-name>
Please commit the changes to pyproject.toml
and poetry.lock
files.
Publishing a new version of the connector
You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what?
- Make sure your changes are passing our test suite:
airbyte-ci connectors --name=source-braintree test
- Bump the connector version (please follow semantic versioning for connectors):
- bump the
dockerImageTag
value in inmetadata.yaml
- bump the
version
value inpyproject.toml
- bump the
- Make sure the
metadata.yaml
content is up to date. - Make the connector documentation and its changelog is up to date (
docs/integrations/sources/braintree.md
). - Create a Pull Request: use our PR naming conventions.
- Pat yourself on the back for being an awesome contributor.
- Someone from Airbyte will take a look at your PR and iterate with you to merge it into master.
- Once your PR is merged, the new version of the connector will be automatically published to Docker Hub and our connector registry.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file airbyte_source_braintree-0.3.21.tar.gz
.
File metadata
- Download URL: airbyte_source_braintree-0.3.21.tar.gz
- Upload date:
- Size: 28.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.10.15 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36a3cc3998867bc8e929f1fbf290c5e67e5ef768b5617775d525f0ea18c3c070 |
|
MD5 | 41da3e30c6912290e4d0fba278a10b74 |
|
BLAKE2b-256 | c3b16fc485498ec940b285add2b494fecdc148f5aaa66f218997beb5429f74ee |
File details
Details for the file airbyte_source_braintree-0.3.21-py3-none-any.whl
.
File metadata
- Download URL: airbyte_source_braintree-0.3.21-py3-none-any.whl
- Upload date:
- Size: 32.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.10.15 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0be20a6230489de30145ace136655bee8cfe407c6238cbb883dcb7f2a1af2a6 |
|
MD5 | 6b4f33c2395803df61a1a58957d88ac7 |
|
BLAKE2b-256 | 22146e929c1a6d780a6aa6c85c666b015cd06500f3055b0f1be687d117ea241e |