Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Salable Python SDK

The official Python SDK for the Salable API. It wraps the REST API for products, plans, subscriptions, and the rest of the Salable resources.

Package name: salable-sdk.

Requires Python 3.10+. Resource methods are generated by Kiota and are async. await each call.

Releases before 1.0.0 are 0.x. Those versions can still change as the OpenAPI description settles. 1.0.0 is the compatibility promise.

Table of Contents

Getting Started

Installation

pip install salable-sdk

Releases from the beta branch are prereleases. pip skips those unless you opt in:

pip install --pre salable-sdk

Initialisation

Create one Salable client with your secret API key and reuse it. The default client calls https://salable.app, times out after 30 seconds, retries 429, 503, and 504, and sends a salable-python/<version> User-Agent.

import asyncio

from salable import Salable


async def main() -> None:
    async with Salable("your-api-key") as salable:
        products = await salable.api.products.get()
        print(products)


asyncio.run(main())

Your API key is sent as a Bearer token on every request. Keep it out of source control.

Pass base_url for another origin. Pass http_client for your own httpx.AsyncClient. A client passed as http_client replaces the default timeout, retries, and User-Agent, so set those on that client if you still want them. aclose() closes that client too.

import httpx

from salable import Salable

salable = Salable(
    "your-api-key",
    base_url="https://salable.app",
    http_client=httpx.AsyncClient(timeout=10),
)

Close the client with await salable.aclose(), or use async with.

CRUD Pattern

Every resource uses the same request-builder pattern. await the method each call returns.

Operation Method Example
List all .get() await salable.api.products.get()
Get one .by_id(id).get() await salable.api.products.by_id(id).get()
Create .post(body) await salable.api.products.post(body)
Update .by_id(id).put(body) await salable.api.products.by_id(id).put(body)
Delete .by_id(id).delete() await salable.api.products.by_id(id).delete()

Product import is salable.api.products.import_(). import is a Python keyword, so the navigator keeps the trailing underscore. The HTTP path remains /api/products/import.

Create example:

from salable.sdk.models.create_product_request_schema import CreateProductRequestSchema

product = await salable.api.products.post(
    CreateProductRequestSchema(name="My Product", is_active=True)
)

Error Handling

Non-2xx responses raise ErrorResponseBody, which extends Kiota's APIError. response_status_code is the HTTP status.

from salable import ErrorResponseBody

try:
    product = await salable.api.products.by_id("product-id").get()
except ErrorResponseBody as error:
    print(error.response_status_code, error.title)
Status Meaning
400 Bad request — check your request body
401 Unauthorised — check your API key
403 Forbidden — insufficient permissions
404 Resource not found
429 Rate limit exceeded. The default client retries this status.
500 Internal server error

Query Parameters

Query parameters use Kiota's RequestConfiguration. limit is an int. include_archived is a bool.

from kiota_abstractions.base_request_configuration import RequestConfiguration

from salable.sdk.api.products.products_request_builder import ProductsRequestBuilder

query = ProductsRequestBuilder.ProductsRequestBuilderGetQueryParameters(
    limit=20,
    after="cursor-from-previous-page",
)
products = await salable.api.products.get(
    request_configuration=RequestConfiguration(query_parameters=query)
)

Pagination

List responses include next_cursor and previous_cursor. Pass the previous page's next_cursor as after to read the next page. Pass previous_cursor as before to read the previous page.

from kiota_abstractions.base_request_configuration import RequestConfiguration

from salable.sdk.api.products.products_request_builder import ProductsRequestBuilder

page = await salable.api.products.get()
if page is not None and page.next_cursor:
    query = ProductsRequestBuilder.ProductsRequestBuilderGetQueryParameters(
        after=page.next_cursor,
    )
    next_page = await salable.api.products.get(
        request_configuration=RequestConfiguration(query_parameters=query)
    )

Metadata

Release files for salable-sdk 0.0.1b1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for salable-sdk 0.0.1b1
File Size Uploaded Provenance Actions
salable_sdk-0.0.1b1.tar.gz 181.4 kB With provenance Details for salable_sdk-0.0.1b1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for salable-sdk 0.0.1b1
File Interpreter ABI Platform Actions
salable_sdk-0.0.1b1-py3-none-any.whl Python 3 none any Details for salable_sdk-0.0.1b1-py3-none-any.whl

Total release size: 973.9 kB

Release files / salable_sdk-0.0.1b1.tar.gz

Download URL salable_sdk-0.0.1b1.tar.gz
Size 181.4 kB
Tags Source
SHA-256 checksum
How to use checksums
0064a95211bac9e560dc24f388c022cfaadb0ae74eb6253940f34bb25878f5f9
BLAKE2b-256 checksum
How to use checksums
f8677676378444de823942ea2cb287992ec4f9a8e4a6586188f1bb3bdf62fad7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / salable_sdk-0.0.1b1-py3-none-any.whl

Download URL salable_sdk-0.0.1b1-py3-none-any.whl
Size 792.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
15f874bddc85ab807c43192a45ee9bebd7d981e840f658c0d51f65306ec08e1b
BLAKE2b-256 checksum
How to use checksums
378f19712018d8a3327bfe03b89f9667ce974c9176aef3c33288da3e5c73426d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Security for salable-sdk 0.0.1b1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for salable_sdk-0.0.1b1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page