@@ -16,9 +16,9 @@ The Steadfast SDK uses API key and secret key authentication. Credentials can be
1616### Method 1: Direct Parameters
1717
1818``` python
19- from steadfast import SteadastClient
19+ from steadfast import SteadfastClient
2020
21- client = SteadastClient (
21+ client = SteadfastClient (
2222 api_key = " your_api_key" ,
2323 secret_key = " your_secret_key"
2424)
@@ -36,9 +36,9 @@ export STEADFAST_SECRET_KEY="your_secret_key"
3636Then initialize without parameters:
3737
3838``` python
39- from steadfast import SteadastClient
39+ from steadfast import SteadfastClient
4040
41- client = SteadastClient ()
41+ client = SteadfastClient ()
4242```
4343
4444### Method 3: .env File
@@ -54,20 +54,20 @@ Load with python-dotenv:
5454
5555``` python
5656from dotenv import load_dotenv
57- from steadfast import SteadastClient
57+ from steadfast import SteadfastClient
5858
5959load_dotenv()
60- client = SteadastClient ()
60+ client = SteadfastClient ()
6161```
6262
6363## Configuration
6464
6565### Custom Base URL
6666
6767``` python
68- from steadfast import SteadastClient
68+ from steadfast import SteadfastClient
6969
70- client = SteadastClient (
70+ client = SteadfastClient (
7171 api_key = " your_api_key" ,
7272 secret_key = " your_secret_key" ,
7373 base_url = " https://custom.api.com"
@@ -78,7 +78,7 @@ client = SteadastClient(
7878
7979``` python
8080import os
81- from steadfast import SteadastClient
81+ from steadfast import SteadfastClient
8282
8383env = os.getenv(" ENVIRONMENT" , " production" )
8484
@@ -87,7 +87,7 @@ if env == "development":
8787else :
8888 base_url = " https://api.steadfast.io"
8989
90- client = SteadastClient (
90+ client = SteadfastClient (
9191 api_key = os.getenv(" STEADFAST_API_KEY" ),
9292 secret_key = os.getenv(" STEADFAST_SECRET_KEY" ),
9393 base_url = base_url
@@ -100,7 +100,7 @@ client = SteadastClient(
100100
101101❌ ** Bad:**
102102``` python
103- client = SteadastClient (
103+ client = SteadfastClient (
104104 api_key = " abc123def456" ,
105105 secret_key = " xyz789uvw012"
106106)
@@ -109,9 +109,9 @@ client = SteadastClient(
109109✅ ** Good:**
110110``` python
111111import os
112- from steadfast import SteadastClient
112+ from steadfast import SteadfastClient
113113
114- client = SteadastClient (
114+ client = SteadfastClient (
115115 api_key = os.getenv(" STEADFAST_API_KEY" ),
116116 secret_key = os.getenv(" STEADFAST_SECRET_KEY" )
117117)
@@ -150,8 +150,8 @@ else:
150150 api_key = os.getenv(" DEV_STEADFAST_API_KEY" )
151151 secret_key = os.getenv(" DEV_STEADFAST_SECRET_KEY" )
152152
153- from steadfast import SteadastClient
154- client = SteadastClient (api_key = api_key, secret_key = secret_key)
153+ from steadfast import SteadfastClient
154+ client = SteadfastClient (api_key = api_key, secret_key = secret_key)
155155```
156156
157157### 5. Restrict Key Permissions
@@ -165,10 +165,10 @@ client = SteadastClient(api_key=api_key, secret_key=secret_key)
165165### Missing Credentials
166166
167167``` python
168- from steadfast import SteadastClient , ConfigurationError
168+ from steadfast import SteadfastClient , ConfigurationError
169169
170170try :
171- client = SteadastClient () # No credentials provided
171+ client = SteadfastClient () # No credentials provided
172172except ConfigurationError as e:
173173 print (f " Configuration error: { e} " )
174174 # Set STEADFAST_API_KEY and STEADFAST_SECRET_KEY environment variables
@@ -177,9 +177,9 @@ except ConfigurationError as e:
177177### Invalid Credentials
178178
179179``` python
180- from steadfast import SteadastClient , AuthenticationError
180+ from steadfast import SteadfastClient , AuthenticationError
181181
182- client = SteadastClient (
182+ client = SteadfastClient (
183183 api_key = " invalid_key" ,
184184 secret_key = " invalid_secret"
185185)
@@ -198,24 +198,24 @@ except AuthenticationError as e:
198198``` python
199199import os
200200from unittest.mock import patch
201- from steadfast import SteadastClient
201+ from steadfast import SteadfastClient
202202
203203# Mock environment variables
204204with patch.dict(os.environ, {
205205 " STEADFAST_API_KEY" : " test_key" ,
206206 " STEADFAST_SECRET_KEY" : " test_secret"
207207}):
208- client = SteadastClient ()
208+ client = SteadfastClient ()
209209 # Use client for testing
210210```
211211
212212### Using Test Credentials
213213
214214``` python
215- from steadfast import SteadastClient
215+ from steadfast import SteadfastClient
216216
217217# Use test/sandbox credentials
218- client = SteadastClient (
218+ client = SteadfastClient (
219219 api_key = " test_api_key" ,
220220 secret_key = " test_secret_key" ,
221221 base_url = " https://sandbox.api.steadfast.io"
@@ -257,14 +257,14 @@ client = SteadastClient(
257257``` python
258258import os
259259from dotenv import load_dotenv
260- from steadfast import SteadastClient , ConfigurationError
260+ from steadfast import SteadfastClient , ConfigurationError
261261
262262# Load environment variables
263263load_dotenv()
264264
265265try :
266266 # Initialize client
267- client = SteadastClient (
267+ client = SteadfastClient (
268268 api_key = os.getenv(" STEADFAST_API_KEY" ),
269269 secret_key = os.getenv(" STEADFAST_SECRET_KEY" )
270270 )
0 commit comments