Metadata-Version: 2.5
Name: nunnari
Version: 0.1.0
Summary: Batteries-included toolkit for generic IT automation: commands, files, git, docker, logging, deploy.
Author-email: Roy <settefalso@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: automation,cli,devops,docker,git,toolkit
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: System :: Systems Administration
Requires-Python: >=3.9
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == 'dev'
Requires-Dist: mkdocs-material>=9.5; extra == 'dev'
Requires-Dist: mkdocs>=1.6; extra == 'dev'
Requires-Dist: mypy>=1.13; extra == 'dev'
Requires-Dist: pre-commit>=3.8; extra == 'dev'
Requires-Dist: pytest-cov>=5; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: ruff>=0.9; extra == 'dev'
Requires-Dist: twine>=5; extra == 'dev'
Provides-Extra: docs
Requires-Dist: mkdocs-material>=9.5; extra == 'docs'
Requires-Dist: mkdocs>=1.6; extra == 'docs'
Description-Content-Type: text/markdown

# nunnari

Batteries-included toolkit for generic IT automation. Run commands, manage
files, automate git and docker workflows, configure logging and deploy — all
from a single, dependency-free package.

> **Status:** early development (0.1.0). The API may change between minor
> versions while it stabilizes.

## Features

- **Commands** — run shell commands with structured results, parallel
  execution, timeouts and live output (`nunnari.run`)
- **Files** — atomic writes, glob/regex search, old-file cleanup, tree copy,
  JSON round-trips, hashing (`nunnari.files`)
- **Network** — HTTP GET/POST with retries, JSON helpers, port checks, file
  downloads (`nunnari.net`)
- **Scheduling** — retry with exponential backoff, periodic tasks, wait-for
  conditions (`nunnari.sched`)
- **Git** — branch, status, commit-all, tag, push, clone (`nunnari.git`)
- **Docker** — build, push, inspect, run, stop containers (`nunnari.docker`)
- **Logging** — one-call logger setup for console/file (`nunnari.log`)
- **Deploy** — rsync, pip install, ssh commands (`nunnari.deploy`)
- **CLI** — `nunnari cleanup`, `branch`, `run`, `port`
- **Zero runtime dependencies** — only the Python standard library

## Install

```bash
pip install nunnari
```

## Quick start

```python
from nunnari import (
    run,
    setup_logging,
    git,
    cleanup_old_files,
    http_get,
    retry,
    wait_for,
    port_open,
)

setup_logging(level="DEBUG", file="deploy.log")

run(["./build.sh"], capture=False)
git.commit_all("bump build")
git.tag(f"v{version}", message="release")

removed = cleanup_old_files("artifacts", days=7, pattern="*.tmp", dry_run=True)
print(removed)

response = http_get("https://api.example.com/health", retries=3)
if response.ok:
    print(response.json())

retry(lambda: run(["deploy.sh"]), attempts=3)
wait_for(lambda: port_open("10.0.0.5", 8080))
```

## CLI

```bash
nunnari --help
nunnari cleanup artifacts --days 30 --pattern "*.log" --dry-run
nunnari branch .
nunnari run pytest tests
nunnari port 10.0.0.5 8080
```

## Development

```bash
git clone https://github.com/Rp-ics/nunnari
cd nunnari
python -m venv .venv && .venv\Scripts\activate   # or source .venv/bin/activate
pip install -e ".[dev]"
pytest
ruff check .
mypy src
pre-commit install
```

## Documentation

Full docs (under construction) will live at
[docs](https://github.com/Rp-ics/nunnari) — meanwhile, every module has
detailed docstrings and the tests document expected behavior.

## License

[MIT](LICENSE)
