Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
**/__pycache__/
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant gitignore entry for pycache

Low Severity

The newly added **/__pycache__/ pattern on line 1 makes the existing __pycache__/ entry on line 11 redundant. The **/ glob prefix matches at any directory level including root, so the more specific entry provides no additional coverage.

Fix in CursorΒ Fix in Web

**/.speakeasy/temp/
**/.speakeasy/logs/
.env
.env.local
.venv/
pyrightconfig.json
.speakeasy/reports
Expand Down
4,626 changes: 3,800 additions & 826 deletions .speakeasy/gen.lock

Large diffs are not rendered by default.

35 changes: 34 additions & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,62 @@ generation:
maintainOpenAPIOrder: true
usageSnippets:
optionalPropertyRendering: withExample
sdkInitStyle: constructor
useClassNamesForArrayFields: true
fixes:
nameResolutionDec2023: true
nameResolutionFeb2025: true
parameterOrderingFeb2024: true
requestResponseComponentNamesFeb2024: true
securityFeb2025: false
sharedErrorComponentsApr2025: false
sharedNestedComponentsJan2026: false
nameOverrideFeb2026: false
auth:
oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: false
hoistGlobalSecurity: true
schemas:
allOfMergeStrategy: shallowMerge
requestBodyFieldName: ""
versioningStrategy: automatic
persistentEdits: {}
tests:
generateTests: true
generateNewTests: false
skipResponseBodyAssertions: false
python:
version: 4.0.0
version: 5.0.0
additionalDependencies:
dev:
httpretty: ==1.1.4
marshmallow: ==3.23.1
pytest: ==8.3.3
pytest-asyncio: ==0.25.3
main: {}
allowedRedefinedBuiltins:
- id
- object
- dir
asyncMode: both
authors:
- Shippo
baseErrorName: ShippoError
clientServerStatusCodesAsErrors: true
constFieldCasing: upper
defaultErrorName: SDKError
description: Shipping API Python library (USPS, FedEx, UPS and more)
enableCustomCodeRegions: false
enumFormat: enum
fixFlags:
asyncPaginationSep2025: false
conflictResistantModelImportsFeb2026: false
responseRequiredSep2024: false
flattenGlobalSecurity: true
flattenRequests: false
flatteningOrder: parameters-first
forwardCompatibleEnumsByDefault: false
forwardCompatibleUnionsByDefault: "false"
imports:
option: openapi
paths:
Expand All @@ -43,13 +68,21 @@ python:
operations: models/operations
shared: models/components
webhooks: models/webhooks
inferUnionDiscriminators: true
inputModelSuffix: input
license: MIT License
maxMethodParams: 3
methodArguments: require-security-and-request
moduleName: ""
multipartArrayFormat: legacy
outputModelSuffix: output
packageManager: poetry
packageName: shippo
preApplyUnionDiscriminators: false
projectUrls: {}
pytestFilterWarnings: []
pytestTimeout: 0
responseFormat: flat
sseFlatResponse: false
templateVersion: v2
useAsyncHooks: false
15 changes: 8 additions & 7 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
speakeasyVersion: 1.521.1
speakeasyVersion: 1.749.0
sources:
openapi:
sourceNamespace: openapi
sourceRevisionDigest: sha256:e8ab98342833888dbc4dd20f683ee5fb7791107d8574b8dfabce743bc3675cd0
sourceBlobDigest: sha256:8c66d55b10c00886e8fd1f2b6ea6b233bccf17f622fed046dcf302d5da3f91f5
sourceRevisionDigest: sha256:6c663764d9a66365b1d8ecfd099836651be17b509ca5b8ca802f44757ea1ac3d
sourceBlobDigest: sha256:ac0f028eee867cb0b24f4e3d35aa98c5e49635e1bfa52bca471e6bc2bfd33bcc
tags:
- latest
- speakeasy-sdk-regen-1732493299
- "2018-02-08"
targets:
first-target:
source: openapi
sourceNamespace: openapi
sourceRevisionDigest: sha256:e8ab98342833888dbc4dd20f683ee5fb7791107d8574b8dfabce743bc3675cd0
sourceBlobDigest: sha256:8c66d55b10c00886e8fd1f2b6ea6b233bccf17f622fed046dcf302d5da3f91f5
sourceRevisionDigest: sha256:6c663764d9a66365b1d8ecfd099836651be17b509ca5b8ca802f44757ea1ac3d
sourceBlobDigest: sha256:ac0f028eee867cb0b24f4e3d35aa98c5e49635e1bfa52bca471e6bc2bfd33bcc
codeSamplesNamespace: openapi-python-code-samples
codeSamplesRevisionDigest: sha256:dbf0fd402ae0d822b8bd93ecc6ba3b4f7e86ff47bd2f6ec8598aab7cd48919a7
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand All @@ -32,5 +33,5 @@ workflow:
token: $pypi_token
codeSamples:
registry:
location: registry.speakeasyapi.dev/shippo/shippo/openapi-code-samples
location: registry.speakeasyapi.dev/shippo/shippo/openapi-python-code-samples
blocking: false
2 changes: 1 addition & 1 deletion .speakeasy/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ targets:
token: $pypi_token
codeSamples:
registry:
location: registry.speakeasyapi.dev/shippo/shippo/openapi-code-samples
location: registry.speakeasyapi.dev/shippo/shippo/openapi-python-code-samples
blocking: false
69 changes: 36 additions & 33 deletions README-PYPI.md

Large diffs are not rendered by default.

69 changes: 36 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,15 @@ Shippo external API.: Use this API to integrate with the Shippo service
>
> 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.

The SDK can be installed with either *pip* or *poetry* package managers.
The SDK can be installed with *uv*, *pip*, or *poetry* package managers.

### uv

*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.

```bash
uv add shippo
```

### PIP

Expand Down Expand Up @@ -78,7 +86,7 @@ It's also possible to write a standalone Python script without needing to set up
```python
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.9"
# requires-python = ">=3.10"
# dependencies = [
# "shippo",
# ]
Expand Down Expand Up @@ -140,15 +148,13 @@ from shippo.utils import BackoffStrategy, RetryConfig


with Shippo(
api_key_header="<YOUR_API_KEY_HERE>",
shippo_api_version="2018-02-08",
api_key_header="<YOUR_API_KEY_HERE>",
) as s_client:

res = s_client.addresses.list(,
res = s_client.addresses.list(page=1, results=5,
RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))

assert res is not None

# Handle response
print(res)

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

with Shippo(
retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
api_key_header="<YOUR_API_KEY_HERE>",
shippo_api_version="2018-02-08",
api_key_header="<YOUR_API_KEY_HERE>",
) as s_client:

res = s_client.addresses.list()

assert res is not None
res = s_client.addresses.list(page=1, results=5)

# Handle response
print(res)
Expand Down Expand Up @@ -294,8 +298,8 @@ from shippo import Shippo
def main():

with Shippo(
api_key_header="<YOUR_API_KEY_HERE>",
shippo_api_version="2018-02-08",
api_key_header="<YOUR_API_KEY_HERE>",
) as s_client:
# Rest of application here...

Expand All @@ -304,8 +308,8 @@ def main():
async def amain():

async with Shippo(
api_key_header="<YOUR_API_KEY_HERE>",
shippo_api_version="2018-02-08",
api_key_header="<YOUR_API_KEY_HERE>",
) as s_client:
# Rest of application here...
```
Expand Down Expand Up @@ -344,22 +348,22 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
<details open>
<summary>Available methods</summary>

### [addresses](docs/sdks/addresses/README.md)
### [Addresses](docs/sdks/addresses/README.md)

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

### [batches](docs/sdks/batches/README.md)
### [Batches](docs/sdks/batches/README.md)

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

### [carrier_accounts](docs/sdks/carrieraccounts/README.md)
### [CarrierAccounts](docs/sdks/carrieraccounts/README.md)

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

### [carrier_parcel_templates](docs/sdks/carrierparceltemplates/README.md)
### [CarrierParcelTemplates](docs/sdks/carrierparceltemplates/README.md)

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

### [customs_declarations](docs/sdks/customsdeclarations/README.md)
### [CustomsDeclarations](docs/sdks/customsdeclarations/README.md)

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

### [customs_items](docs/sdks/customsitems/README.md)
### [CustomsItems](docs/sdks/customsitems/README.md)

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

### [manifests](docs/sdks/manifests/README.md)
### [Manifests](docs/sdks/manifests/README.md)

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

### [orders](docs/sdks/orders/README.md)
### [Orders](docs/sdks/orders/README.md)

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

### [parcels](docs/sdks/parcels/README.md)
### [Parcels](docs/sdks/parcels/README.md)

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

### [pickups](docs/sdks/pickups/README.md)
### [Pickups](docs/sdks/pickups/README.md)

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

### [rates](docs/sdks/rates/README.md)
### [Rates](docs/sdks/rates/README.md)

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

### [rates_at_checkout](docs/sdks/ratesatcheckout/README.md)
### [RatesAtCheckout](docs/sdks/ratesatcheckout/README.md)

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

### [refunds](docs/sdks/refunds/README.md)
### [Refunds](docs/sdks/refunds/README.md)

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

### [service_groups](docs/sdks/servicegroups/README.md)
### [ServiceGroups](docs/sdks/servicegroups/README.md)

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

### [shipments](docs/sdks/shipments/README.md)
### [Shipments](docs/sdks/shipments/README.md)

* [list](docs/sdks/shipments/README.md#list) - List all shipments
* [create](docs/sdks/shipments/README.md#create) - Create a new shipment
* [get](docs/sdks/shipments/README.md#get) - Retrieve a shipment


### [shippo_accounts](docs/sdks/shippoaccounts/README.md)
### [ShippoAccounts](docs/sdks/shippoaccounts/README.md)

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

### [tracking_status](docs/sdks/trackingstatus/README.md)
### [TrackingStatus](docs/sdks/trackingstatus/README.md)

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

### [transactions](docs/sdks/transactions/README.md)
### [Transactions](docs/sdks/transactions/README.md)

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

### [user_parcel_templates](docs/sdks/userparceltemplates/README.md)
### [UserParcelTemplates](docs/sdks/userparceltemplates/README.md)

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

### [webhooks](docs/sdks/webhooks/README.md)
### [Webhooks](docs/sdks/webhooks/README.md)

* [create_webhook](docs/sdks/webhooks/README.md#create_webhook) - Create a new webhook
* [list_webhooks](docs/sdks/webhooks/README.md#list_webhooks) - List all webhooks
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -398,4 +398,14 @@ Based on:
### Generated
- [python v3.9.0] .
### Releases
- [PyPI v3.9.0] https://pypi.org/project/shippo/3.9.0 - .
- [PyPI v3.9.0] https://pypi.org/project/shippo/3.9.0 - .

## 2026-03-09 00:12:42
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.749.0 (2.855.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v5.0.0] .
### Releases
- [PyPI v5.0.0] https://pypi.org/project/shippo/5.0.0 - .
Loading
Loading