Python client library and CLI for Smooth Core (CNC tool-data sync).
Project description
loobric-smooth
Python client for Smooth Core — the library and CLI for synchronizing CNC tool data. It speaks only the public REST API and depends on nothing from the server.
New in v0.3.0 — full list/show symmetry. Every listable entity now has a matching
showverb:show-machine,show-tool, andshow-keyjoin the existingshow-*commands, each resolving its target by id, name, or unique prefix. List to find it, show to inspect it — one consistent pattern everywhere.
smooth import— stop re-typing tool data. One command auto-detects the format and turns a vendor export into catalog records on your server: DIN 4000 (CSV + XML 2013/2016), STEP P21, GTC packages (ISO 13399), SolidCAM, and hyperMILL. Every imported field keeps its source, and the raw payload is preserved verbatim so nothing is lost or guessed. GTC packages also carry the tool's 3D STEP models and images, uploaded as canonical media on servers whose media backend is enabled. See docs/IMPORTERS_PLAN.md.The importable library (
smooth_client.Client) and thesmoothCLI are both here, ported from the old single-fileloobric.py— see docs/adr/0001-extract-loobric-smooth.md.
Install
pip install loobric-smooth # library + CLI + every bundled importer — stdlib only, no deps
Everything ships in the base install. The library, the smooth CLI, and all of
today's importers (DIN 4000, STEP P21, GTC, SolidCAM, hyperMILL) are
standard-library only, so the package stays vendorable and runs in constrained
interpreters. The optional [importers] extra is reserved for future formats
that need heavier parsers; no bundled importer requires it yet.
Library
from smooth_client import Client, NotFound
c = Client(base_url="http://nas:8000", api_key="...") # solo mode: omit api_key
for s in c.list_tool_sets():
print(s)
Every method returns parsed data and raises a SmoothClientError subclass
(NotFound, AuthRequired, HTTPError, ConnectionFailed) on failure — it
never prints or exits, so callers handle failure themselves.
CLI
smooth <verb> is the universal command-line client (the role the old loobric
command served). See the CLI reference and walkthrough.
smooth --help
smooth list-machines
smooth show-machine mill01 # by name, id, or unique prefix
smooth create-record --from-catalog B201 --name "1/4 downcut"
smooth show-tool "1/4 downcut" # one instance, full provenance
Every list-* verb has a matching show-* verb (show-machine, show-tool,
show-tool-set, show-key, …), each resolving its target by id, name, or
unique prefix — list to find it, show to inspect it.
Importing tool data
smooth import reads a vendor export, detects the format, and creates catalog
records on the server. Use --dry-run to see exactly what would be created
without sending anything:
smooth import tools.csv --dry-run # DIN 4000 CSV — preview only
smooth import tools.xml # DIN 4000 / SolidCAM / hyperMILL (by XML root)
smooth import catalog.p21 # STEP P21
smooth import package.zip # GTC package (ISO 13399) + 3D models & images
Re-importing the same catalog is detected by natural key and reported as skipped, never duplicated.
License
MIT. (The server, Smooth Core, is AGPL-3.0; this client is MIT so it can be freely vendored and reused.)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file loobric_smooth-0.3.0.tar.gz.
File metadata
- Download URL: loobric_smooth-0.3.0.tar.gz
- Upload date:
- Size: 56.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af904050be11bff6af66395456645fc946c4c9a5c94a008f32176319b7370532
|
|
| MD5 |
49925ef44142a53526d921c59970704b
|
|
| BLAKE2b-256 |
607d6ae79356095f011bfbf986db92289d541e243035b95b9cd7bc44631fd1c6
|
Provenance
The following attestation bundles were made for loobric_smooth-0.3.0.tar.gz:
Publisher:
publish.yml on loobric/loobric-smooth
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
loobric_smooth-0.3.0.tar.gz -
Subject digest:
af904050be11bff6af66395456645fc946c4c9a5c94a008f32176319b7370532 - Sigstore transparency entry: 1931255602
- Sigstore integration time:
-
Permalink:
loobric/loobric-smooth@224f4ad40fea549da6b41bcf7dba92845e836b52 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/loobric
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@224f4ad40fea549da6b41bcf7dba92845e836b52 -
Trigger Event:
release
-
Statement type:
File details
Details for the file loobric_smooth-0.3.0-py3-none-any.whl.
File metadata
- Download URL: loobric_smooth-0.3.0-py3-none-any.whl
- Upload date:
- Size: 52.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9ed7d591dfbef41c097cb2838660019e191e2c95e2bf3afb3e96b8541dfb296
|
|
| MD5 |
29099edf5ba4ad20ef64ab8e807ea55f
|
|
| BLAKE2b-256 |
7e2ed36019d923aa6c480de2eca6fdb66de91cfd98f541cd568e0f96d1ee176f
|
Provenance
The following attestation bundles were made for loobric_smooth-0.3.0-py3-none-any.whl:
Publisher:
publish.yml on loobric/loobric-smooth
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
loobric_smooth-0.3.0-py3-none-any.whl -
Subject digest:
f9ed7d591dfbef41c097cb2838660019e191e2c95e2bf3afb3e96b8541dfb296 - Sigstore transparency entry: 1931255856
- Sigstore integration time:
-
Permalink:
loobric/loobric-smooth@224f4ad40fea549da6b41bcf7dba92845e836b52 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/loobric
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@224f4ad40fea549da6b41bcf7dba92845e836b52 -
Trigger Event:
release
-
Statement type: