@@ -106,7 +106,7 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
106106- [ PyCharm Pydantic Plugin] ( https://docs.pydantic.dev/latest/integrations/pycharm/ )
107107<!-- End IDE Support [idesupport] -->
108108
109- <!-- Start SDK Example Usage [usage] -->
109+ <!-- No SDK Example Usage [usage] -->
110110## SDK Example Usage
111111
112112### Example
@@ -116,10 +116,11 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
116116from gusto_embedded import Gusto
117117import os
118118
119- with Gusto(
120- company_access_auth = os.getenv( " GUSTO_COMPANY_ACCESS_AUTH " , " " ),
121- ) as gusto:
119+ auth_token = os.getenv( " GUSTO_COMPANY_ACCESS_AUTH " , None )
120+ if auth_token is None :
121+ raise ValueError ( " GUSTO_COMPANY_ACCESS_AUTH is not set " )
122122
123+ with Gusto(company_access_auth = auth_token) as gusto:
123124 res = gusto.introspection.get_info()
124125
125126 # Handle response
@@ -136,18 +137,19 @@ from gusto_embedded import Gusto
136137import os
137138
138139async def main ():
139- async with Gusto(
140- company_access_auth = os.getenv( " GUSTO_COMPANY_ACCESS_AUTH " , " " ),
141- ) as gusto:
140+ auth_token = os.getenv( " GUSTO_COMPANY_ACCESS_AUTH " , None )
141+ if auth_token is None :
142+ raise ValueError ( " GUSTO_COMPANY_ACCESS_AUTH is not set " )
142143
143- res = await gusto.introspection.get_info_async()
144+ async with Gusto(company_access_auth = auth_token) as gusto:
145+ res = gusto.introspection.get_info_async()
144146
145- # Handle response
146- print (res)
147+ # Handle response
148+ print (res)
147149
148150asyncio.run(main())
149151```
150- <!-- End SDK Example Usage [usage] -->
152+ <!-- No SDK Example Usage [usage] -->
151153
152154<!-- Start Authentication [security] -->
153155## Authentication
0 commit comments