Skip to content

abreu0x/isapi-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

isapi-cli

CLI tipada (typer + Pydantic 2 + httpx Digest) para câmeras Hikvision via ISAPI.

CI Release License

Status: esqueleto em desenvolvimento. A superfície tipada da CLI (snapshot, events, ptz, zoom) e a construção de paths ISAPI já estão testadas com typer.testing — cobertura 98%, sem câmera. Execução real (httpx com Digest auth) e publicação no PyPI chegam nas próximas etapas.

🚀 Demo em 30s

uv sync --all-extras
uv run isapi snapshot --host 10.0.0.9 --channel 1
# → GET https://10.0.0.9/ISAPI/Streaming/channels/101/picture

Comandos: snapshot · events · ptz --preset N · zoom — todos --host + --channel.

🏗️ Design

flowchart LR
    U[usuário] --> CLI[typer app<br/>tipado, testado]
    CLI --> EP[endpoints ISAPI<br/>paths puros]
    CLI --> C[cliente httpx Digest]
    C -- ISAPI --> CAM[(Câmera Hikvision)]
Loading

A construção de paths (endpoints.py) é pura — separada do transporte, testável 100% sem câmera. O cliente httpx com Digest auth entra por cima, sem tocar nessa lógica.

🧪 Testes & CI

Camada Ferramenta Status
Estilo & tipos ruff + mypy --strict ✅ em CI
Unit + CLI + cobertura pytest + typer.testing (≥ 80%) ✅ 98%
Execução real httpx Digest + respx mock planejado
Publicação pipx install isapi-cli (PyPI) planejado

🗺️ Roadmap

  • CLI tipada + endpoints ISAPI puros, testados (ruff/mypy/cov 98%)
  • Cliente httpx com Digest auth + respx mock server nos testes
  • Tratamento de erro humano (paths v1/v2, timeouts)
  • Publicação no PyPI + asciinema no README

🛠️ Stack

Python 3.12 · typer · Pydantic 2 · httpx (Digest) · pytest · ruff · mypy

📄 Licença

MIT — ver LICENSE.

About

CLI Python tipada (typer + Pydantic 2) pra Hikvision ISAPI - snapshot, eventos, PTZ, zoom. Distribuida via PyPI.

Topics

Resources

License

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages