Metadata-Version: 2.4
Name: netbox-sdk
Version: 0.0.7.post6
Summary: SDK-first NetBox toolkit with Python SDK, CLI, and Textual TUIs
Author-email: Emerson Felipe <emerson@netdevopsbr.com>
Maintainer-email: Emerson Felipe <emerson@netdevopsbr.com>
Project-URL: Homepage, https://github.com/emersonfelipesp/netbox-sdk
Project-URL: Documentation, https://emersonfelipesp.github.io/netbox-sdk/
Project-URL: Repository, https://github.com/emersonfelipesp/netbox-sdk
Project-URL: Issues, https://github.com/emersonfelipesp/netbox-sdk/issues
Project-URL: Changelog, https://github.com/emersonfelipesp/netbox-sdk/releases
Keywords: netbox,terminal,netbox-integration,tui,cli,terminal,api,integration
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: Apache Software 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 :: Internet
Classifier: Topic :: System :: Networking
Classifier: Topic :: System :: Systems Administration
Classifier: Typing :: Typed
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: aiohttp>=3.13.4
Requires-Dist: pydantic>=2.12.5
Requires-Dist: email-validator>=2.3.0
Requires-Dist: rich>=14.3.3
Requires-Dist: pyyaml>=6.0.3
Provides-Extra: sdk
Provides-Extra: tui
Requires-Dist: textual>=8.2.0; extra == "tui"
Provides-Extra: cli
Requires-Dist: typer>=0.24.1; extra == "cli"
Provides-Extra: demo
Requires-Dist: playwright>=1.58.0; extra == "demo"
Provides-Extra: mock
Requires-Dist: fastapi>=0.115.0; extra == "mock"
Requires-Dist: uvicorn[standard]>=0.30.0; extra == "mock"
Provides-Extra: all
Requires-Dist: textual>=8.2.0; extra == "all"
Requires-Dist: typer>=0.24.1; extra == "all"
Requires-Dist: playwright>=1.58.0; extra == "all"
Requires-Dist: fastapi>=0.115.0; extra == "all"
Requires-Dist: uvicorn[standard]>=0.30.0; extra == "all"
Provides-Extra: dev
Requires-Dist: pre-commit>=4.5.1; extra == "dev"
Requires-Dist: pytest>=9.0.2; extra == "dev"
Requires-Dist: pytest-asyncio>=1.3.0; extra == "dev"
Requires-Dist: pytest-timeout>=2.4.0; extra == "dev"
Requires-Dist: pytest-xdist>=3.8.0; extra == "dev"
Requires-Dist: ruff>=0.15.8; extra == "dev"
Requires-Dist: ty>=0.0.1a16; extra == "dev"
Requires-Dist: textual>=8.2.0; extra == "dev"
Requires-Dist: typer>=0.24.1; extra == "dev"
Requires-Dist: playwright>=1.58.0; extra == "dev"
Requires-Dist: fastapi>=0.115.0; extra == "dev"
Requires-Dist: uvicorn[standard]>=0.30.0; extra == "dev"
Requires-Dist: httpx>=0.27.0; extra == "dev"
Provides-Extra: docs
Requires-Dist: mkdocs-material>=9.7.6; extra == "docs"
Requires-Dist: mkdocs-static-i18n[material]>=1.3.0; extra == "docs"
Dynamic: license-file

# netbox-sdk

`netbox-sdk` is an SDK-first NetBox toolkit with terminal interfaces built on
one shared runtime:

- `netbox_cli` — Typer command-line interface
- `netbox_tui` — Textual terminal applications
- `netbox_sdk` — standalone REST API SDK shared by both

Published package names remain:

- `netbox-sdk`
- `netbox-console`

## Quick Start with the Demo Instance

Install:

```bash
pip install 'netbox-sdk[all]'
```

Authenticate against the public demo instance:

```bash
nbx demo init
```

Try a few commands:

```bash
nbx demo dcim devices list
nbx demo ipam prefixes list
nbx demo tui
nbx demo dev tui
```

## Install

Current release documented on the docs site matches **`docs/snippets/package-version.txt`** (aligned with `pyproject.toml`). For the latest PyPI build you can omit the pin; add `==<version>` to match that documentation snapshot.

Minimal SDK only:

```bash
pip install netbox-sdk
```

CLI:

```bash
pip install 'netbox-sdk[cli]'
```

TUI:

```bash
pip install 'netbox-sdk[tui]'
```

Everything:

```bash
pip install 'netbox-sdk[all]'
```

Pinned (same version as the docs site / `package-version.txt`):

```bash
pip install 'netbox-sdk[all]==0.0.7.post1'
```

With `uv` as a user tool:

```bash
uv tool install --force 'netbox-sdk[cli]'
```

Developer checkout:

```bash
git clone https://github.com/emersonfelipesp/netbox-sdk.git
cd netbox-sdk
uv sync --dev --extra cli --extra tui --extra demo
uv run nbx --help
```

## Common Commands

```bash
nbx init
nbx dcim devices list
nbx dcim devices get --id 1
nbx tui
nbx dev tui
nbx cli tui
nbx logs
```

## Architecture

- `netbox_sdk` owns config, auth, caching, schema parsing, request resolution, shared formatting, and demo helpers.
- `netbox_cli` owns the `nbx` command tree and lazy-loads `netbox_tui` where needed.
- `netbox_tui` owns all Textual apps, themes, widgets, and TCSS.

## Contributor Workflow

```bash
uv sync --dev --extra cli --extra tui --extra demo
uv run pre-commit install --hook-type pre-commit --hook-type pre-push
uv run pre-commit run --all-files
uv run ty check netbox_sdk netbox_cli netbox_tui tests
uv run pytest
```

## Release Process

Use a single GitHub release title pattern for every release:

- `netbox-sdk vX.Y.Z`

Example:

```bash
gh release create v0.0.7.post1 \
  --title "netbox-sdk v0.0.7.post1"
```

When cutting a release, bump **`pyproject.toml`** and **`netbox_sdk.__version__`**, then keep docs in sync: **`docs/snippets/package-version.txt`**, **`mkdocs.yml`** → **`extra.package_version`**, and the version strings in **`docs/snippets/documented-release-*.md`** and **`docs/snippets/pip-pinned-*.txt`** / **`uv-pinned-cli.txt`**. **`uv lock`** must reflect the new version. **`tests/test_docs_alignment.py`** asserts snippet and MkDocs metadata match **`pyproject.toml`**.
