Skip to content

Commit

Permalink
chore: update example to read API_KEY from env
Browse files Browse the repository at this point in the history
  • Loading branch information
Kai Hu committed May 20, 2024
1 parent 4dda0c6 commit 66a5a7f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions sec_agent_sdk/api/default_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ def search_sec_filing(
self,
form_type: FormType,
company: StrictStr,
date_filed: StrictStr,
table: FilingTable,
date_filed: Optional[StrictStr] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand Down Expand Up @@ -126,8 +126,8 @@ def search_sec_filing_with_http_info(
self,
form_type: FormType,
company: StrictStr,
date_filed: StrictStr,
table: FilingTable,
date_filed: Optional[StrictStr] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand Down

0 comments on commit 66a5a7f

Please sign in to comment.