File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -24,9 +24,12 @@ pip install asktable
2424The full API of this library can be found in [ api.md] ( api.md ) .
2525
2626``` python
27+ import os
2728from asktable import Asktable
2829
29- client = Asktable()
30+ client = Asktable(
31+ api_key = os.environ.get(" ASKTABLE_API_KEY" ), # This is the default and can be omitted
32+ )
3033
3134datasource = client.datasources.create(
3235 engine = " mysql" ,
@@ -44,10 +47,13 @@ so that your API Key is not stored in source control.
4447Simply import ` AsyncAsktable ` instead of ` Asktable ` and use ` await ` with each API call:
4548
4649``` python
50+ import os
4751import asyncio
4852from asktable import AsyncAsktable
4953
50- client = AsyncAsktable()
54+ client = AsyncAsktable(
55+ api_key = os.environ.get(" ASKTABLE_API_KEY" ), # This is the default and can be omitted
56+ )
5157
5258
5359async def main () -> None :
You can’t perform that action at this time.
0 commit comments