loobric-smooth 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- loobric_smooth-0.1.0/LICENSE +21 -0
- loobric_smooth-0.1.0/PKG-INFO +73 -0
- loobric_smooth-0.1.0/README.md +47 -0
- loobric_smooth-0.1.0/loobric_smooth.egg-info/PKG-INFO +73 -0
- loobric_smooth-0.1.0/loobric_smooth.egg-info/SOURCES.txt +17 -0
- loobric_smooth-0.1.0/loobric_smooth.egg-info/dependency_links.txt +1 -0
- loobric_smooth-0.1.0/loobric_smooth.egg-info/entry_points.txt +2 -0
- loobric_smooth-0.1.0/loobric_smooth.egg-info/requires.txt +9 -0
- loobric_smooth-0.1.0/loobric_smooth.egg-info/top_level.txt +1 -0
- loobric_smooth-0.1.0/pyproject.toml +40 -0
- loobric_smooth-0.1.0/setup.cfg +4 -0
- loobric_smooth-0.1.0/smooth_client/__init__.py +26 -0
- loobric_smooth-0.1.0/smooth_client/cli/__init__.py +8 -0
- loobric_smooth-0.1.0/smooth_client/cli/main.py +1511 -0
- loobric_smooth-0.1.0/smooth_client/client.py +372 -0
- loobric_smooth-0.1.0/smooth_client/errors.py +40 -0
- loobric_smooth-0.1.0/smooth_client/transport.py +181 -0
- loobric_smooth-0.1.0/tests/test_cli.py +720 -0
- loobric_smooth-0.1.0/tests/test_client_smoke.py +37 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 sliptonic
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: loobric-smooth
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Python client library and CLI for Smooth Core (CNC tool-data sync).
|
|
5
|
+
Author: sliptonic
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/loobric/loobric-smooth
|
|
8
|
+
Project-URL: Repository, https://github.com/loobric/loobric-smooth
|
|
9
|
+
Project-URL: Issues, https://github.com/loobric/loobric-smooth/issues
|
|
10
|
+
Keywords: cnc,cam,tool-data,freecad,linuxcnc,machining
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Topic :: Scientific/Engineering
|
|
15
|
+
Classifier: Intended Audience :: Manufacturing
|
|
16
|
+
Requires-Python: >=3.9
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
License-File: LICENSE
|
|
19
|
+
Provides-Extra: importers
|
|
20
|
+
Requires-Dist: lxml>=5.0; extra == "importers"
|
|
21
|
+
Provides-Extra: completion
|
|
22
|
+
Requires-Dist: argcomplete>=3.0; extra == "completion"
|
|
23
|
+
Provides-Extra: dev
|
|
24
|
+
Requires-Dist: pytest>=7.4; extra == "dev"
|
|
25
|
+
Dynamic: license-file
|
|
26
|
+
|
|
27
|
+
# loobric-smooth
|
|
28
|
+
|
|
29
|
+
Python client for [Smooth Core](https://github.com/loobric/smooth-core) — the
|
|
30
|
+
library and CLI for synchronizing CNC tool data. It speaks only the public REST
|
|
31
|
+
API and depends on nothing from the server.
|
|
32
|
+
|
|
33
|
+
> **Status:** extraction in progress. The importable library (`smooth_client.Client`)
|
|
34
|
+
> and the `smooth` CLI are here, ported from the old single-file `loobric.py`. Format
|
|
35
|
+
> importers and removing the old client from `smooth-core` are next. See
|
|
36
|
+
> [docs/adr/0001-extract-loobric-smooth.md](docs/adr/0001-extract-loobric-smooth.md).
|
|
37
|
+
|
|
38
|
+
## Install
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
pip install loobric-smooth # library + CLI (stdlib only, no deps)
|
|
42
|
+
pip install "loobric-smooth[importers]" # + format importers (DIN4000/GTC/P21/...)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Library
|
|
46
|
+
|
|
47
|
+
```python
|
|
48
|
+
from smooth_client import Client, NotFound
|
|
49
|
+
|
|
50
|
+
c = Client(base_url="http://nas:8000", api_key="...") # solo mode: omit api_key
|
|
51
|
+
for s in c.list_tool_sets():
|
|
52
|
+
print(s)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Every method returns parsed data and raises a `SmoothClientError` subclass
|
|
56
|
+
(`NotFound`, `AuthRequired`, `HTTPError`, `ConnectionFailed`) on failure — it
|
|
57
|
+
never prints or exits, so callers handle failure themselves.
|
|
58
|
+
|
|
59
|
+
## CLI
|
|
60
|
+
|
|
61
|
+
`smooth <verb>` is the universal command-line client (the role the old `loobric`
|
|
62
|
+
command served). See the [CLI reference and walkthrough](docs/CLI.md).
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
smooth --help
|
|
66
|
+
smooth list-machines
|
|
67
|
+
smooth create-record --from-catalog B201 --name "1/4 downcut"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## License
|
|
71
|
+
|
|
72
|
+
MIT. (The server, Smooth Core, is AGPL-3.0; this client is MIT so it can be
|
|
73
|
+
freely vendored and reused.)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# loobric-smooth
|
|
2
|
+
|
|
3
|
+
Python client for [Smooth Core](https://github.com/loobric/smooth-core) — the
|
|
4
|
+
library and CLI for synchronizing CNC tool data. It speaks only the public REST
|
|
5
|
+
API and depends on nothing from the server.
|
|
6
|
+
|
|
7
|
+
> **Status:** extraction in progress. The importable library (`smooth_client.Client`)
|
|
8
|
+
> and the `smooth` CLI are here, ported from the old single-file `loobric.py`. Format
|
|
9
|
+
> importers and removing the old client from `smooth-core` are next. See
|
|
10
|
+
> [docs/adr/0001-extract-loobric-smooth.md](docs/adr/0001-extract-loobric-smooth.md).
|
|
11
|
+
|
|
12
|
+
## Install
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
pip install loobric-smooth # library + CLI (stdlib only, no deps)
|
|
16
|
+
pip install "loobric-smooth[importers]" # + format importers (DIN4000/GTC/P21/...)
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Library
|
|
20
|
+
|
|
21
|
+
```python
|
|
22
|
+
from smooth_client import Client, NotFound
|
|
23
|
+
|
|
24
|
+
c = Client(base_url="http://nas:8000", api_key="...") # solo mode: omit api_key
|
|
25
|
+
for s in c.list_tool_sets():
|
|
26
|
+
print(s)
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Every method returns parsed data and raises a `SmoothClientError` subclass
|
|
30
|
+
(`NotFound`, `AuthRequired`, `HTTPError`, `ConnectionFailed`) on failure — it
|
|
31
|
+
never prints or exits, so callers handle failure themselves.
|
|
32
|
+
|
|
33
|
+
## CLI
|
|
34
|
+
|
|
35
|
+
`smooth <verb>` is the universal command-line client (the role the old `loobric`
|
|
36
|
+
command served). See the [CLI reference and walkthrough](docs/CLI.md).
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
smooth --help
|
|
40
|
+
smooth list-machines
|
|
41
|
+
smooth create-record --from-catalog B201 --name "1/4 downcut"
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## License
|
|
45
|
+
|
|
46
|
+
MIT. (The server, Smooth Core, is AGPL-3.0; this client is MIT so it can be
|
|
47
|
+
freely vendored and reused.)
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: loobric-smooth
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Python client library and CLI for Smooth Core (CNC tool-data sync).
|
|
5
|
+
Author: sliptonic
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/loobric/loobric-smooth
|
|
8
|
+
Project-URL: Repository, https://github.com/loobric/loobric-smooth
|
|
9
|
+
Project-URL: Issues, https://github.com/loobric/loobric-smooth/issues
|
|
10
|
+
Keywords: cnc,cam,tool-data,freecad,linuxcnc,machining
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Topic :: Scientific/Engineering
|
|
15
|
+
Classifier: Intended Audience :: Manufacturing
|
|
16
|
+
Requires-Python: >=3.9
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
License-File: LICENSE
|
|
19
|
+
Provides-Extra: importers
|
|
20
|
+
Requires-Dist: lxml>=5.0; extra == "importers"
|
|
21
|
+
Provides-Extra: completion
|
|
22
|
+
Requires-Dist: argcomplete>=3.0; extra == "completion"
|
|
23
|
+
Provides-Extra: dev
|
|
24
|
+
Requires-Dist: pytest>=7.4; extra == "dev"
|
|
25
|
+
Dynamic: license-file
|
|
26
|
+
|
|
27
|
+
# loobric-smooth
|
|
28
|
+
|
|
29
|
+
Python client for [Smooth Core](https://github.com/loobric/smooth-core) — the
|
|
30
|
+
library and CLI for synchronizing CNC tool data. It speaks only the public REST
|
|
31
|
+
API and depends on nothing from the server.
|
|
32
|
+
|
|
33
|
+
> **Status:** extraction in progress. The importable library (`smooth_client.Client`)
|
|
34
|
+
> and the `smooth` CLI are here, ported from the old single-file `loobric.py`. Format
|
|
35
|
+
> importers and removing the old client from `smooth-core` are next. See
|
|
36
|
+
> [docs/adr/0001-extract-loobric-smooth.md](docs/adr/0001-extract-loobric-smooth.md).
|
|
37
|
+
|
|
38
|
+
## Install
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
pip install loobric-smooth # library + CLI (stdlib only, no deps)
|
|
42
|
+
pip install "loobric-smooth[importers]" # + format importers (DIN4000/GTC/P21/...)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Library
|
|
46
|
+
|
|
47
|
+
```python
|
|
48
|
+
from smooth_client import Client, NotFound
|
|
49
|
+
|
|
50
|
+
c = Client(base_url="http://nas:8000", api_key="...") # solo mode: omit api_key
|
|
51
|
+
for s in c.list_tool_sets():
|
|
52
|
+
print(s)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Every method returns parsed data and raises a `SmoothClientError` subclass
|
|
56
|
+
(`NotFound`, `AuthRequired`, `HTTPError`, `ConnectionFailed`) on failure — it
|
|
57
|
+
never prints or exits, so callers handle failure themselves.
|
|
58
|
+
|
|
59
|
+
## CLI
|
|
60
|
+
|
|
61
|
+
`smooth <verb>` is the universal command-line client (the role the old `loobric`
|
|
62
|
+
command served). See the [CLI reference and walkthrough](docs/CLI.md).
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
smooth --help
|
|
66
|
+
smooth list-machines
|
|
67
|
+
smooth create-record --from-catalog B201 --name "1/4 downcut"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## License
|
|
71
|
+
|
|
72
|
+
MIT. (The server, Smooth Core, is AGPL-3.0; this client is MIT so it can be
|
|
73
|
+
freely vendored and reused.)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
loobric_smooth.egg-info/PKG-INFO
|
|
5
|
+
loobric_smooth.egg-info/SOURCES.txt
|
|
6
|
+
loobric_smooth.egg-info/dependency_links.txt
|
|
7
|
+
loobric_smooth.egg-info/entry_points.txt
|
|
8
|
+
loobric_smooth.egg-info/requires.txt
|
|
9
|
+
loobric_smooth.egg-info/top_level.txt
|
|
10
|
+
smooth_client/__init__.py
|
|
11
|
+
smooth_client/client.py
|
|
12
|
+
smooth_client/errors.py
|
|
13
|
+
smooth_client/transport.py
|
|
14
|
+
smooth_client/cli/__init__.py
|
|
15
|
+
smooth_client/cli/main.py
|
|
16
|
+
tests/test_cli.py
|
|
17
|
+
tests/test_client_smoke.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
smooth_client
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "loobric-smooth"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Python client library and CLI for Smooth Core (CNC tool-data sync)."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.9"
|
|
7
|
+
license = { text = "MIT" }
|
|
8
|
+
authors = [{ name = "sliptonic" }]
|
|
9
|
+
# The core library and CLI are intentionally stdlib-only, so the package stays
|
|
10
|
+
# vendorable and runnable in constrained interpreters.
|
|
11
|
+
keywords = ["cnc", "cam", "tool-data", "freecad", "linuxcnc", "machining"]
|
|
12
|
+
classifiers = [
|
|
13
|
+
"Development Status :: 3 - Alpha",
|
|
14
|
+
"License :: OSI Approved :: MIT License",
|
|
15
|
+
"Programming Language :: Python :: 3",
|
|
16
|
+
"Topic :: Scientific/Engineering",
|
|
17
|
+
"Intended Audience :: Manufacturing"]
|
|
18
|
+
dependencies = []
|
|
19
|
+
|
|
20
|
+
[project.optional-dependencies]
|
|
21
|
+
# Format parsers (DIN4000 / GTC / P21 / TDM / Zoller / SolidCAM / HyperMill, see
|
|
22
|
+
# smooth-core#31) live behind this extra so the base install carries no weight.
|
|
23
|
+
importers = ["lxml>=5.0"]
|
|
24
|
+
completion = ["argcomplete>=3.0"]
|
|
25
|
+
dev = ["pytest>=7.4"]
|
|
26
|
+
|
|
27
|
+
[project.scripts]
|
|
28
|
+
smooth = "smooth_client.cli.main:main"
|
|
29
|
+
|
|
30
|
+
[build-system]
|
|
31
|
+
requires = ["setuptools>=68"]
|
|
32
|
+
build-backend = "setuptools.build_meta"
|
|
33
|
+
|
|
34
|
+
[tool.setuptools.packages.find]
|
|
35
|
+
include = ["smooth_client*"]
|
|
36
|
+
|
|
37
|
+
[project.urls]
|
|
38
|
+
Homepage = "https://github.com/loobric/loobric-smooth"
|
|
39
|
+
Repository = "https://github.com/loobric/loobric-smooth"
|
|
40
|
+
Issues = "https://github.com/loobric/loobric-smooth/issues"
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# MIT License
|
|
2
|
+
# Copyright (c) 2025 sliptonic
|
|
3
|
+
# SPDX-License-Identifier: MIT
|
|
4
|
+
"""Smooth client — importable Python library for the Smooth Core API.
|
|
5
|
+
|
|
6
|
+
Speaks only the public REST API and depends on nothing from the server, so a
|
|
7
|
+
client (FreeCAD, future Fusion, scripts) can `pip install loobric-smooth` and
|
|
8
|
+
reuse this rather than writing its own HTTP layer.
|
|
9
|
+
"""
|
|
10
|
+
from smooth_client.client import Client
|
|
11
|
+
from smooth_client.errors import (
|
|
12
|
+
AuthRequired,
|
|
13
|
+
ConnectionFailed,
|
|
14
|
+
HTTPError,
|
|
15
|
+
NotFound,
|
|
16
|
+
SmoothClientError,
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
__all__ = [
|
|
20
|
+
"Client",
|
|
21
|
+
"SmoothClientError",
|
|
22
|
+
"ConnectionFailed",
|
|
23
|
+
"HTTPError",
|
|
24
|
+
"NotFound",
|
|
25
|
+
"AuthRequired",
|
|
26
|
+
]
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# MIT License
|
|
2
|
+
# Copyright (c) 2025 sliptonic
|
|
3
|
+
# SPDX-License-Identifier: MIT
|
|
4
|
+
"""Smooth client CLI package. Entry point: ``smooth_client.cli.main:main``.
|
|
5
|
+
|
|
6
|
+
Intentionally does not import ``main`` here — that would shadow the ``main``
|
|
7
|
+
submodule (a function and a module sharing the name on the package).
|
|
8
|
+
"""
|