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

[FEATURE] Accept kwargs for execute and executeStmt #1

Open
jeffreyaven opened this issue Feb 23, 2023 · 0 comments
Open

[FEATURE] Accept kwargs for execute and executeStmt #1

jeffreyaven opened this issue Feb 23, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@jeffreyaven
Copy link
Member

Feature Description
Allow kwargs to be supplied to the execute and executeStmt methods, named arguments supplied to these methods will override either equivalents which were supplied in the StackQL class constructor.

Example(s)

from pystackql import StackQL
provider_auth =  {
    "github": {
        "credentialsenvvar": "GITHUBCREDS",
        "type": "basic"
    }
}
stackql = StackQL(auth=provider_auth, output="csv")
print(stackql.execute("select id, name from github.repos.repos where org = 'stackql'"))

# returns: 
# id,name
# 443987542,stackql
# 441087132,stackql-provider-registry
# 455730530,pystackql
#456722161,stackql-jupyter-demo
# ...

print(stackql.execute("select id, name from github.repos.repos where org = 'stackql'", output="json"))

# returns:
# [{"id":"443987542","name":"stackql"},{"id":"441087132","name":"stackql-provider-registry"},...]
@jeffreyaven jeffreyaven added the enhancement New feature or request label Feb 23, 2023
@jeffreyaven jeffreyaven self-assigned this Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant