forked from betodealmeida/shillelagh
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'betodealmeida:main' into main
- Loading branch information
Showing
86 changed files
with
3,688 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ Contributors | |
* Alex Rothberg <[email protected]> | ||
* Elias Sebbar <[email protected]> | ||
* Arash Afghahi <[email protected]> | ||
* Johannes Körner <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
""" | ||
A simple example showing the generic XML. | ||
""" | ||
|
||
import sys | ||
|
||
from shillelagh.backends.apsw.db import connect | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
""" | ||
A simple example querying the Preset API. | ||
""" | ||
|
||
from shillelagh.backends.apsw.db import connect | ||
|
||
if __name__ == "__main__": | ||
connection = connect( | ||
":memory:", | ||
# create tokens/secrets at https://manage.app.preset.io/app/user | ||
adapter_kwargs={ | ||
"presetapi": { | ||
"access_token": "", | ||
"access_secret": "", | ||
}, | ||
"presetworkspaceapi": { | ||
"access_token": "", | ||
"access_secret": "", | ||
}, | ||
}, | ||
) | ||
cursor = connection.cursor() | ||
|
||
SQL = """ | ||
SELECT * FROM | ||
"https://api.app.preset.io/v1/teams/" | ||
LIMIT 1 | ||
""" | ||
for row in cursor.execute(SQL): | ||
print(row) | ||
|
||
SQL = """ | ||
SELECT * FROM | ||
"https://d90230ca.us1a.app-sdx.preset.io/api/v1/chart/" | ||
LIMIT 12 | ||
""" | ||
for row in cursor.execute(SQL): | ||
print(row) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,8 @@ version_scheme = "no-guess-dev" | |
|
||
[tool.flake8] | ||
max-line-length = 90 | ||
|
||
[tool.ruff] | ||
exclude = [ | ||
"templates", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.