Skip to main content

printags

Python SDK for the Printags API: price, order and track printed PVC, NFC and wooden cards, shipped white-label.

Python 3.9 or later. One dependency: httpx.

pip install printags

Usage

import os
import uuid

from printags import Printags

with Printags(api_key=os.environ["PRINTAGS_API_KEY"]) as printags:
    account = printags.get_current_account()

    # Upload the artwork, then cite its id in printingVisuals: [front, back].
    with open("front.png", "rb") as f:
        upload = printags.upload_file("@me", f, "front.png")

    # A draft prints and charges nothing until it is validated (in the dashboard or with validate_order).
    # The idempotency key makes a retry safe: the same key returns the order already created
    # instead of creating, and charging, a second one.
    order = printags.create_order(
        "@me",
        {
            "isDraft": True,
            "reference": "Order-2026-001",
            "shipTo": {
                "name": "Jean Dupont",
                "phone": "+33612345678",
                "email": "jean@example.com",
                "address": {
                    "addressLine1": "10 rue de la Paix",
                    "city": "Paris",
                    "postcode": "75002",
                    "countryCode": "FR",
                },
            },
            "items": [
                {
                    "productId": "ntag213_pvccard_white",
                    "quantity": 50,
                    "printingVisuals": [upload["files"]["file"]["id"]],
                    "nfc": {"type": "uri", "content": "https://www.printags.com"},
                }
            ],
        },
        idempotency_key=str(uuid.uuid4()),
    )
    print(printags.get_order("@me", order["orderId"]))

    # Every order, page after page.
    for o in printags.iter_orders("@me", status="draft"):
        print(o["id"], o["status"])

The exact fields of each body are in the OpenAPI document and the documentation.

Each method is one operation of the OpenAPI document, under its name in snake_case: get_current_account, get_account, list_orders, find_orders, get_order, create_order, validate_order, simulate_order_status, upload_file, get_file, list_order_statuses, list_shipping_carriers, calculate_shipping_rates, list_products. iter_orders walks the pages of list_orders for you.

Errors

Every error answer raises PrintagsError (with status, code and body), or one of its subclasses: BadRequestError (400), AuthenticationError (401), PaymentRequiredError (402), PermissionDeniedError (403), NotFoundError (404), RateLimitError (429, with retry_after in seconds) and ServerError (5xx). An answer {"success": false} raises PrintagsError too, even with an HTTP 200: a file the API refused to store never comes back as if it were stored.

from printags import NotFoundError

try:
    printags.get_order("@me", "unknown")
except NotFoundError as e:
    print(e.code)  # ORDER_NOT_FOUND

Sandbox

A test key (sk_test_...) creates test orders that are neither charged nor manufactured. sandbox=True targets https://sandbox-api.printags.com, which only accepts test keys: a real key is refused before any request leaves your machine.

printags = Printags(api_key=os.environ["PRINTAGS_TEST_KEY"], sandbox=True)
printags.simulate_order_status("@me", order_id, "shipped")

License

MIT, © Printags SAS.

Metadata

Release files for printags 0.1.0

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

Source distribution (sdist)

Source distribution for printags 0.1.0
File Size Uploaded Provenance Actions
printags-0.1.0.tar.gz 9.0 kB With provenance Details for printags-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for printags 0.1.0
File Interpreter ABI Platform Actions
printags-0.1.0-py3-none-any.whl Python 3 none any Details for printags-0.1.0-py3-none-any.whl

Total release size: 16.7 kB

Release files / printags-0.1.0.tar.gz

Download URL printags-0.1.0.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
dde24cbade21691fa6fdcc8ac10d69274d85cbdf174ed6da71cf3fbe7ba08be1
BLAKE2b-256 checksum
How to use checksums
ad1648db8f3db03af768173a96507cf97778f81d6ef996d375ee3d421a0a8dbe
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 9, 2026.

Transparency log

Release files / printags-0.1.0-py3-none-any.whl

Download URL printags-0.1.0-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7cd2babc109ecb5ced7bdd8bdbf66c41c7e8ce5bd8dbb420828bea78b47d106a
BLAKE2b-256 checksum
How to use checksums
62b31982f1edf8987fb92f520154996ffbb208c98f8ff17f9ea264cbfd119724
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 9, 2026.

Transparency log

Security for printags 0.1.0

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 printags-0.1.0.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 9, 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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