Skip to content

Commit ce83ea1

Browse files
committed
## Python SDK Changes:
* `shippo.batches.create()`: * `request.batch_shipments.[].shipment` **Changed** **Breaking** ⚠️ * `shippo.batches.add_shipments()`: * `request_body.[].shipment` **Changed** **Breaking** ⚠️ * `shippo.carrier_accounts.register()`: `request` **Changed** **Breaking** ⚠️ * `shippo.rates_at_checkout.create()`: * `request.parcel.[parcel].template.[parcel_template_couriers_please_enum]` **Removed** **Breaking** ⚠️ * `shippo.parcels.create()`: * `request.[parcel_create_from_template_request].template.[parcel_template_couriers_please_enum]` **Removed** **Breaking** ⚠️ * `response.template.[parcel_template_couriers_please_enum]` **Removed** * `shippo.shipments.create()`: * `request` **Changed** **Breaking** ⚠️ * `response` **Changed** * `shippo.transactions.create()`: * `request.[instant_transaction_create_request].shipment` **Changed** **Breaking** ⚠️ * `shippo.carrier_accounts.list()`: * `request.carrier` **Changed** * `shippo.parcels.list()`: `response.results.[].template.[parcel_template_couriers_please_enum]` **Removed** * `shippo.parcels.get()`: `response.template.[parcel_template_couriers_please_enum]` **Removed** * `shippo.shipments.list()`: `response.results.[]` **Changed** * `shippo.shipments.get()`: `response` **Changed**
1 parent cdbe0c1 commit ce83ea1

143 files changed

Lines changed: 4661 additions & 5518 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
**/__pycache__/
2+
**/.speakeasy/temp/
3+
**/.speakeasy/logs/
4+
.env
5+
.env.local
16
.venv/
27
pyrightconfig.json
38
.speakeasy/reports

.speakeasy/gen.lock

Lines changed: 81 additions & 89 deletions
Large diffs are not rendered by default.

.speakeasy/gen.yaml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,42 @@ generation:
44
maintainOpenAPIOrder: true
55
usageSnippets:
66
optionalPropertyRendering: withExample
7+
sdkInitStyle: constructor
78
useClassNamesForArrayFields: true
89
fixes:
910
nameResolutionDec2023: true
1011
nameResolutionFeb2025: true
1112
parameterOrderingFeb2024: true
1213
requestResponseComponentNamesFeb2024: true
1314
securityFeb2025: false
15+
sharedErrorComponentsApr2025: false
1416
auth:
1517
oAuth2ClientCredentialsEnabled: true
1618
oAuth2PasswordEnabled: false
19+
hoistGlobalSecurity: true
20+
schemas:
21+
allOfMergeStrategy: shallowMerge
22+
requestBodyFieldName: ""
23+
tests:
24+
generateTests: true
25+
generateNewTests: false
26+
skipResponseBodyAssertions: false
1727
python:
18-
version: 4.0.0
28+
version: 4.1.0
1929
additionalDependencies:
2030
dev:
2131
httpretty: ==1.1.4
2232
marshmallow: ==3.23.1
2333
pytest: ==8.3.3
2434
pytest-asyncio: ==0.25.3
2535
main: {}
36+
allowedRedefinedBuiltins:
37+
- id
38+
- object
39+
asyncMode: both
2640
authors:
2741
- Shippo
42+
baseErrorName: ShippoError
2843
clientServerStatusCodesAsErrors: true
2944
defaultErrorName: SDKError
3045
description: Shipping API Python library (USPS, FedEx, UPS and more)
@@ -43,13 +58,19 @@ python:
4358
operations: models/operations
4459
shared: models/components
4560
webhooks: models/webhooks
61+
inferUnionDiscriminators: true
4662
inputModelSuffix: input
4763
license: MIT License
4864
maxMethodParams: 3
4965
methodArguments: require-security-and-request
66+
moduleName: ""
67+
multipartArrayFormat: legacy
5068
outputModelSuffix: output
69+
packageManager: poetry
5170
packageName: shippo
5271
projectUrls: {}
72+
pytestFilterWarnings: []
5373
pytestTimeout: 0
5474
responseFormat: flat
75+
sseFlatResponse: false
5576
templateVersion: v2

.speakeasy/workflow.lock

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
1-
speakeasyVersion: 1.521.1
1+
speakeasyVersion: 1.665.0
22
sources:
33
openapi:
44
sourceNamespace: openapi
5-
sourceRevisionDigest: sha256:e8ab98342833888dbc4dd20f683ee5fb7791107d8574b8dfabce743bc3675cd0
6-
sourceBlobDigest: sha256:8c66d55b10c00886e8fd1f2b6ea6b233bccf17f622fed046dcf302d5da3f91f5
5+
sourceRevisionDigest: sha256:e275ce6f8da1c8ae714c70cd579f4df62e737bce483d2e85200465dca1ed5018
6+
sourceBlobDigest: sha256:9360f40dbc6ba321253ee21323ba97cafc6f738bd16a762d4d7da5739bf7e798
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1732493299
9+
- speakeasy-sdk-regen-1743448946
1010
- "2018-02-08"
1111
targets:
1212
first-target:
1313
source: openapi
1414
sourceNamespace: openapi
15-
sourceRevisionDigest: sha256:e8ab98342833888dbc4dd20f683ee5fb7791107d8574b8dfabce743bc3675cd0
16-
sourceBlobDigest: sha256:8c66d55b10c00886e8fd1f2b6ea6b233bccf17f622fed046dcf302d5da3f91f5
15+
sourceRevisionDigest: sha256:e275ce6f8da1c8ae714c70cd579f4df62e737bce483d2e85200465dca1ed5018
16+
sourceBlobDigest: sha256:9360f40dbc6ba321253ee21323ba97cafc6f738bd16a762d4d7da5739bf7e798
17+
codeSamplesNamespace: openapi-python-code-samples
18+
codeSamplesRevisionDigest: sha256:492eb0ab1536f737d9cd32ab2c80aaf3dbcf2bc5c476a1f1d23e2d0201e096ae
1719
workflow:
1820
workflowVersion: 1.0.0
1921
speakeasyVersion: latest
@@ -32,5 +34,5 @@ workflow:
3234
token: $pypi_token
3335
codeSamples:
3436
registry:
35-
location: registry.speakeasyapi.dev/shippo/shippo/openapi-code-samples
37+
location: registry.speakeasyapi.dev/shippo/shippo/openapi-python-code-samples
3638
blocking: false

.speakeasy/workflow.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ targets:
1515
token: $pypi_token
1616
codeSamples:
1717
registry:
18-
location: registry.speakeasyapi.dev/shippo/shippo/openapi-code-samples
18+
location: registry.speakeasyapi.dev/shippo/shippo/openapi-python-code-samples
1919
blocking: false

README-PYPI.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,15 @@ Shippo external API.: Use this API to integrate with the Shippo service
4747
>
4848
> Once a Python version reaches its [official end of life date](https://devguide.python.org/versions/), a 3-month grace period is provided for users to upgrade. Following this grace period, the minimum python version supported in the SDK will be updated.
4949
50-
The SDK can be installed with either *pip* or *poetry* package managers.
50+
The SDK can be installed with *uv*, *pip*, or *poetry* package managers.
51+
52+
### uv
53+
54+
*uv* is a fast Python package installer and resolver, designed as a drop-in replacement for pip and pip-tools. It's recommended for its speed and modern Python tooling capabilities.
55+
56+
```bash
57+
uv add shippo
58+
```
5159

5260
### PIP
5361

@@ -140,15 +148,13 @@ from shippo.utils import BackoffStrategy, RetryConfig
140148

141149

142150
with Shippo(
143-
api_key_header="<YOUR_API_KEY_HERE>",
144151
shippo_api_version="2018-02-08",
152+
api_key_header="<YOUR_API_KEY_HERE>",
145153
) as s_client:
146154

147-
res = s_client.addresses.list(,
155+
res = s_client.addresses.list(page=1, results=5,
148156
RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
149157

150-
assert res is not None
151-
152158
# Handle response
153159
print(res)
154160

@@ -162,13 +168,11 @@ from shippo.utils import BackoffStrategy, RetryConfig
162168

163169
with Shippo(
164170
retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
165-
api_key_header="<YOUR_API_KEY_HERE>",
166171
shippo_api_version="2018-02-08",
172+
api_key_header="<YOUR_API_KEY_HERE>",
167173
) as s_client:
168174

169-
res = s_client.addresses.list()
170-
171-
assert res is not None
175+
res = s_client.addresses.list(page=1, results=5)
172176

173177
# Handle response
174178
print(res)
@@ -294,8 +298,8 @@ from shippo import Shippo
294298
def main():
295299

296300
with Shippo(
297-
api_key_header="<YOUR_API_KEY_HERE>",
298301
shippo_api_version="2018-02-08",
302+
api_key_header="<YOUR_API_KEY_HERE>",
299303
) as s_client:
300304
# Rest of application here...
301305

@@ -304,8 +308,8 @@ def main():
304308
async def amain():
305309

306310
async with Shippo(
307-
api_key_header="<YOUR_API_KEY_HERE>",
308311
shippo_api_version="2018-02-08",
312+
api_key_header="<YOUR_API_KEY_HERE>",
309313
) as s_client:
310314
# Rest of application here...
311315
```
@@ -440,7 +444,6 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
440444
* [create](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/shipments/README.md#create) - Create a new shipment
441445
* [get](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/shipments/README.md#get) - Retrieve a shipment
442446

443-
444447
### [shippo_accounts](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/shippoaccounts/README.md)
445448

446449
* [list](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/shippoaccounts/README.md#list) - List all Shippo Accounts

README.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,15 @@ Shippo external API.: Use this API to integrate with the Shippo service
4747
>
4848
> Once a Python version reaches its [official end of life date](https://devguide.python.org/versions/), a 3-month grace period is provided for users to upgrade. Following this grace period, the minimum python version supported in the SDK will be updated.
4949
50-
The SDK can be installed with either *pip* or *poetry* package managers.
50+
The SDK can be installed with *uv*, *pip*, or *poetry* package managers.
51+
52+
### uv
53+
54+
*uv* is a fast Python package installer and resolver, designed as a drop-in replacement for pip and pip-tools. It's recommended for its speed and modern Python tooling capabilities.
55+
56+
```bash
57+
uv add shippo
58+
```
5159

5260
### PIP
5361

@@ -140,15 +148,13 @@ from shippo.utils import BackoffStrategy, RetryConfig
140148

141149

142150
with Shippo(
143-
api_key_header="<YOUR_API_KEY_HERE>",
144151
shippo_api_version="2018-02-08",
152+
api_key_header="<YOUR_API_KEY_HERE>",
145153
) as s_client:
146154

147-
res = s_client.addresses.list(,
155+
res = s_client.addresses.list(page=1, results=5,
148156
RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
149157

150-
assert res is not None
151-
152158
# Handle response
153159
print(res)
154160

@@ -162,13 +168,11 @@ from shippo.utils import BackoffStrategy, RetryConfig
162168

163169
with Shippo(
164170
retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
165-
api_key_header="<YOUR_API_KEY_HERE>",
166171
shippo_api_version="2018-02-08",
172+
api_key_header="<YOUR_API_KEY_HERE>",
167173
) as s_client:
168174

169-
res = s_client.addresses.list()
170-
171-
assert res is not None
175+
res = s_client.addresses.list(page=1, results=5)
172176

173177
# Handle response
174178
print(res)
@@ -294,8 +298,8 @@ from shippo import Shippo
294298
def main():
295299

296300
with Shippo(
297-
api_key_header="<YOUR_API_KEY_HERE>",
298301
shippo_api_version="2018-02-08",
302+
api_key_header="<YOUR_API_KEY_HERE>",
299303
) as s_client:
300304
# Rest of application here...
301305

@@ -304,8 +308,8 @@ def main():
304308
async def amain():
305309

306310
async with Shippo(
307-
api_key_header="<YOUR_API_KEY_HERE>",
308311
shippo_api_version="2018-02-08",
312+
api_key_header="<YOUR_API_KEY_HERE>",
309313
) as s_client:
310314
# Rest of application here...
311315
```
@@ -440,7 +444,6 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
440444
* [create](docs/sdks/shipments/README.md#create) - Create a new shipment
441445
* [get](docs/sdks/shipments/README.md#get) - Retrieve a shipment
442446

443-
444447
### [shippo_accounts](docs/sdks/shippoaccounts/README.md)
445448

446449
* [list](docs/sdks/shippoaccounts/README.md#list) - List all Shippo Accounts

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,4 +398,14 @@ Based on:
398398
### Generated
399399
- [python v3.9.0] .
400400
### Releases
401-
- [PyPI v3.9.0] https://pypi.org/project/shippo/3.9.0 - .
401+
- [PyPI v3.9.0] https://pypi.org/project/shippo/3.9.0 - .
402+
403+
## 2025-12-01 00:10:49
404+
### Changes
405+
Based on:
406+
- OpenAPI Doc
407+
- Speakeasy CLI 1.665.0 (2.767.2) https://github.com/speakeasy-api/speakeasy
408+
### Generated
409+
- [python v4.1.0] .
410+
### Releases
411+
- [PyPI v4.1.0] https://pypi.org/project/shippo/4.1.0 - .

USAGE.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,20 @@ from shippo import Shippo
55

66

77
with Shippo(
8-
api_key_header="<YOUR_API_KEY_HERE>",
98
shippo_api_version="2018-02-08",
9+
api_key_header="<YOUR_API_KEY_HERE>",
1010
) as s_client:
1111

12-
res = s_client.addresses.list()
13-
14-
assert res is not None
12+
res = s_client.addresses.list(page=1, results=5)
1513

1614
# Handle response
1715
print(res)
1816
```
1917

2018
</br>
2119

22-
The same SDK client can also be used to make asychronous requests by importing asyncio.
20+
The same SDK client can also be used to make asynchronous requests by importing asyncio.
21+
2322
```python
2423
# Asynchronous Example
2524
import asyncio
@@ -28,13 +27,11 @@ from shippo import Shippo
2827
async def main():
2928

3029
async with Shippo(
31-
api_key_header="<YOUR_API_KEY_HERE>",
3230
shippo_api_version="2018-02-08",
31+
api_key_header="<YOUR_API_KEY_HERE>",
3332
) as s_client:
3433

35-
res = await s_client.addresses.list_async()
36-
37-
assert res is not None
34+
res = await s_client.addresses.list_async(page=1, results=5)
3835

3936
# Handle response
4037
print(res)

0 commit comments

Comments
 (0)