lr-gladiator 0.2.0__py3-none-any.whl → 0.4.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.
- gladiator/arena.py +3 -5
- gladiator/cli.py +1 -2
- {lr_gladiator-0.2.0.dist-info → lr_gladiator-0.4.0.dist-info}/METADATA +1 -1
- lr_gladiator-0.4.0.dist-info/RECORD +10 -0
- lr_gladiator-0.2.0.dist-info/RECORD +0 -10
- {lr_gladiator-0.2.0.dist-info → lr_gladiator-0.4.0.dist-info}/WHEEL +0 -0
- {lr_gladiator-0.2.0.dist-info → lr_gladiator-0.4.0.dist-info}/entry_points.txt +0 -0
- {lr_gladiator-0.2.0.dist-info → lr_gladiator-0.4.0.dist-info}/licenses/LICENSE +0 -0
- {lr_gladiator-0.2.0.dist-info → lr_gladiator-0.4.0.dist-info}/top_level.txt +0 -0
gladiator/arena.py
CHANGED
|
@@ -413,7 +413,8 @@ class ArenaClient:
|
|
|
413
413
|
return data
|
|
414
414
|
|
|
415
415
|
# Else: create a new association on WORKING
|
|
416
|
-
# 2) Resolve file category guid by name (default: CAD Data)
|
|
416
|
+
# 2) Resolve file category guid by name (default: CAD Data)
|
|
417
|
+
cats_url = f"{self._api_base()}/settings/files/categories"
|
|
417
418
|
self._log(f"GET {cats_url}")
|
|
418
419
|
r = self.session.get(cats_url)
|
|
419
420
|
r.raise_for_status()
|
|
@@ -430,14 +431,11 @@ class ArenaClient:
|
|
|
430
431
|
title = title or file_path.stem
|
|
431
432
|
file_format = file_format or (file_path.suffix[1:].lower() if file_path.suffix else "bin")
|
|
432
433
|
description = description or "Uploaded via gladiator"
|
|
434
|
+
files = {"content": (file_path.name, open(file_path, "rb"), "application/octet-stream")}
|
|
433
435
|
|
|
434
|
-
files = {
|
|
435
|
-
"content": (file_path.name, open(file_path, "rb"), "application/octet-stream"),
|
|
436
|
-
}
|
|
437
436
|
# NOTE: nested field names are sent in `data`, not `files`
|
|
438
437
|
data_form = {
|
|
439
438
|
"file.title": title,
|
|
440
|
-
"file.name": filename,
|
|
441
439
|
"file.description": description,
|
|
442
440
|
"file.category.guid": cat_guid,
|
|
443
441
|
"file.format": file_format,
|
gladiator/cli.py
CHANGED
|
@@ -118,7 +118,6 @@ def get_files(
|
|
|
118
118
|
item: str = typer.Argument(..., help="Item/article number"),
|
|
119
119
|
revision: Optional[str] = typer.Option(None, "--rev", help="Revision (default: latest approved)"),
|
|
120
120
|
out: Path = typer.Option(Path("downloads"), "--out", help="Output directory"),
|
|
121
|
-
format: Optional[str] = typer.Option(None, "--format", "-f", help="Output format: human (default) or json"),
|
|
122
121
|
):
|
|
123
122
|
try:
|
|
124
123
|
paths = _client().download_files(item, revision, out_dir=out)
|
|
@@ -138,7 +137,7 @@ def upload_file(
|
|
|
138
137
|
category: str = typer.Option("CAD Data", "--category", help='File category name (default: "CAD Data")'),
|
|
139
138
|
file_format: Optional[str] = typer.Option(None, "--format", help="File format (default: file extension)"),
|
|
140
139
|
description: Optional[str] = typer.Option(None, "--desc", help="Optional description"),
|
|
141
|
-
primary: bool = typer.Option(
|
|
140
|
+
primary: bool = typer.Option(False, "--primary/--no-primary", help="Mark association as primary"),
|
|
142
141
|
edition: str = typer.Option("1", "--edition", help="Edition number when creating a new association (default: 1)"),
|
|
143
142
|
):
|
|
144
143
|
"""If a file with the same filename exists: update its content (new edition).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: lr-gladiator
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: CLI and Python client for Arena PLM (app.bom.com): login, get revisions, list/download attachments, and upload to working revisions.
|
|
5
5
|
Author-email: Jonas Estberger <jonas.estberger@lumenradio.com>
|
|
6
6
|
License: MIT
|
|
@@ -0,0 +1,10 @@
|
|
|
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,,
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
gladiator/__init__.py,sha256=kVgJiGDD6714tJ3SN6mdao3rdVO57jlMvLMHAFjHX4A,207
|
|
2
|
-
gladiator/arena.py,sha256=3_Ry7_7YIUNHtlxo0WLwq0q4CVGwCmikzoYnQIZy-DE,21651
|
|
3
|
-
gladiator/cli.py,sha256=ugquxfry1Qx6iYbNVglXgYV9XPryAzYmXlLBxAF6JTc,6557
|
|
4
|
-
gladiator/config.py,sha256=pnuVrcW8yafxMB7RU9wyi_4jS_oMBIuNryfet203Wng,1738
|
|
5
|
-
lr_gladiator-0.2.0.dist-info/licenses/LICENSE,sha256=2CEtbEagerjoU3EDSk-eTM5LKgI_RpiVIOh3_CV4kms,1069
|
|
6
|
-
lr_gladiator-0.2.0.dist-info/METADATA,sha256=paVTyMqmQChuQuUmx1C6OwKghztoQyKWgI6JsWYi3Nc,1912
|
|
7
|
-
lr_gladiator-0.2.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
8
|
-
lr_gladiator-0.2.0.dist-info/entry_points.txt,sha256=SLka4w7iGS2B8HrbeZyNk5mxaIC6QKcv93us1OaWNwQ,48
|
|
9
|
-
lr_gladiator-0.2.0.dist-info/top_level.txt,sha256=tfrcAmK7_7Lf63w7kWy0wv_Qg9RrcFWGoins1-jGUF4,10
|
|
10
|
-
lr_gladiator-0.2.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|