pipelinewise-tap-github
Singer tap that produces JSON-formatted data from the GitHub API following the Singer spec.
This is a PipelineWise compatible tap connector.
This tap:
- Pulls raw data from the GitHub REST API
- Extracts the following resources from GitHub for a single repository:
- Outputs the schema for each resource
- Incrementally pulls data based on the input state
Quick start
-
Install
We recommend using a virtualenv:
python3 -m venv venv . venv/bin/activate pip install --upgrade pip pip install .
-
Create a GitHub access token
Login to your GitHub account, go to the Personal Access Tokens settings page, and generate a new token with at least the
reposcope. Save this access token, you'll need it for the next step. -
Create the config file
Create a JSON file containing the required fields and/or the optional ones. You can decide between allow-list or deny-list strategy combining organization with repos_include and repos_exclude using wildcards.
| Config | Required? | Description |
|---|---|---|
| access_token | yes | The access token to access github api |
| start_date | yes | The date inclusive to start extracting the data |
| organization | no | The organization you want to extract the data from |
| repos_include | no | Allow list strategy to extract selected repos data from organization. Supports wildcard matching |
| repos_exclude | no | Deny list to extract all repos from organization except the ones listed. Supports wildcard matching |
| include_archived | no | true/false to include archived repos. Default false |
| include_disabled | no | true/false to include disabled repos. Default false |
| repository | no | (DEPRECATED) Allow list strategy to extract selected repos data from organization(has priority over repos_exclude) |
| max_rate_limit_wait_seconds | no | Max time to wait if you hit the github api limit. DEFAULT to 600s |
Example:
{
"access_token": "ghp_16C7e42F292c6912E7710c838347Ae178B4a",
"organization": "singer-io",
"repos_exclude": "*tests* api-docs",
"repos_include": "tap* getting-started pipelinewise-github",
"start_date": "2021-01-01T00:00:00Z",
"include_archived": false,
"include_disabled": false,
"max_rate_limit_wait_seconds": 800
}
You can also pass
singer-io/tap-github another-org/tap-octopusonrepos_include.
For retro compatibility you can pass
repository: "singer-io/tap-github singer-io/getting-started"
⚠️ If you have very small repos with total size less than 0.5KB: These will currently be excluded, as the Github repositories API returns
size: 0for these, andtap_github/__init__.pycurrently usessize <= 0as a way to filter out repos with no commits.
-
Run the tap in discovery mode to get properties.json file
tap-github --config config.json --discover > properties.json
-
In the properties.json file, select the streams to sync
Each stream in the properties.json file has a "schema" entry. To select a stream to sync, add
"selected": trueto that stream's "schema" entry. For example, to sync the pull_requests stream:... "tap_stream_id": "pull_requests", "schema": { "selected": true, "properties": { "updated_at": { "format": "date-time", "type": [ "null", "string" ] } ... -
Run the application
tap-githubcan be run with:tap-github --config config.json --properties properties.json
To run tests
- Install python test dependencies in a virtual env and run nose unit and integration tests
python3 -m venv venv
. venv/bin/activate
pip install --upgrade pip
pip install -e .[test]
- To run unit tests:
pytest tests/unittests
Metadata
Release files for pipelinewise-tap-github 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pipelinewise-tap-github-1.1.1.tar.gz | 28.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pipelinewise_tap_github-1.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 63.2 kB
Release files / pipelinewise-tap-github-1.1.1.tar.gz
| Download URL | pipelinewise-tap-github-1.1.1.tar.gz |
|---|---|
| Size | 28.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d2096a1517a4e8b008aefc81aa92ec71f1bfab65834564b5e42cebfd8d3af88e
|
|
BLAKE2b-256 checksum How to use checksums |
7cc65b979c7a84183d245f7691c9e46ae6cd59d04f8d45715deeb1c25f73d822
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|
Release files / pipelinewise_tap_github-1.1.1-py3-none-any.whl
| Download URL | pipelinewise_tap_github-1.1.1-py3-none-any.whl |
|---|---|
| Size | 34.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6dab4167cef22724e1891ae318e8aee21828a96dfc4517cb8176b463e5035503
|
|
BLAKE2b-256 checksum How to use checksums |
1906b48d03906e8847fd156dfeebb0a5aa6711389088c845daf66145d8a5eed4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|
Security for pipelinewise-tap-github 1.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.