Skip to content

Commit 27b0f0a

Browse files
committed
Fix class name from SteadastClient to SteadfastClient throughout codebase
1 parent 6187a5a commit 27b0f0a

24 files changed

Lines changed: 146 additions & 139 deletions

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Steadfast Courier Python SDK
22

3-
[![Tests](https://github.com/mojnomiya/steadfast-python/actions/workflows/tests.yml/badge.svg)](https://github.com/mojnomiya/steadfast-python/actions/workflows/tests.yml)
4-
[![Publish](https://github.com/mojnomiya/steadfast-python/actions/workflows/publish.yml/badge.svg)](https://github.com/mojnomiya/steadfast-python/actions/workflows/publish.yml)
3+
<!-- [![Tests](https://github.com/mojnomiya/steadfast-python/actions/workflows/tests.yml/badge.svg)](https://github.com/mojnomiya/steadfast-python/actions/workflows/tests.yml)
4+
[![Publish](https://github.com/mojnomiya/steadfast-python/actions/workflows/publish.yml/badge.svg)](https://github.com/mojnomiya/steadfast-python/actions/workflows/publish.yml) -->
55
[![PyPI version](https://badge.fury.io/py/steadfast-python.svg)](https://badge.fury.io/py/steadfast-python)
66
[![Python versions](https://img.shields.io/pypi/pyversions/steadfast-python.svg)](https://pypi.org/project/steadfast-python/)
77
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
@@ -29,10 +29,10 @@ pip install steadfast-python
2929
## Quick Start
3030

3131
```python
32-
from steadfast import SteadastClient
32+
from steadfast import SteadfastClient
3333

3434
# Initialize client
35-
client = SteadastClient(
35+
client = SteadfastClient(
3636
api_key="your_api_key",
3737
secret_key="your_secret_key"
3838
)

docs/STEADFAST_README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Detailed checklist with:
6868

6969
### Module Structure
7070
```
71-
SteadastClient
71+
SteadfastClient
7272
├── orders (OrderModule)
7373
├── tracking (TrackingModule)
7474
├── balance (BalanceModule)

docs/authentication.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -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"
3636
Then 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
5656
from dotenv import load_dotenv
57-
from steadfast import SteadastClient
57+
from steadfast import SteadfastClient
5858

5959
load_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
8080
import os
81-
from steadfast import SteadastClient
81+
from steadfast import SteadfastClient
8282

8383
env = os.getenv("ENVIRONMENT", "production")
8484

@@ -87,7 +87,7 @@ if env == "development":
8787
else:
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
111111
import 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

170170
try:
171-
client = SteadastClient() # No credentials provided
171+
client = SteadfastClient() # No credentials provided
172172
except 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
199199
import os
200200
from unittest.mock import patch
201-
from steadfast import SteadastClient
201+
from steadfast import SteadfastClient
202202

203203
# Mock environment variables
204204
with 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
258258
import os
259259
from dotenv import load_dotenv
260-
from steadfast import SteadastClient, ConfigurationError
260+
from steadfast import SteadfastClient, ConfigurationError
261261

262262
# Load environment variables
263263
load_dotenv()
264264

265265
try:
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
)

docs/balance_management.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ def get_current_balance() -> Balance
2424

2525
**Example:**
2626
```python
27-
from steadfast import SteadastClient
27+
from steadfast import SteadfastClient
2828

29-
client = SteadastClient(api_key="key", secret_key="secret")
29+
client = SteadfastClient(api_key="key", secret_key="secret")
3030

3131
balance = client.balance.get_current_balance()
3232
print(f"Current balance: {balance.current_balance}")
@@ -44,9 +44,9 @@ The Balance object contains:
4444
## Error Handling
4545

4646
```python
47-
from steadfast import SteadastClient, APIError, NetworkError
47+
from steadfast import SteadfastClient, APIError, NetworkError
4848

49-
client = SteadastClient(api_key="key", secret_key="secret")
49+
client = SteadfastClient(api_key="key", secret_key="secret")
5050

5151
try:
5252
balance = client.balance.get_current_balance()
@@ -62,9 +62,9 @@ except NetworkError as e:
6262
### Check balance before creating orders
6363

6464
```python
65-
from steadfast import SteadastClient
65+
from steadfast import SteadfastClient
6666

67-
client = SteadastClient(api_key="key", secret_key="secret")
67+
client = SteadfastClient(api_key="key", secret_key="secret")
6868

6969
balance = client.balance.get_current_balance()
7070

@@ -86,9 +86,9 @@ else:
8686

8787
```python
8888
import time
89-
from steadfast import SteadastClient
89+
from steadfast import SteadfastClient
9090

91-
client = SteadastClient(api_key="key", secret_key="secret")
91+
client = SteadfastClient(api_key="key", secret_key="secret")
9292

9393
def monitor_balance(interval: int = 3600):
9494
"""Monitor balance every interval seconds (default 1 hour)"""

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
sys.path.insert(0, os.path.abspath(".."))
66

77
project = "Steadfast Courier Python SDK"
8-
copyright = "2024, Md Mojno Miya"
8+
copyright = "2026, Md Mojno Miya"
99
author = "Md Mojno Miya"
1010
release = "0.2.0"
1111

docs/error_handling.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ from steadfast import ConfigurationError
114114

115115
try:
116116
# Missing API key
117-
client = SteadastClient(secret_key="secret")
117+
client = SteadfastClient(secret_key="secret")
118118
except ConfigurationError as e:
119119
print(f"Configuration error: {e}")
120120
```
@@ -124,9 +124,9 @@ except ConfigurationError as e:
124124
### Basic Try-Catch
125125

126126
```python
127-
from steadfast import SteadastClient, ValidationError, APIError, NetworkError
127+
from steadfast import SteadfastClient, ValidationError, APIError, NetworkError
128128

129-
client = SteadastClient(api_key="key", secret_key="secret")
129+
client = SteadfastClient(api_key="key", secret_key="secret")
130130

131131
try:
132132
order = client.orders.create(
@@ -150,9 +150,9 @@ except NetworkError as e:
150150

151151
```python
152152
import time
153-
from steadfast import SteadastClient, NetworkError
153+
from steadfast import SteadfastClient, NetworkError
154154

155-
client = SteadastClient(api_key="key", secret_key="secret")
155+
client = SteadfastClient(api_key="key", secret_key="secret")
156156

157157
def create_order_with_retry(max_retries: int = 3):
158158
for attempt in range(max_retries):
@@ -181,15 +181,15 @@ order = create_order_with_retry()
181181

182182
```python
183183
from steadfast import (
184-
SteadastClient,
184+
SteadfastClient,
185185
ValidationError,
186186
NotFoundError,
187187
AuthenticationError,
188188
APIError,
189189
NetworkError,
190190
)
191191

192-
client = SteadastClient(api_key="key", secret_key="secret")
192+
client = SteadfastClient(api_key="key", secret_key="secret")
193193

194194
try:
195195
status = client.tracking.get_status_by_consignment_id(123)
@@ -213,9 +213,9 @@ except NetworkError as e:
213213
### Bulk Operation Error Handling
214214

215215
```python
216-
from steadfast import SteadastClient
216+
from steadfast import SteadfastClient
217217

218-
client = SteadastClient(api_key="key", secret_key="secret")
218+
client = SteadfastClient(api_key="key", secret_key="secret")
219219

220220
orders = [
221221
{
@@ -263,10 +263,10 @@ except Exception as e:
263263
### Invalid Credentials
264264

265265
```python
266-
from steadfast import SteadastClient, ConfigurationError
266+
from steadfast import SteadfastClient, ConfigurationError
267267

268268
try:
269-
client = SteadastClient() # No credentials provided
269+
client = SteadfastClient() # No credentials provided
270270
except ConfigurationError as e:
271271
print(f"Error: {e}")
272272
# Solution: Provide api_key and secret_key or set environment variables

docs/index.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ STEADFAST_SECRET_KEY=your_secret_key
4141
### 3. Initialize Client
4242

4343
```python
44-
from steadfast import SteadastClient
44+
from steadfast import SteadfastClient
4545

46-
client = SteadastClient(
46+
client = SteadfastClient(
4747
api_key="your_api_key",
4848
secret_key="your_secret_key"
4949
)
@@ -147,7 +147,7 @@ The SDK provides specific exceptions for different error scenarios:
147147

148148
```python
149149
from steadfast import (
150-
SteadastClient,
150+
SteadfastClient,
151151
ValidationError,
152152
NotFoundError,
153153
AuthenticationError,
@@ -174,9 +174,9 @@ except NetworkError as e:
174174
### Create Order and Track
175175

176176
```python
177-
from steadfast import SteadastClient
177+
from steadfast import SteadfastClient
178178

179-
client = SteadastClient(api_key="key", secret_key="secret")
179+
client = SteadfastClient(api_key="key", secret_key="secret")
180180

181181
# Create order
182182
order = client.orders.create(
@@ -249,6 +249,6 @@ MIT License - See LICENSE file for details
249249

250250
## Version
251251

252-
Current version: 0.1.0
252+
Current version: 0.2.0
253253

254254
See [CHANGELOG](../CHANGELOG.md) for version history.

0 commit comments

Comments
 (0)