Skip to content

Commit 8bb4329

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 8bb4329

144 files changed

Lines changed: 8495 additions & 6389 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: 3759 additions & 821 deletions
Large diffs are not rendered by default.

.speakeasy/gen.yaml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,45 @@ 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+
persistentEdits: {}
24+
tests:
25+
generateTests: true
26+
generateNewTests: false
27+
skipResponseBodyAssertions: false
1728
python:
18-
version: 4.0.0
29+
version: 4.1.0
1930
additionalDependencies:
2031
dev:
2132
httpretty: ==1.1.4
2233
marshmallow: ==3.23.1
2334
pytest: ==8.3.3
2435
pytest-asyncio: ==0.25.3
2536
main: {}
37+
allowedRedefinedBuiltins:
38+
- id
39+
- object
40+
asyncMode: both
2641
authors:
2742
- Shippo
43+
baseErrorName: ShippoError
2844
clientServerStatusCodesAsErrors: true
45+
constFieldCasing: upper
2946
defaultErrorName: SDKError
3047
description: Shipping API Python library (USPS, FedEx, UPS and more)
3148
enableCustomCodeRegions: false
@@ -43,13 +60,20 @@ python:
4360
operations: models/operations
4461
shared: models/components
4562
webhooks: models/webhooks
63+
inferUnionDiscriminators: true
4664
inputModelSuffix: input
4765
license: MIT License
4866
maxMethodParams: 3
4967
methodArguments: require-security-and-request
68+
moduleName: ""
69+
multipartArrayFormat: legacy
5070
outputModelSuffix: output
71+
packageManager: poetry
5172
packageName: shippo
73+
preApplyUnionDiscriminators: false
5274
projectUrls: {}
75+
pytestFilterWarnings: []
5376
pytestTimeout: 0
5477
responseFormat: flat
78+
sseFlatResponse: false
5579
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.684.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:4f3ef5892e043ed125c5d72d4317b792159a4deab2b20e1a9cc2b251f2cd38e3
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: 35 additions & 32 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 35 additions & 32 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
```
@@ -344,22 +348,22 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
344348
<details open>
345349
<summary>Available methods</summary>
346350

347-
### [addresses](docs/sdks/addresses/README.md)
351+
### [Addresses](docs/sdks/addresses/README.md)
348352

349353
* [list](docs/sdks/addresses/README.md#list) - List all addresses
350354
* [create](docs/sdks/addresses/README.md#create) - Create a new address
351355
* [get](docs/sdks/addresses/README.md#get) - Retrieve an address
352356
* [validate](docs/sdks/addresses/README.md#validate) - Validate an address
353357

354-
### [batches](docs/sdks/batches/README.md)
358+
### [Batches](docs/sdks/batches/README.md)
355359

356360
* [create](docs/sdks/batches/README.md#create) - Create a batch
357361
* [get](docs/sdks/batches/README.md#get) - Retrieve a batch
358362
* [add_shipments](docs/sdks/batches/README.md#add_shipments) - Add shipments to a batch
359363
* [purchase](docs/sdks/batches/README.md#purchase) - Purchase a batch
360364
* [remove_shipments](docs/sdks/batches/README.md#remove_shipments) - Remove shipments from a batch
361365

362-
### [carrier_accounts](docs/sdks/carrieraccounts/README.md)
366+
### [CarrierAccounts](docs/sdks/carrieraccounts/README.md)
363367

364368
* [list](docs/sdks/carrieraccounts/README.md#list) - List all carrier accounts
365369
* [create](docs/sdks/carrieraccounts/README.md#create) - Create a new carrier account
@@ -369,105 +373,104 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
369373
* [register](docs/sdks/carrieraccounts/README.md#register) - Add a Shippo carrier account
370374
* [get_registration_status](docs/sdks/carrieraccounts/README.md#get_registration_status) - Get Carrier Registration status
371375

372-
### [carrier_parcel_templates](docs/sdks/carrierparceltemplates/README.md)
376+
### [CarrierParcelTemplates](docs/sdks/carrierparceltemplates/README.md)
373377

374378
* [list](docs/sdks/carrierparceltemplates/README.md#list) - List all carrier parcel templates
375379
* [get](docs/sdks/carrierparceltemplates/README.md#get) - Retrieve a carrier parcel templates
376380

377-
### [customs_declarations](docs/sdks/customsdeclarations/README.md)
381+
### [CustomsDeclarations](docs/sdks/customsdeclarations/README.md)
378382

379383
* [list](docs/sdks/customsdeclarations/README.md#list) - List all customs declarations
380384
* [create](docs/sdks/customsdeclarations/README.md#create) - Create a new customs declaration
381385
* [get](docs/sdks/customsdeclarations/README.md#get) - Retrieve a customs declaration
382386

383-
### [customs_items](docs/sdks/customsitems/README.md)
387+
### [CustomsItems](docs/sdks/customsitems/README.md)
384388

385389
* [list](docs/sdks/customsitems/README.md#list) - List all customs items
386390
* [create](docs/sdks/customsitems/README.md#create) - Create a new customs item
387391
* [get](docs/sdks/customsitems/README.md#get) - Retrieve a customs item
388392

389-
### [manifests](docs/sdks/manifests/README.md)
393+
### [Manifests](docs/sdks/manifests/README.md)
390394

391395
* [list](docs/sdks/manifests/README.md#list) - List all manifests
392396
* [create](docs/sdks/manifests/README.md#create) - Create a new manifest
393397
* [get](docs/sdks/manifests/README.md#get) - Retrieve a manifest
394398

395-
### [orders](docs/sdks/orders/README.md)
399+
### [Orders](docs/sdks/orders/README.md)
396400

397401
* [list](docs/sdks/orders/README.md#list) - List all orders
398402
* [create](docs/sdks/orders/README.md#create) - Create a new order
399403
* [get](docs/sdks/orders/README.md#get) - Retrieve an order
400404

401-
### [parcels](docs/sdks/parcels/README.md)
405+
### [Parcels](docs/sdks/parcels/README.md)
402406

403407
* [list](docs/sdks/parcels/README.md#list) - List all parcels
404408
* [create](docs/sdks/parcels/README.md#create) - Create a new parcel
405409
* [get](docs/sdks/parcels/README.md#get) - Retrieve an existing parcel
406410

407-
### [pickups](docs/sdks/pickups/README.md)
411+
### [Pickups](docs/sdks/pickups/README.md)
408412

409413
* [create](docs/sdks/pickups/README.md#create) - Create a pickup
410414

411-
### [rates](docs/sdks/rates/README.md)
415+
### [Rates](docs/sdks/rates/README.md)
412416

413417
* [get](docs/sdks/rates/README.md#get) - Retrieve a rate
414418
* [list_shipment_rates](docs/sdks/rates/README.md#list_shipment_rates) - Retrieve shipment rates
415419
* [list_shipment_rates_by_currency_code](docs/sdks/rates/README.md#list_shipment_rates_by_currency_code) - Retrieve shipment rates in currency
416420

417-
### [rates_at_checkout](docs/sdks/ratesatcheckout/README.md)
421+
### [RatesAtCheckout](docs/sdks/ratesatcheckout/README.md)
418422

419423
* [create](docs/sdks/ratesatcheckout/README.md#create) - Generate a live rates request
420424
* [get_default_parcel_template](docs/sdks/ratesatcheckout/README.md#get_default_parcel_template) - Show current default parcel template
421425
* [update_default_parcel_template](docs/sdks/ratesatcheckout/README.md#update_default_parcel_template) - Update default parcel template
422426
* [delete_default_parcel_template](docs/sdks/ratesatcheckout/README.md#delete_default_parcel_template) - Clear current default parcel template
423427

424-
### [refunds](docs/sdks/refunds/README.md)
428+
### [Refunds](docs/sdks/refunds/README.md)
425429

426430
* [create](docs/sdks/refunds/README.md#create) - Create a refund
427431
* [list](docs/sdks/refunds/README.md#list) - List all refunds
428432
* [get](docs/sdks/refunds/README.md#get) - Retrieve a refund
429433

430-
### [service_groups](docs/sdks/servicegroups/README.md)
434+
### [ServiceGroups](docs/sdks/servicegroups/README.md)
431435

432436
* [list](docs/sdks/servicegroups/README.md#list) - List all service groups
433437
* [create](docs/sdks/servicegroups/README.md#create) - Create a new service group
434438
* [update](docs/sdks/servicegroups/README.md#update) - Update an existing service group
435439
* [delete](docs/sdks/servicegroups/README.md#delete) - Delete a service group
436440

437-
### [shipments](docs/sdks/shipments/README.md)
441+
### [Shipments](docs/sdks/shipments/README.md)
438442

439443
* [list](docs/sdks/shipments/README.md#list) - List all shipments
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-
444-
### [shippo_accounts](docs/sdks/shippoaccounts/README.md)
447+
### [ShippoAccounts](docs/sdks/shippoaccounts/README.md)
445448

446449
* [list](docs/sdks/shippoaccounts/README.md#list) - List all Shippo Accounts
447450
* [create](docs/sdks/shippoaccounts/README.md#create) - Create a Shippo Account
448451
* [get](docs/sdks/shippoaccounts/README.md#get) - Retrieve a Shippo Account
449452
* [update](docs/sdks/shippoaccounts/README.md#update) - Update a Shippo Account
450453

451-
### [tracking_status](docs/sdks/trackingstatus/README.md)
454+
### [TrackingStatus](docs/sdks/trackingstatus/README.md)
452455

453456
* [create](docs/sdks/trackingstatus/README.md#create) - Register a tracking webhook
454457
* [get](docs/sdks/trackingstatus/README.md#get) - Get a tracking status
455458

456-
### [transactions](docs/sdks/transactions/README.md)
459+
### [Transactions](docs/sdks/transactions/README.md)
457460

458461
* [list](docs/sdks/transactions/README.md#list) - List all shipping labels
459462
* [create](docs/sdks/transactions/README.md#create) - Create a shipping label
460463
* [get](docs/sdks/transactions/README.md#get) - Retrieve a shipping label
461464

462-
### [user_parcel_templates](docs/sdks/userparceltemplates/README.md)
465+
### [UserParcelTemplates](docs/sdks/userparceltemplates/README.md)
463466

464467
* [list](docs/sdks/userparceltemplates/README.md#list) - List all user parcel templates
465468
* [create](docs/sdks/userparceltemplates/README.md#create) - Create a new user parcel template
466469
* [delete](docs/sdks/userparceltemplates/README.md#delete) - Delete a user parcel template
467470
* [get](docs/sdks/userparceltemplates/README.md#get) - Retrieves a user parcel template
468471
* [update](docs/sdks/userparceltemplates/README.md#update) - Update an existing user parcel template
469472

470-
### [webhooks](docs/sdks/webhooks/README.md)
473+
### [Webhooks](docs/sdks/webhooks/README.md)
471474

472475
* [create_webhook](docs/sdks/webhooks/README.md#create_webhook) - Create a new webhook
473476
* [list_webhooks](docs/sdks/webhooks/README.md#list_webhooks) - List all webhooks

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+
## 2026-01-12 00:11:04
404+
### Changes
405+
Based on:
406+
- OpenAPI Doc
407+
- Speakeasy CLI 1.684.0 (2.793.0) 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)