lr-gladiator


Namelr-gladiator JSON
Version 0.10.0 PyPI version JSON
download
home_pageNone
SummaryCLI and Python client for Arena PLM (app.bom.com): login, get revisions, list/download attachments, and upload to working revisions.
upload_time2025-10-20 15:39:53
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT
keywords arena plm bom attachments cli
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # gladiator-arena

CLI + Python client for interacting with the Arena PLM.

## Install

```bash
pip install lr-gladiator
```

## Quick start

### 1) Create `login.json`

Interactive login (prompts for username/password):

```bash
gladiator login
```

Non-interactive (for CI/CD):

```bash
gladiator login --username "$ARENA_USERNAME" --password "$ARENA_PASSWORD" --ci
```

By default, this stores session details at:

```
~/.config/gladiator/login.json
```

### 2) Common commands

Get the latest approved revision for an item:

```bash
gladiator latest-approved 890-1001
```

List all files on an item (defaults to the latest approved revision):

```bash
gladiator list-files 890-1001
```

Output JSON instead of a table:

```bash
gladiator list-files 890-1001 --format json
```

List the Bill of Materials (BOM) for an item:

```bash
gladiator bom 890-1001
```

Recursively expand subassemblies up to two levels deep:

```bash
gladiator bom 890-1001 --recursive --max-depth 2
```

Download attached files to a directory named after the article:

```bash
gladiator get-files 890-1001
```

Specify a different output directory:

```bash
gladiator get-files 890-1001 --out downloads/
```

Recursively download all files in the full BOM tree:

```bash
gladiator get-files 890-1001 --recursive
```

Upload or update a file on the working revision:

```bash
gladiator upload-file 890-1001 ./datasheet.pdf --category "CAD Data" --title "Datasheet"
```

### 3) Output control

Most commands support a JSON output mode.  
Example:

```bash
gladiator bom 890-1001 --output json
```

### Example sessions

#### Human-readable

```bash
$ gladiator list-files 101-1031
Files for 101-1031 rev (latest approved)
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┓
┃ Name                                 ┃ Size  ┃ Checksum            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━┩
│ Drawing.pdf                          │ 12345 │ d41d8cd98f00b204e…  │
└──────────────────────────────────────┴───────┴─────────────────────┘
```

#### JSON output

```bash
$ gladiator list-files 101-1031 --format json
{
  "article": "101-1031",
  "revision": "EFFECTIVE",
  "files": [
    {
      "filename": "Drawing.pdf",
      "size": 12345,
      "checksum": "d41d8cd98f00b204e9800998ecf8427e"
    }
  ]
}
```

## Programmatic use

```python
from gladiator import ArenaClient, load_config

client = ArenaClient(load_config())
rev = client.get_latest_approved_revision("890-1001")
files = client.list_files("890-1001", rev)
```

## Development

```bash
python -m pip install -e .[dev]
python -m build
```

## FAQ

- **Where is the config kept?**
  `~/.config/gladiator/login.json` (override with `GLADIATOR_CONFIG`)

- **How do I run non-interactively?**
  Pass `--ci` together with `--username` and `--password` (or use environment variables).

- **What does `--recursive` do?**
  Expands subassemblies and downloads or lists all contained items up to the given `--max-depth`.

- **How does Gladiator handle authentication?**
  It performs a `/login` call and stores the resulting `arenaSessionId` for reuse. If it expires, re-run `gladiator login`.



            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "lr-gladiator",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "Arena, PLM, BOM, attachments, CLI",
    "author": null,
    "author_email": "Jonas Estberger <jonas.estberger@lumenradio.com>",
    "download_url": "https://files.pythonhosted.org/packages/25/68/0b21b918024310875f2efeb8a35e6559a03b368e6fa8af2a47cb3d588d12/lr_gladiator-0.10.0.tar.gz",
    "platform": null,
    "description": "# gladiator-arena\n\nCLI + Python client for interacting with the Arena PLM.\n\n## Install\n\n```bash\npip install lr-gladiator\n```\n\n## Quick start\n\n### 1) Create `login.json`\n\nInteractive login (prompts for username/password):\n\n```bash\ngladiator login\n```\n\nNon-interactive (for CI/CD):\n\n```bash\ngladiator login --username \"$ARENA_USERNAME\" --password \"$ARENA_PASSWORD\" --ci\n```\n\nBy default, this stores session details at:\n\n```\n~/.config/gladiator/login.json\n```\n\n### 2) Common commands\n\nGet the latest approved revision for an item:\n\n```bash\ngladiator latest-approved 890-1001\n```\n\nList all files on an item (defaults to the latest approved revision):\n\n```bash\ngladiator list-files 890-1001\n```\n\nOutput JSON instead of a table:\n\n```bash\ngladiator list-files 890-1001 --format json\n```\n\nList the Bill of Materials (BOM) for an item:\n\n```bash\ngladiator bom 890-1001\n```\n\nRecursively expand subassemblies up to two levels deep:\n\n```bash\ngladiator bom 890-1001 --recursive --max-depth 2\n```\n\nDownload attached files to a directory named after the article:\n\n```bash\ngladiator get-files 890-1001\n```\n\nSpecify a different output directory:\n\n```bash\ngladiator get-files 890-1001 --out downloads/\n```\n\nRecursively download all files in the full BOM tree:\n\n```bash\ngladiator get-files 890-1001 --recursive\n```\n\nUpload or update a file on the working revision:\n\n```bash\ngladiator upload-file 890-1001 ./datasheet.pdf --category \"CAD Data\" --title \"Datasheet\"\n```\n\n### 3) Output control\n\nMost commands support a JSON output mode.  \nExample:\n\n```bash\ngladiator bom 890-1001 --output json\n```\n\n### Example sessions\n\n#### Human-readable\n\n```bash\n$ gladiator list-files 101-1031\nFiles for 101-1031 rev (latest approved)\n\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n\u2503 Name                                 \u2503 Size  \u2503 Checksum            \u2503\n\u2521\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529\n\u2502 Drawing.pdf                          \u2502 12345 \u2502 d41d8cd98f00b204e\u2026  \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n#### JSON output\n\n```bash\n$ gladiator list-files 101-1031 --format json\n{\n  \"article\": \"101-1031\",\n  \"revision\": \"EFFECTIVE\",\n  \"files\": [\n    {\n      \"filename\": \"Drawing.pdf\",\n      \"size\": 12345,\n      \"checksum\": \"d41d8cd98f00b204e9800998ecf8427e\"\n    }\n  ]\n}\n```\n\n## Programmatic use\n\n```python\nfrom gladiator import ArenaClient, load_config\n\nclient = ArenaClient(load_config())\nrev = client.get_latest_approved_revision(\"890-1001\")\nfiles = client.list_files(\"890-1001\", rev)\n```\n\n## Development\n\n```bash\npython -m pip install -e .[dev]\npython -m build\n```\n\n## FAQ\n\n- **Where is the config kept?**\n  `~/.config/gladiator/login.json` (override with `GLADIATOR_CONFIG`)\n\n- **How do I run non-interactively?**\n  Pass `--ci` together with `--username` and `--password` (or use environment variables).\n\n- **What does `--recursive` do?**\n  Expands subassemblies and downloads or lists all contained items up to the given `--max-depth`.\n\n- **How does Gladiator handle authentication?**\n  It performs a `/login` call and stores the resulting `arenaSessionId` for reuse. If it expires, re-run `gladiator login`.\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "CLI and Python client for Arena PLM (app.bom.com): login, get revisions, list/download attachments, and upload to working revisions.",
    "version": "0.10.0",
    "project_urls": null,
    "split_keywords": [
        "arena",
        " plm",
        " bom",
        " attachments",
        " cli"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "6ccc995ceb69cc4809ea186efe192d95b195b6b23ef98e727f6899ffbcab9021",
                "md5": "d4eee303f4fe5dc388d196c10b8f6756",
                "sha256": "e65063f5852ed55855ccd2d3828dc7e274d690b59802d4dcf1fbf2e72d428f1d"
            },
            "downloads": -1,
            "filename": "lr_gladiator-0.10.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d4eee303f4fe5dc388d196c10b8f6756",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 16756,
            "upload_time": "2025-10-20T15:39:51",
            "upload_time_iso_8601": "2025-10-20T15:39:51.037632Z",
            "url": "https://files.pythonhosted.org/packages/6c/cc/995ceb69cc4809ea186efe192d95b195b6b23ef98e727f6899ffbcab9021/lr_gladiator-0.10.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "25680b21b918024310875f2efeb8a35e6559a03b368e6fa8af2a47cb3d588d12",
                "md5": "24d3581573ee899deb6f6b26663fabe1",
                "sha256": "05cb1bb1e2e01a410fb5bef4ade3d2fa9a55b12be416906920446b5e63069694"
            },
            "downloads": -1,
            "filename": "lr_gladiator-0.10.0.tar.gz",
            "has_sig": false,
            "md5_digest": "24d3581573ee899deb6f6b26663fabe1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 17150,
            "upload_time": "2025-10-20T15:39:53",
            "upload_time_iso_8601": "2025-10-20T15:39:53.638687Z",
            "url": "https://files.pythonhosted.org/packages/25/68/0b21b918024310875f2efeb8a35e6559a03b368e6fa8af2a47cb3d588d12/lr_gladiator-0.10.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-20 15:39:53",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "lr-gladiator"
}
        
Elapsed time: 1.59246s