Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Accept an app key + refresh token for Dropbox #325

Draft
wants to merge 1 commit into
base: edgarrmondragon/feat/fsspec
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/ci_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ on:
- pyproject.toml
- tox.ini
pull_request:
branches: [main]
paths:
- .github/workflows/ci_workflow.yml
- .github/workflows/constraints.txt
Expand Down
27 changes: 13 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,20 +93,18 @@ Optionally, the files definition can be provided by an external json file:

#### FTP

| Setting | Required | Default | Description |
| :----------- | :------- | :------ | :---------------------- |
| ftp | False | None | FTP connection settings |
| ftp.host | True | None | FTP server host |
| ftp.port | False | 21 | FTP server port |
| ftp.username | False | None | FTP username |
| ftp.password | False | None | FTP password |
| ftp.encoding | False | utf-8 | FTP server encoding |
| Setting | Required | Default | Description |
| :----------- | :------- | :------ | :------------------ |
| ftp.host | True | None | FTP server host |
| ftp.port | False | 21 | FTP server port |
| ftp.username | False | None | FTP username |
| ftp.password | False | None | FTP password |
| ftp.encoding | False | utf-8 | FTP server encoding |

#### GitHub

| Setting | Required | Default | Description |
| :-------------- | :------- | :------ | :---------------------------------------------------------- |
| github | False | None | GitHub connection settings |
| github.org | True | None | GitHub organization or user where the repository is located |
| github.repo | True | None | GitHub repository |
| github.username | False | None | GitHub username |
Expand Down Expand Up @@ -141,10 +139,10 @@ Optionally, the files definition can be provided by an external json file:

#### Dropbox

| Setting | Required | Default | Description |
| :------------ | :------- | :------ | :-------------------------- |
| dropbox | False | None | Dropbox connection settings |
| dropbox.token | True | None | Dropbox token |
| Setting | Required | Default | Description |
| :-------------------- | :------- | :------ | :-------------------- |
| dropbox.app_key | True | None | Dropbox App key |
| dropbox.refresh_token | True | None | Dropbox refresh token |

The token needs the `files.content.read` scope:

Expand All @@ -158,7 +156,8 @@ The token needs the `files.content.read` scope:
"add_metadata_columns": true,
"filesystem": "dropbox",
"dropbox": {
"token": "...."
"app_key": "your_app_key",
"refresh_token": "your_refresh_token"
},
"files": [
{
Expand Down
11 changes: 8 additions & 3 deletions meltano.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,14 @@ plugins:
sensitive: true

# Dropbox settings
- name: dropbox.token
label: Dropbox Token
description: Token for Dropbox
- name: dropbox.app_key
label: Dropbox App Key
description: OAuth2 app key for Dropbox
kind: string
sensitive: true
- name: dropbox.refresh_token
label: Dropbox Refresh Token
description: OAuth2 refresh Token for Dropbox
kind: password
sensitive: true

Expand Down
11 changes: 9 additions & 2 deletions tap_csv/filesystem_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,18 @@
"dropbox",
th.ObjectType(
th.Property(
"token",
"app_key",
th.StringType,
secret=True,
required=True,
description="Dropbox App key",
),
th.Property(
"refresh_token",
th.StringType,
secret=True,
required=True,
description="Dropbox token",
description="Dropbox refresh token",
),
),
description="Dropbox connection settings",
Expand Down