Skip to main content

FulcrumPro

A lightweight Python SDK for the Fulcrum Pro API, built on httpx.

Installation

pip install fulcrumpro

Or with uv:

uv add fulcrumpro

Requirements

  • Python 3.14+

Quick Start

from fulcrumpro import FulcrumPro

client = FulcrumPro(api_token="your-api-token")

job = client.jobs.get("6a0e5cad7c2e97225f8def9c")
print(job["name"])

Use as a context manager to ensure the underlying HTTP connection is closed:

with FulcrumPro(api_token="your-api-token") as client:
    job = client.jobs.get("6a0e5cad7c2e97225f8def9c")

Authentication

All requests are authenticated with a Bearer token. Pass your API token when constructing the client:

client = FulcrumPro(api_token="your-api-token")

Resources

Items

An item's master routing — the operations it is built through, as opposed to the operations recorded against a particular job:

for operation in client.items.routing_operations(item_id).stream():
    print(operation["name"], operation["order"])

This is item master data, so it answers for items that have never been built. jobs.get_operations(job_id) cannot: it only describes items something has already been made from.

An empty list has two meanings, and this endpoint cannot tell them apart. Both answer 200 with []:

client.items.routing_operations(make_item_id).list()  # [] — routed through nothing
client.items.routing_operations(bought_item_id).list()  # [] — never had a routing

The first is 17% of make items, measured against production. The second is every buy and customerSupplied part. So filter by item origin before asking — a sweep that doesn't will report every purchased part as un-routed, with a 200 and nothing to suggest the question was meaningless for it.

GET /items/{id}/routing does distinguish them (200 against 400) and is deliberately not wrapped here: the item's own itemOrigin already answers it without spending a request.

Prefer stream to list. take defaults to 50 server-side, so a bare list() on an item with more operations than that returns exactly 50, with nothing to indicate it was truncated. The same applies to input_items, which is the item's BOM on the same routing:

inputs = list(client.items.input_items(item_id).stream())

Tags, and why item categories live here

Several of Fulcrum's named lists are the same underlying object — a tag — distinguished only by the types array on it. Item categories are one of them, along with accounting codes, item shapes, materials, grades, gauges, shipping containers and item classes. A tag can belong to more than one list.

client.item_categories reads categories through the /item-categories routes, but those are read-only: there is no POST /item-categories. Creating a category means creating a tag:

category = client.tags.create(
    {
        "name": "Subassembly",
        "style": "secondary",
        "types": ["itemCategory"],
    }
)

client.items.update(
    item_id, [{"op": "replace", "path": "/categoryId", "value": category["id"]}]
)

name, style and types are all required, and types needs at least one entry. create returns the id alone — {"id": ...}, not the created tag — so get it if you need the stored record. The new tag is immediately readable through client.item_categories.

Names are not unique and are compared case sensitively. Creating a tag whose name already exists succeeds and returns a second tag with its own id — which is how a production instance ends up holding both Relay and RELAY as separate categories. Check before creating if that matters to you. There is no delete route.

Jobs

# Get a job by ID
job = client.jobs.get("6a0e5cad7c2e97225f8def9c")

Attachments

Upload a file to a Fulcrum record. Every attachment needs an owner — the record it hangs off — and file accepts a path, raw bytes, or an open binary file object, with a path opened and closed for you:

created = client.attachments.upload(
    "drawing.pdf",
    owner_type="job",
    owner_id="6a0e5cad7c2e97225f8def9c",
    description="Revision C drawing",
    metadata={"source": "sdk"},
)

Download one by ID. Omit dest to get the content back as bytes, or pass a path to stream it straight to disk without buffering it in memory:

content = client.attachments.download(created["id"])
path = client.attachments.download(created["id"], dest="drawing.pdf")

Find attachments on a record, and download them all as a single ZIP:

owner = {"type": "job", "id": "6a0e5cad7c2e97225f8def9c"}

for attachment in client.attachments.stream(data={"owner": owner}):
    print(attachment["name"], attachment["size"])

client.attachments.download_many(data={"owner": owner}, dest="attachments.zip")

Queries must always be narrowed by owner, owners or attachmentIds — the API will not enumerate every attachment in a tenant, and formats on its own doesn't count. An unfiltered call raises ValueError rather than making a request. To sweep broadly, iterate the owning records:

for job in client.jobs.stream():
    owner = {"type": "job", "id": job["id"]}
    for attachment in client.attachments.stream(data={"owner": owner}):
        ...

owners takes up to 500 at a time, so batching is usually faster than one request per record.

Known gap: attachments on a job operation

Files attached to a job operation — including note attachments added through the Fulcrum UI — are stored with an owner type (Job_ItemToMake_Operation) that the public API's owner enum doesn't include. It can't be sent as a filter (list returns 400) and can't be read back (get returns 500). The failure happens while serializing the record, so any query that would return one fails — these attachments can't be discovered through the public API at all.

Downloads are unaffected, because they return bytes and never build an owner object. If you obtain an ID another way, the file itself is retrievable:

client.attachments.download("6aa82ae1f826405557c34006", dest="photo.png")

Certification attachments and remotely hosted files have their own methods:

client.attachments.upload_certification(
    "cert.pdf", owner_type="item", owner_id="...", lot_id="..."
)
client.attachments.create_remote(
    owner, file_name="spec.pdf", access_url="https://example.com/spec.pdf"
)

client.attachments.delete(created["id"])

Error Handling

All non-2xx responses raise a FulcrumProError:

from fulcrumpro import FulcrumPro, FulcrumProError

client = FulcrumPro(api_token="your-api-token")

try:
    job = client.jobs.get("nonexistent-id")
except FulcrumProError as e:
    print(e.status_code)  # e.g. 404
    print(str(e))  # "FulcrumPro API error 404: not found"

Version History

See CHANGELOG.md.

Docs

Full API documentation can be found on GitHub Pages

Metadata

Release files for fulcrumpro 0.25.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 fulcrumpro 0.25.0
File Size Uploaded Provenance Actions
fulcrumpro-0.25.0.tar.gz 21.6 kB Without provenance Details for fulcrumpro-0.25.0.tar.gz

Built distribution (wheel)

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

Total release size: 50.0 kB

Release files / fulcrumpro-0.25.0.tar.gz

Download URL fulcrumpro-0.25.0.tar.gz
Size 21.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d075cd9c7921ef2254c4a9ee6bc987c1c17252ab1c6c7273bf86325dbf88d38e
BLAKE2b-256 checksum
How to use checksums
f48f0f0b80b251fd24a748bced13c96bca380994c095f63413e1d9195e477fb4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / fulcrumpro-0.25.0-py3-none-any.whl

Download URL fulcrumpro-0.25.0-py3-none-any.whl
Size 28.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7e6d93ad2a18222e6f2aa60015b54e22e66a00d0f135ff8315860255764ea520
BLAKE2b-256 checksum
How to use checksums
cb89640a50dcf76b1fec08edcf191125b3b5b41c67cba651e63a71ca92fe5fbe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for fulcrumpro 0.25.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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

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