https://github.com/yoast/singer-tap-coosto
https://github.com/yoast/singer-tap-coosto
Last synced: 22 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/yoast/singer-tap-coosto
- Owner: Yoast
- License: agpl-3.0
- Created: 2021-04-07T07:54:25.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2022-09-30T08:27:42.000Z (over 3 years ago)
- Last Synced: 2025-01-02T08:31:49.469Z (over 1 year ago)
- Language: Python
- Size: 24.4 KB
- Stars: 0
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tap-coosto
This is a [Singer](https://singer.io) tap that produces JSON-formatted data
following the [Singer
spec](https://github.com/singer-io/getting-started/blob/master/SPEC.md).
This tap:
- Pulls raw data from [Coosto](https://in.coosto.com/api1doc)
- Extracts the following resources:
- Intervention details
- Comments
- Outputs the schema for each resource
- Incrementally pulls data based on the input state
## Step 1: Create a user
This user needs to have access to the API.
## Step 2: Configure
Create a file called `sample_config.json` in your working directory, following [sample_config.json](sample_config.json). The required parameters are the `username` and `password`. More information about authentication can be found in the [API Reference](https://in.coosto.com/api1doc)
This requires a [sample_state.json](sample_state.json) file to let the tap know from when to retrieve data. For example:
```json
{
"bookmarks": {
"intervention_details": {
"start_date": "2020-01-01"
},
"comments": {
"start_date": "2020-01-01"
}
}
}
```
Will replicate transaction data from 2015-01-01.
## Step 3: Install and Run
Create a virtual Python environment for this tap. This tap has been tested with Python 3.7, 3.8 and 3.9 and might run on future versions without problems.
```bash
python -m venv singer-coosto
singer-coosto/bin/python -m pip install --upgrade pip
singer-coosto/bin/pip install git+https://github.com/Yoast/singer-tap-coosto.git
```
This tap can be tested by piping the data to a local JSON target. For example:
Create a virtual Python environment with `singer-json`
```bash
python -m venv singer-json
singer-json/bin/python -m pip install --upgrade pip
singer-json/bin/pip install target-json
```
Test the tap:
```bash
singer-coosto/bin/tap-coosto --state sample_state.json -c sample_config.json | singer-json/bin/target-json >> state_result.json
```
Copyright © 2021 Yoast