Metadata-Version: 2.4
Name: zebra_day
Version: 5.1.2
Summary: A Python library to manage a Zebra printer fleet and an API for ZPL print requests.
Author-email: John Major <john@daylilyinformatics.com>
License: MIT
Project-URL: Homepage, https://github.com/Daylily-Informatics/zebra_day
Project-URL: Repository, https://github.com/Daylily-Informatics/zebra_day.git
Project-URL: Issues, https://github.com/Daylily-Informatics/zebra_day/issues
Keywords: zebra,printer,zpl,label,barcode,fleet
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Manufacturing
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Printing
Classifier: Topic :: System :: Hardware
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: yaml-config-day>=0.0.5
Requires-Dist: requests>=2.28.0
Requires-Dist: pytz>=2023.3
Requires-Dist: fastapi>=0.109.0
Requires-Dist: uvicorn[standard]>=0.27.0
Requires-Dist: jinja2>=3.1.0
Requires-Dist: itsdangerous>=2.2.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: python-multipart>=0.0.6
Requires-Dist: cli-core-yo==2.0.0
Requires-Dist: daylily-auth-cognito==2.0.2
Requires-Dist: daylily-tapdb==5.0.2
Requires-Dist: typer<0.22.0,>=0.21.0
Requires-Dist: rich<15.0.0,>=14.0.0
Requires-Dist: pillow>=10.0.0
Requires-Dist: zint-bindings>=1.2.0
Requires-Dist: httpx
Requires-Dist: boto3
Requires-Dist: awscli
Provides-Extra: dev
Requires-Dist: bandit[toml]>=1.8.0; extra == "dev"
Requires-Dist: pre-commit>=3.8.0; extra == "dev"
Requires-Dist: pytest>=7.4.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: pytest-playwright>=0.4.4; extra == "dev"
Requires-Dist: ipython>=8.16.0; extra == "dev"
Requires-Dist: playwright>=1.40.0; extra == "dev"
Provides-Extra: lint
Requires-Dist: ruff>=0.1.0; extra == "lint"
Requires-Dist: mypy>=1.0.0; extra == "lint"
Requires-Dist: types-PyYAML>=6.0.0; extra == "lint"
Provides-Extra: docs
Requires-Dist: mkdocs>=1.5.0; extra == "docs"
Requires-Dist: mkdocs-material>=9.0.0; extra == "docs"
Provides-Extra: aws
Requires-Dist: boto3>=1.26.0; extra == "aws"
Provides-Extra: auth
Requires-Dist: python-jose[cryptography]>=3.3.0; extra == "auth"
Requires-Dist: boto3>=1.26.0; extra == "auth"
Provides-Extra: all
Requires-Dist: zebra_day[auth,aws,dev,docs,lint]; extra == "all"
Dynamic: license-file

# zebra_day

`zebra_day` is a Python library, CLI, simulator, and FastAPI web service for managing Zebra printer fleets and serving ZPL print workflows. Shared fleet state, templates, label profiles, observations, and print jobs now live in `daylily-tapdb` only.

## What Changed

- TapDB is the only supported shared datastore.
- `source ./activate <deploy-name>` is the only supported repo activation path.
- The service/admin runtime uses direct TapDB access through `ZebraDayClient`.
- Downstream Python applications should use `ZebraDayApiClient` against a running zebra_day API.
- Cognito is the default auth mode. `--no-auth` remains the explicit runtime override.

Removed in this major cut:

- local fleet/config files as runtime state
- DynamoDB and S3 runtime support
- `print_mgr.zpl()` and package-root helper shims
- `zday_start`, `zday_quickstart`, and `zday dynamo`

## Quickstart

```bash
source ./activate local
zday config init
zday config status
zday gui start
```

The default GUI port is `8118`. HTTPS is enabled automatically when local certs are available.

## Runtime Model

```mermaid
flowchart LR
    CLI["zday CLI"] --> Service["zebra_day service/runtime"]
    GUI["FastAPI + Jinja UI"] --> Service
    APIClient["ZebraDayApiClient"] --> API["zebra_day HTTP API"]
    API --> Service
    Service --> TapDB["daylily-tapdb namespace"]
    Service --> Printers["Zebra printers over TCP 9100"]
    Simulator["simulator"] --> Printers
```

## Python Usage

Direct service/admin usage:

```python
from zebra_day import ZebraDayClient, ZebraDaySettings

settings = ZebraDaySettings.from_context("local")
client = ZebraDayClient(settings)
printers = client.list_printers("default")
```

Downstream app usage:

```python
from zebra_day import ZebraDayApiClient

with ZebraDayApiClient("https://localhost:8118", api_key="internal-token") as client:
    printers = client.list_printers("default")
    client.submit_print_job(
        lab="default",
        printer="printer-1",
        label_zpl_style="tube_2inX1in",
        uid_barcode="SAMPLE-001",
    )
```

## CLI Surface

- `zday gui ...`: start, stop, restart, and inspect the GUI server
- `zday printer ...`: list, scan, and sync printers
- `zday template ...`: list, show, save, preview, and delete templates
- `zday tapdb ...`: pass through to TapDB lifecycle commands
- `zday cognito ...`: inspect or validate the daycog-backed auth contract
- `zday users ...`: manage Cognito group membership for operator/admin roles
- `zday logs ...`: inspect zebra_day GUI logs

## Docs

- [docs/README.md](docs/README.md)
- [zebra_day/docs/programatic_guide.md](zebra_day/docs/programatic_guide.md)
- [zebra_day/docs/zebra_day_ui_guide.md](zebra_day/docs/zebra_day_ui_guide.md)
- [docs/tapdb_hard_migration_plan.md](docs/tapdb_hard_migration_plan.md)

## Development Checks

```bash
ruff check zebra_day tests
ruff format --check zebra_day tests
mypy zebra_day --ignore-missing-imports
pytest tests/ -v --tb=short
```
 
 
