makepartsnow 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.
Files changed (32) hide show
  1. makepartsnow-0.1.0/LICENSE +21 -0
  2. makepartsnow-0.1.0/PKG-INFO +94 -0
  3. makepartsnow-0.1.0/README.md +68 -0
  4. makepartsnow-0.1.0/pyproject.toml +48 -0
  5. makepartsnow-0.1.0/setup.cfg +4 -0
  6. makepartsnow-0.1.0/src/makepartsnow/__init__.py +3 -0
  7. makepartsnow-0.1.0/src/makepartsnow/__main__.py +5 -0
  8. makepartsnow-0.1.0/src/makepartsnow/cli.py +441 -0
  9. makepartsnow-0.1.0/src/makepartsnow/core/CORE_PIN.json +22 -0
  10. makepartsnow-0.1.0/src/makepartsnow/core/__init__.py +13 -0
  11. makepartsnow-0.1.0/src/makepartsnow/core/client.py +929 -0
  12. makepartsnow-0.1.0/src/makepartsnow/core/consent.py +77 -0
  13. makepartsnow-0.1.0/src/makepartsnow/core/controller.py +1036 -0
  14. makepartsnow-0.1.0/src/makepartsnow/core/export.py +175 -0
  15. makepartsnow-0.1.0/src/makepartsnow/core/flow.py +149 -0
  16. makepartsnow-0.1.0/src/makepartsnow/core/host.py +105 -0
  17. makepartsnow-0.1.0/src/makepartsnow/core/memory.py +56 -0
  18. makepartsnow-0.1.0/src/makepartsnow/core/messages.py +93 -0
  19. makepartsnow-0.1.0/src/makepartsnow/core/settings.py +122 -0
  20. makepartsnow-0.1.0/src/makepartsnow/core/telemetry.py +58 -0
  21. makepartsnow-0.1.0/src/makepartsnow/core/text.py +27 -0
  22. makepartsnow-0.1.0/src/makepartsnow/core/units.py +96 -0
  23. makepartsnow-0.1.0/src/makepartsnow/core/viewmodel.py +204 -0
  24. makepartsnow-0.1.0/src/makepartsnow/core/worker.py +153 -0
  25. makepartsnow-0.1.0/src/makepartsnow/state.py +106 -0
  26. makepartsnow-0.1.0/src/makepartsnow.egg-info/PKG-INFO +94 -0
  27. makepartsnow-0.1.0/src/makepartsnow.egg-info/SOURCES.txt +30 -0
  28. makepartsnow-0.1.0/src/makepartsnow.egg-info/dependency_links.txt +1 -0
  29. makepartsnow-0.1.0/src/makepartsnow.egg-info/entry_points.txt +2 -0
  30. makepartsnow-0.1.0/src/makepartsnow.egg-info/top_level.txt +1 -0
  31. makepartsnow-0.1.0/tests/test_cli.py +199 -0
  32. makepartsnow-0.1.0/tests/test_live.py +37 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Make Parts Now
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,94 @@
1
+ Metadata-Version: 2.4
2
+ Name: makepartsnow
3
+ Version: 0.1.0
4
+ Summary: Instant 3D printing quotes for CAD files from the command line (Make Parts Now)
5
+ Author-email: Make Parts Now <orders@makepartsnow.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://makepartsnow.com/developers
8
+ Project-URL: Source, https://github.com/makepartsnow/makepartsnow-cli
9
+ Project-URL: Issues, https://github.com/makepartsnow/makepartsnow-cli/issues
10
+ Project-URL: Privacy, https://makepartsnow.com/legal/privacy
11
+ Keywords: 3d printing,cad,step,stl,quote,manufacturing,sls,fdm,cadquery,build123d
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Intended Audience :: Manufacturing
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Topic :: Scientific/Engineering
22
+ Requires-Python: >=3.11
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ Dynamic: license-file
26
+
27
+ # makepartsnow: instant 3D printing quotes for CAD files, from the command line
28
+
29
+ `mpn` quotes your STEP and STL files with [Make Parts Now](https://makepartsnow.com), a US 3D printing service, and gives you a link to order and pay on makepartsnow.com. SLS PA12 nylon (gray or black dyed) or FDM plastics (PLA, PETG, ABS, ASA, TPU, carbon-fiber nylon and PETG) in their colors, each file with its own quantity, one delivered price before tax. No account, no API key, no dependencies.
30
+
31
+ Useful when you design parts in code (CadQuery, build123d, OpenSCAD) or export them from any CAD tool and want a price for each revision without opening a browser.
32
+
33
+ ```console
34
+ $ pip install makepartsnow
35
+ $ mpn quote bracket.step:10 cover.stl --units mm --zip 89101 --finish black
36
+ Quote quote_7Hq...: ready
37
+ Bracket.step 40 x 20 x 6 mm PA12 Nylon (Formlabs Nylon 12), black 10 x $2.96 = $29.60
38
+ Cover.stl 24 x 24.8 x 18.9 mm PA12 Nylon (Formlabs Nylon 12), black 1 x $3.41 = $3.41
39
+ Parts $33.01 shipping $6.56
40
+ Total $39.57 before tax, Standard speed
41
+ Ships by 2026-10-21, arrives by 2026-10-28
42
+ https://makepartsnow.com/quotes/share/...
43
+ ```
44
+
45
+ Requires Python 3.11 or newer.
46
+
47
+ ## Commands
48
+
49
+ | Command | What it does |
50
+ |---|---|
51
+ | `mpn options` | The materials, finishes and colors you can choose, with their build volumes |
52
+ | `mpn quote FILE[:QTY]... --zip ZIP` | Uploads the files and prices them as one order. `--qty`, `--material` and `--finish` apply to every file; `FILE:QTY` sets one file's quantity. STL files need `--units mm` or `--units in` (STEP carries its own) |
53
+ | `mpn quote ... --checkout` / `--open` | Also makes a checkout link (`--open` opens it in your browser). You review the order and pay on makepartsnow.com; `mpn` never pays |
54
+ | `mpn requote QUOTE_ID --qty N` | A revised quote with a new quantity, material, finish or ZIP, reusing the uploaded files |
55
+ | `mpn checkout QUOTE_ID [--open]` | A checkout link for an existing quote |
56
+ | `mpn delete --all` / `mpn delete PART_ID` / `mpn delete --list` | Deletes files you uploaded (the CLI keeps their delete tokens on this computer) |
57
+
58
+ Add `--json` to any command for one JSON object a script can read. Exit codes: 0 a ready quote, 2 a quote that needs input (a part too big for the material, units to confirm) or a person's review, 3 quoting is paused or this version is too old, 1 any other error.
59
+
60
+ Up to 25 files and 10,000 of each per quote, Standard speed, US shipping only. Prices are in USD before sales tax; tax is added at checkout.
61
+
62
+ ## What it sends, and where
63
+
64
+ - **Only to makepartsnow.com:** each file you name, the quantity, material and finish you choose, and the ZIP code. A STEP file is sent as a copy whose header has the author, organization and file path blanked; your file is never changed.
65
+ - **Nothing else:** no other files, no account, no telemetry. The requests carry the User-Agent `MakePartsNow-CLI/<version>` and `?client=cli`, so Make Parts Now knows the quote came from this tool.
66
+ - **The first quote asks first** on a terminal. In CI or a script, pass `--yes` or set `MPN_ACCEPT=1`.
67
+ - **Your files on the server** are stored encrypted and deleted automatically under the [privacy policy](https://makepartsnow.com/legal/privacy); `mpn delete --all` deletes them sooner. Files on an order stay with it. Uploads are tied to your network address: the quote ids work from the address that uploaded them, and the delete tokens work from anywhere.
68
+ - **On this computer:** `settings.json` (that you accepted, and your last ZIP) and `uploads.json` (the part ids and delete tokens of your uploads), readable only by you, in `%APPDATA%\makepartsnow`, `~/Library/Application Support/makepartsnow` or `~/.config/makepartsnow` (`MPN_CONFIG_DIR` moves it).
69
+ - **Money:** nothing is charged here. A checkout link opens Stripe Checkout on makepartsnow.com; anyone with the link can open it and pay for that quote, though they can't change it.
70
+
71
+ TLS is always verified. Links are opened, and files uploaded, only on makepartsnow.com.
72
+
73
+ ## How it works
74
+
75
+ `mpn` is a thin command-line host for the [Make Parts Now CAD core](https://github.com/makepartsnow/makepartsnow-cad-core), the same client the Fusion add-in and the [FreeCAD workbench](https://github.com/makepartsnow/makepartsnow-freecad) use, vendored in `src/makepartsnow/core/` (pinned in `CORE_PIN.json`). It talks to the hosted `https://makepartsnow.com/mcp/cad` endpoint. `MPN_BASE_URL` points it at a development server (https, or http to localhost).
76
+
77
+ ## Develop
78
+
79
+ ```bash
80
+ python -m pip install pytest
81
+ python -m pytest
82
+ ```
83
+
84
+ To update the core: in a checkout of makepartsnow-cad-core, `scripts/sync-core.py <this repo>/src/makepartsnow/core`.
85
+
86
+ ## Support
87
+
88
+ - Orders and questions: orders@makepartsnow.com or [makepartsnow.com/contact](https://makepartsnow.com/contact)
89
+ - Other ways to connect (AI assistants, CAD add-ins, the REST API): [makepartsnow.com/developers](https://makepartsnow.com/developers)
90
+ - Problems with this tool: open an issue. Report security problems privately (see [SECURITY.md](SECURITY.md)).
91
+
92
+ ## License
93
+
94
+ MIT, for this code. The Make Parts Now service is covered by its [terms](https://makepartsnow.com/legal/terms).
@@ -0,0 +1,68 @@
1
+ # makepartsnow: instant 3D printing quotes for CAD files, from the command line
2
+
3
+ `mpn` quotes your STEP and STL files with [Make Parts Now](https://makepartsnow.com), a US 3D printing service, and gives you a link to order and pay on makepartsnow.com. SLS PA12 nylon (gray or black dyed) or FDM plastics (PLA, PETG, ABS, ASA, TPU, carbon-fiber nylon and PETG) in their colors, each file with its own quantity, one delivered price before tax. No account, no API key, no dependencies.
4
+
5
+ Useful when you design parts in code (CadQuery, build123d, OpenSCAD) or export them from any CAD tool and want a price for each revision without opening a browser.
6
+
7
+ ```console
8
+ $ pip install makepartsnow
9
+ $ mpn quote bracket.step:10 cover.stl --units mm --zip 89101 --finish black
10
+ Quote quote_7Hq...: ready
11
+ Bracket.step 40 x 20 x 6 mm PA12 Nylon (Formlabs Nylon 12), black 10 x $2.96 = $29.60
12
+ Cover.stl 24 x 24.8 x 18.9 mm PA12 Nylon (Formlabs Nylon 12), black 1 x $3.41 = $3.41
13
+ Parts $33.01 shipping $6.56
14
+ Total $39.57 before tax, Standard speed
15
+ Ships by 2026-10-21, arrives by 2026-10-28
16
+ https://makepartsnow.com/quotes/share/...
17
+ ```
18
+
19
+ Requires Python 3.11 or newer.
20
+
21
+ ## Commands
22
+
23
+ | Command | What it does |
24
+ |---|---|
25
+ | `mpn options` | The materials, finishes and colors you can choose, with their build volumes |
26
+ | `mpn quote FILE[:QTY]... --zip ZIP` | Uploads the files and prices them as one order. `--qty`, `--material` and `--finish` apply to every file; `FILE:QTY` sets one file's quantity. STL files need `--units mm` or `--units in` (STEP carries its own) |
27
+ | `mpn quote ... --checkout` / `--open` | Also makes a checkout link (`--open` opens it in your browser). You review the order and pay on makepartsnow.com; `mpn` never pays |
28
+ | `mpn requote QUOTE_ID --qty N` | A revised quote with a new quantity, material, finish or ZIP, reusing the uploaded files |
29
+ | `mpn checkout QUOTE_ID [--open]` | A checkout link for an existing quote |
30
+ | `mpn delete --all` / `mpn delete PART_ID` / `mpn delete --list` | Deletes files you uploaded (the CLI keeps their delete tokens on this computer) |
31
+
32
+ Add `--json` to any command for one JSON object a script can read. Exit codes: 0 a ready quote, 2 a quote that needs input (a part too big for the material, units to confirm) or a person's review, 3 quoting is paused or this version is too old, 1 any other error.
33
+
34
+ Up to 25 files and 10,000 of each per quote, Standard speed, US shipping only. Prices are in USD before sales tax; tax is added at checkout.
35
+
36
+ ## What it sends, and where
37
+
38
+ - **Only to makepartsnow.com:** each file you name, the quantity, material and finish you choose, and the ZIP code. A STEP file is sent as a copy whose header has the author, organization and file path blanked; your file is never changed.
39
+ - **Nothing else:** no other files, no account, no telemetry. The requests carry the User-Agent `MakePartsNow-CLI/<version>` and `?client=cli`, so Make Parts Now knows the quote came from this tool.
40
+ - **The first quote asks first** on a terminal. In CI or a script, pass `--yes` or set `MPN_ACCEPT=1`.
41
+ - **Your files on the server** are stored encrypted and deleted automatically under the [privacy policy](https://makepartsnow.com/legal/privacy); `mpn delete --all` deletes them sooner. Files on an order stay with it. Uploads are tied to your network address: the quote ids work from the address that uploaded them, and the delete tokens work from anywhere.
42
+ - **On this computer:** `settings.json` (that you accepted, and your last ZIP) and `uploads.json` (the part ids and delete tokens of your uploads), readable only by you, in `%APPDATA%\makepartsnow`, `~/Library/Application Support/makepartsnow` or `~/.config/makepartsnow` (`MPN_CONFIG_DIR` moves it).
43
+ - **Money:** nothing is charged here. A checkout link opens Stripe Checkout on makepartsnow.com; anyone with the link can open it and pay for that quote, though they can't change it.
44
+
45
+ TLS is always verified. Links are opened, and files uploaded, only on makepartsnow.com.
46
+
47
+ ## How it works
48
+
49
+ `mpn` is a thin command-line host for the [Make Parts Now CAD core](https://github.com/makepartsnow/makepartsnow-cad-core), the same client the Fusion add-in and the [FreeCAD workbench](https://github.com/makepartsnow/makepartsnow-freecad) use, vendored in `src/makepartsnow/core/` (pinned in `CORE_PIN.json`). It talks to the hosted `https://makepartsnow.com/mcp/cad` endpoint. `MPN_BASE_URL` points it at a development server (https, or http to localhost).
50
+
51
+ ## Develop
52
+
53
+ ```bash
54
+ python -m pip install pytest
55
+ python -m pytest
56
+ ```
57
+
58
+ To update the core: in a checkout of makepartsnow-cad-core, `scripts/sync-core.py <this repo>/src/makepartsnow/core`.
59
+
60
+ ## Support
61
+
62
+ - Orders and questions: orders@makepartsnow.com or [makepartsnow.com/contact](https://makepartsnow.com/contact)
63
+ - Other ways to connect (AI assistants, CAD add-ins, the REST API): [makepartsnow.com/developers](https://makepartsnow.com/developers)
64
+ - Problems with this tool: open an issue. Report security problems privately (see [SECURITY.md](SECURITY.md)).
65
+
66
+ ## License
67
+
68
+ MIT, for this code. The Make Parts Now service is covered by its [terms](https://makepartsnow.com/legal/terms).
@@ -0,0 +1,48 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "makepartsnow"
7
+ dynamic = ["version"]
8
+ description = "Instant 3D printing quotes for CAD files from the command line (Make Parts Now)"
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ license-files = ["LICENSE"]
12
+ requires-python = ">=3.11"
13
+ authors = [{ name = "Make Parts Now", email = "orders@makepartsnow.com" }]
14
+ keywords = ["3d printing", "cad", "step", "stl", "quote", "manufacturing", "sls", "fdm", "cadquery", "build123d"]
15
+ classifiers = [
16
+ "Development Status :: 4 - Beta",
17
+ "Environment :: Console",
18
+ "Intended Audience :: Developers",
19
+ "Intended Audience :: Manufacturing",
20
+ "Operating System :: OS Independent",
21
+ "Programming Language :: Python :: 3",
22
+ "Programming Language :: Python :: 3.11",
23
+ "Programming Language :: Python :: 3.12",
24
+ "Programming Language :: Python :: 3.13",
25
+ "Topic :: Scientific/Engineering",
26
+ ]
27
+ dependencies = []
28
+
29
+ [project.urls]
30
+ Homepage = "https://makepartsnow.com/developers"
31
+ Source = "https://github.com/makepartsnow/makepartsnow-cli"
32
+ Issues = "https://github.com/makepartsnow/makepartsnow-cli/issues"
33
+ Privacy = "https://makepartsnow.com/legal/privacy"
34
+
35
+ [project.scripts]
36
+ mpn = "makepartsnow.cli:main"
37
+
38
+ [tool.setuptools.dynamic]
39
+ version = { attr = "makepartsnow.__version__" }
40
+
41
+ [tool.setuptools.packages.find]
42
+ where = ["src"]
43
+
44
+ [tool.setuptools.package-data]
45
+ "makepartsnow.core" = ["CORE_PIN.json"]
46
+
47
+ [tool.pytest.ini_options]
48
+ testpaths = ["tests"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,3 @@
1
+ """Make Parts Now from the command line: instant 3D printing quotes for CAD files (``mpn``)."""
2
+
3
+ __version__ = "0.1.0"
@@ -0,0 +1,5 @@
1
+ import sys
2
+
3
+ from .cli import main
4
+
5
+ sys.exit(main())