-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update example to read API_KEY from env
- Loading branch information
Kai Hu
committed
May 20, 2024
1 parent
4dda0c6
commit 66a5a7f
Showing
2 changed files
with
4 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ Please reach out at [email protected] for an API key. | |
📜 Examples | ||
|
||
```python | ||
import os | ||
import sec_agent_sdk | ||
from sec_agent_sdk import FormType, FilingTable | ||
from sec_agent_sdk.rest import ApiException | ||
|
@@ -36,7 +37,7 @@ from pprint import pprint | |
configuration = sec_agent_sdk.Configuration() | ||
|
||
# Configure API key authorization: APIKeyHeader | ||
configuration.api_key['APIKeyHeader'] = 'YOUR_API_KEY' | ||
configuration.api_key['APIKeyHeader'] = os.environ["API_KEY"] | ||
|
||
# Enter a context with an instance of the API client | ||
with sec_agent_sdk.ApiClient(configuration) as api_client: | ||
|
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