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

custom api transform support #843

Merged
merged 2 commits into from
Jun 4, 2024
Merged

custom api transform support #843

merged 2 commits into from
Jun 4, 2024

Conversation

Abhinav-Naikawadi
Copy link
Contributor

Pull Review Summary

Description

New custom API transform support

Type of change

  • New feature (change which adds functionality)

Tests

Tested locally

Copy link
Contributor

@nihit nihit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm otherwise

Comment on lines 119 to 122
request_template = f"{self.base_url}?" + "&".join(
[f"{col}={{{col}}}" for col in self.request_columns if col in row]
)
url = request_template.format_map(defaultdict(str, row))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's use a standardized library like requests or similar to do this - we need to make sure parameter values are urlencoded etc.

r = requests.get(base_url, params={'key': 'value', ...})
print(r.url)

@Abhinav-Naikawadi Abhinav-Naikawadi merged commit 26ccd92 into main Jun 4, 2024
2 checks passed
@Abhinav-Naikawadi Abhinav-Naikawadi deleted the custom_api branch June 4, 2024 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants