lr-gladiator 0.4.0__py3-none-any.whl → 0.14.0__py3-none-any.whl

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.
@@ -0,0 +1,198 @@
1
+ Metadata-Version: 2.4
2
+ Name: lr-gladiator
3
+ Version: 0.14.0
4
+ Summary: CLI and Python client for Arena PLM (app.bom.com): login, get revisions, list/download attachments, and upload to working revisions.
5
+ Author-email: Jonas Estberger <jonas.estberger@lumenradio.com>
6
+ License: MIT
7
+ Keywords: Arena,PLM,BOM,attachments,CLI
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Requires-Python: >=3.9
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Requires-Dist: requests>=2.32
15
+ Requires-Dist: typer>=0.12
16
+ Requires-Dist: rich>=13.7
17
+ Requires-Dist: pydantic>=2.8
18
+ Provides-Extra: dev
19
+ Requires-Dist: build>=1.2.1; extra == "dev"
20
+ Requires-Dist: twine>=5.1.1; extra == "dev"
21
+ Requires-Dist: wheel; extra == "dev"
22
+ Requires-Dist: pytest>=8.4.2; extra == "dev"
23
+ Requires-Dist: black>=25.9.0; extra == "dev"
24
+ Requires-Dist: pytest-html; extra == "dev"
25
+ Requires-Dist: pytest-cov; extra == "dev"
26
+ Dynamic: license-file
27
+
28
+ # gladiator-arena
29
+
30
+ CLI + Python client for interacting with the Arena PLM.
31
+
32
+ ## Install
33
+
34
+ ```bash
35
+ pip install lr-gladiator
36
+ ```
37
+
38
+ ## Quick start
39
+
40
+ ### Login
41
+
42
+ Interactive login (prompts for username/password):
43
+
44
+ ```bash
45
+ gladiator login
46
+ ```
47
+
48
+ Non-interactive (for CI/CD):
49
+
50
+ ```bash
51
+ export GLADIATOR_USERNAME="<insert username>"
52
+ export GLADIATOR_PASSWORD="<insert password>"
53
+ gladiator login --ci
54
+ ```
55
+
56
+ By default, this stores session details at:
57
+
58
+ ```
59
+ ~/.config/gladiator/login.json
60
+ ```
61
+
62
+ ### Commands
63
+
64
+ Get the latest approved revision for an item:
65
+
66
+ ```bash
67
+ gladiator latest-approved 890-1001
68
+ ```
69
+
70
+ List all files on an item (defaults to the latest approved revision):
71
+
72
+ ```bash
73
+ gladiator list-files 890-1001
74
+ ```
75
+
76
+ Output JSON instead of a table:
77
+
78
+ ```bash
79
+ gladiator list-files 890-1001 --format json
80
+ ```
81
+
82
+ List the Bill of Materials (BOM) for an item:
83
+
84
+ ```bash
85
+ gladiator bom 890-1001
86
+ ```
87
+
88
+ Recursively expand subassemblies up to two levels deep:
89
+
90
+ ```bash
91
+ gladiator bom 890-1001 --recursive --max-depth 2
92
+ ```
93
+
94
+ Download attached files to a directory named after the article:
95
+
96
+ ```bash
97
+ gladiator get-files 890-1001
98
+ ```
99
+
100
+ Specify a different output directory:
101
+
102
+ ```bash
103
+ gladiator get-files 890-1001 --out downloads/
104
+ ```
105
+
106
+ Recursively download all files in the full BOM tree:
107
+
108
+ ```bash
109
+ gladiator get-files 890-1001 --recursive
110
+ ```
111
+
112
+ Upload or update a file on the working revision:
113
+
114
+ ```bash
115
+ gladiator upload-file 890-1001 ./datasheet.pdf --category "CAD Data" --title "Datasheet"
116
+ ```
117
+
118
+ ### 3) Output control
119
+
120
+ Most commands support a JSON output mode.
121
+ Example:
122
+
123
+ ```bash
124
+ gladiator bom 890-1001 --output json
125
+ ```
126
+
127
+ ### Example sessions
128
+
129
+ #### Human-readable
130
+
131
+ ```bash
132
+ $ gladiator list-files 101-1031
133
+ Files for 101-1031 rev (latest approved)
134
+ ┏━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━┳━━━━━━┳━━━━━━━━━━┓
135
+ ┃ Name ┃ Size ┃ Edition ┃ Type ┃ Location ┃
136
+ ┡━━━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━╇━━━━━━╇━━━━━━━━━━┩
137
+ │ 101-1907 E.PDF │ 171396 │ 1 │ FILE │ │
138
+ └─────────────────┴──────────┴─────────┴──────┴──────────┘
139
+ ```
140
+
141
+ #### JSON output
142
+
143
+ ```bash
144
+ $ gladiator list-files 101-1031 --format json
145
+ {
146
+ "article": "101-1031",
147
+ "revision": null,
148
+ "files": [
149
+ {
150
+ "id": "00000000000000000000",
151
+ "fileGuid": "11111111111111111111",
152
+ "name": "101-1907 E.PDF",
153
+ "filename": "101-1907 E.PDF",
154
+ "size": 171396,
155
+ "haveContent": true,
156
+ "downloadUrl": "https://api.arenasolutions.com/v1/files/11111111111111111111/content",
157
+ "edition": "1",
158
+ "updatedAt": "2016-12-06T12:31:33Z",
159
+ "attachmentGroupGuid": "22222222222222222222",
160
+ "storageMethodName": "FILE",
161
+ "location": null
162
+ }
163
+ ]
164
+ }
165
+ ```
166
+
167
+ ## Programmatic use
168
+
169
+ ```python
170
+ from gladiator import ArenaClient, load_config
171
+
172
+ client = ArenaClient(load_config())
173
+ rev = client.get_latest_approved_revision("890-1001")
174
+ files = client.list_files("890-1001", rev)
175
+ ```
176
+
177
+ ## Development
178
+
179
+ ```bash
180
+ python -m pip install -e .[dev]
181
+ python -m build
182
+ ```
183
+
184
+ ## FAQ
185
+
186
+ - **Where is the config kept?**
187
+ `~/.config/gladiator/login.json` (override with `GLADIATOR_CONFIG`)
188
+
189
+ - **How do I run non-interactively?**
190
+ Make sure to give all required arguments. Also pass `--ci` to stop output of sensitive information such as username or passwords.
191
+
192
+ - **What does `--recursive` do?**
193
+ Expands subassemblies and downloads or lists all contained items up to the given `--max-depth`.
194
+
195
+ - **How does Gladiator handle authentication?**
196
+ It performs a `/login` call and stores the resulting `arenaSessionId` for reuse. If it expires, re-run `gladiator login`.
197
+
198
+
@@ -0,0 +1,11 @@
1
+ gladiator/__init__.py,sha256=ZeHpVdzARFyIp9QbdTkX0jNqnbRFX5nFQ5RkEFzSRL0,208
2
+ gladiator/arena.py,sha256=22tgz_ZT-ofT9a3gvBEDiZevM5iJzNi5ykKLAY7Ueh4,43989
3
+ gladiator/checksums.py,sha256=5_3ra5E6itOPhWkb9MAR1ywuMtnVa_CxdcAe8t5x3PM,934
4
+ gladiator/cli.py,sha256=1dJLoftIbCGQdeMP4hMslpqnrLTjYrvklMeRxrxGQEE,15148
5
+ gladiator/config.py,sha256=jlSIeAXrYdcbgHiz5gX_DEYeUBxr87NMIbEMcdChYVI,1941
6
+ lr_gladiator-0.14.0.dist-info/licenses/LICENSE,sha256=2CEtbEagerjoU3EDSk-eTM5LKgI_RpiVIOh3_CV4kms,1069
7
+ lr_gladiator-0.14.0.dist-info/METADATA,sha256=_i2DtOU-y2x3QZ5CT6m8X_SvQuoSxQsN1n3U8juhUVw,4899
8
+ lr_gladiator-0.14.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
9
+ lr_gladiator-0.14.0.dist-info/entry_points.txt,sha256=SLka4w7iGS2B8HrbeZyNk5mxaIC6QKcv93us1OaWNwQ,48
10
+ lr_gladiator-0.14.0.dist-info/top_level.txt,sha256=tfrcAmK7_7Lf63w7kWy0wv_Qg9RrcFWGoins1-jGUF4,10
11
+ lr_gladiator-0.14.0.dist-info/RECORD,,
@@ -1,90 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: lr-gladiator
3
- Version: 0.4.0
4
- Summary: CLI and Python client for Arena PLM (app.bom.com): login, get revisions, list/download attachments, and upload to working revisions.
5
- Author-email: Jonas Estberger <jonas.estberger@lumenradio.com>
6
- License: MIT
7
- Keywords: Arena,PLM,BOM,attachments,CLI
8
- Classifier: Programming Language :: Python :: 3
9
- Classifier: License :: OSI Approved :: MIT License
10
- Classifier: Operating System :: OS Independent
11
- Requires-Python: >=3.9
12
- Description-Content-Type: text/markdown
13
- License-File: LICENSE
14
- Requires-Dist: requests>=2.32
15
- Requires-Dist: typer>=0.12
16
- Requires-Dist: rich>=13.7
17
- Requires-Dist: pydantic>=2.8
18
- Provides-Extra: dev
19
- Requires-Dist: build>=1.2.1; extra == "dev"
20
- Requires-Dist: twine>=5.1.1; extra == "dev"
21
- Requires-Dist: wheel; extra == "dev"
22
- Dynamic: license-file
23
-
24
- # gladiator-arena
25
-
26
- CLI + Python client for interacting with the Arena PLM.
27
-
28
- ## Install
29
-
30
- ```bash
31
- pip install lr-gladiator
32
- ```
33
-
34
- ## Quick start
35
-
36
- ### 1) Create `login.json`
37
-
38
- Interactive:
39
-
40
- ```bash
41
- gladiator login
42
- ```
43
-
44
- `login.json` is stored at `~/.config/gladiator/login.json` by default.
45
-
46
- ### 2) Queries
47
-
48
- Get latest approved revision for an item:
49
-
50
- ```bash
51
- gladiator latest-approved ABC-1234
52
- ```
53
-
54
- List files on an item (defaults to latest approved):
55
-
56
- ```bash
57
- gladiator list-files ABC-1234
58
- ```
59
-
60
- Download files:
61
-
62
- ```bash
63
- gladiator get-files ABC-1234 --out downloads/
64
- ```
65
-
66
- Upload a file to the working revision
67
-
68
- ```bash
69
- gladiator upload-file ABC-1234 ./datasheet.pdf --reference datasheet
70
- ```
71
-
72
- ## Programmatic use
73
-
74
- ```python
75
- from gladiator import ArenaClient, load_config
76
- client = ArenaClient(load_config())
77
- rev = client.get_latest_approved_revision("ABC-1234")
78
- files = client.list_files("ABC-1234", rev)
79
- ```
80
-
81
- ## Development
82
-
83
- ```bash
84
- python -m pip install -e .[dev]
85
- python -m build
86
- ```
87
-
88
- ## FAQ
89
-
90
- - **Where is the config kept?** `~/.config/gladiator/login.json` (override via `GLADIATOR_CONFIG`).
@@ -1,10 +0,0 @@
1
- gladiator/__init__.py,sha256=kVgJiGDD6714tJ3SN6mdao3rdVO57jlMvLMHAFjHX4A,207
2
- gladiator/arena.py,sha256=bRKbt4a4hp57XC6KqZixExxZ2Efp7nCMhpehfovgKRE,21593
3
- gladiator/cli.py,sha256=GP-sBRusZWwjnn5RtT0VhNps6xQzoIj2BFKUysi_lF0,6445
4
- gladiator/config.py,sha256=pnuVrcW8yafxMB7RU9wyi_4jS_oMBIuNryfet203Wng,1738
5
- lr_gladiator-0.4.0.dist-info/licenses/LICENSE,sha256=2CEtbEagerjoU3EDSk-eTM5LKgI_RpiVIOh3_CV4kms,1069
6
- lr_gladiator-0.4.0.dist-info/METADATA,sha256=X3TfGY-kQ5CtL0z2azFPtLCBmvXYQp3ov07I7iJJc64,1912
7
- lr_gladiator-0.4.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
8
- lr_gladiator-0.4.0.dist-info/entry_points.txt,sha256=SLka4w7iGS2B8HrbeZyNk5mxaIC6QKcv93us1OaWNwQ,48
9
- lr_gladiator-0.4.0.dist-info/top_level.txt,sha256=tfrcAmK7_7Lf63w7kWy0wv_Qg9RrcFWGoins1-jGUF4,10
10
- lr_gladiator-0.4.0.dist-info/RECORD,,