Skip to content

Commit 51dc2eb

Browse files
committed
Polish PyPI install documentation
1 parent 3cc78c5 commit 51dc2eb

3 files changed

Lines changed: 33 additions & 49 deletions

File tree

README.md

Lines changed: 18 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,52 +7,44 @@
77
![CLI First](https://img.shields.io/badge/interface-CLI%20first-1f6feb)
88
![Open Core](https://img.shields.io/badge/model-open%20core-0a7f5a)
99

10-
NetConfigPulse is an open source engine for backing up network device configurations over SSH. It connects to routers and switches, runs vendor-specific commands, saves the output to disk, and generates diffs against previous backups. Maintained by 21Vianet.
10+
NetConfigPulse is an open source Python package and CLI for network device configuration backup. It connects to routers and switches over SSH, runs vendor-specific collection commands, saves versioned backup files, and generates diffs against previous runs. Maintained by 21Vianet.
1111

1212
## Quick Start
1313

14-
Install from the source checkout when developing or running the bundled example
15-
configuration:
14+
Install the released package from PyPI:
1615

1716
```bash
18-
pip install -e .[dev]
19-
python -m netconfigpulse validate \
17+
pip install NetConfigPulse
18+
netconfigpulse --help
19+
```
20+
21+
Use the CLI with your own YAML files, or clone the repository and start from the
22+
sample configuration:
23+
24+
```bash
25+
netconfigpulse validate \
2026
--inventory config/devices.example.yaml \
2127
--commands config/commands.default.yaml \
2228
--credentials config/credentials.example.yaml \
2329
--config config/runtime.example.yaml
24-
pytest tests -q
2530
```
2631

27-
This validates the example configuration and runs the test suite. Use `backup`
28-
only after replacing the example devices and credentials with real values.
32+
This validates the example configuration without connecting to any device. Use
33+
`backup` only after replacing the example devices and credentials with real
34+
values.
2935

3036
## Installation
3137

32-
From PyPI after the first stable release:
38+
From PyPI:
3339

3440
```bash
3541
pip install NetConfigPulse
3642
netconfigpulse --help
3743
```
3844

39-
From TestPyPI while testing a pre-release package:
40-
41-
```bash
42-
pip install \
43-
--index-url https://test.pypi.org/simple/ \
44-
--extra-index-url https://pypi.org/simple/ \
45-
NetConfigPulse
46-
netconfigpulse --help
47-
```
48-
49-
`--extra-index-url` lets pip download third-party dependencies such as
50-
`netmiko` and `PyYAML` from the official PyPI index, because TestPyPI is only a
51-
test package index and may not host those dependencies.
52-
53-
The package install provides the CLI and Python library. To run the example
54-
configuration files from this repository, clone the repository or copy the
55-
`config/` directory, then run:
45+
The PyPI package includes both the `netconfigpulse` console command and the
46+
Python library API. To run the example configuration files from this repository,
47+
clone the repository or copy the `config/` directory, then run:
5648

5749
```bash
5850
netconfigpulse validate \

README.zh-CN.md

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,48 +7,40 @@
77
![CLI First](https://img.shields.io/badge/interface-CLI%20first-1f6feb)
88
![Open Core](https://img.shields.io/badge/model-open%20core-0a7f5a)
99

10-
NetConfigPulse 是一个网络设备配置备份的开源引擎。它通过 SSH 连接到路由器和交换机,执行厂商专属命令,将输出保存到磁盘,并与之前的备份生成 diff 对比。由 21Vianet 维护。
10+
NetConfigPulse 是一个用于网络设备配置备份的开源 Python 包和 CLI 工具。它通过 SSH 连接路由器和交换机,执行厂商专属采集命令,保存带版本的备份文件,并与历史备份生成 diff 对比。由 21Vianet 维护。
1111

1212
## 快速开始
1313

14-
开发或运行仓库内置示例配置时,可以从源码目录安装
14+
从 PyPI 安装正式发布包
1515

1616
```bash
17-
pip install -e .[dev]
18-
python -m netconfigpulse validate \
17+
pip install NetConfigPulse
18+
netconfigpulse --help
19+
```
20+
21+
你可以使用自己的 YAML 配置文件运行 CLI,也可以 clone 仓库后从示例配置开始:
22+
23+
```bash
24+
netconfigpulse validate \
1925
--inventory config/devices.example.yaml \
2026
--commands config/commands.default.yaml \
2127
--credentials config/credentials.example.yaml \
2228
--config config/runtime.example.yaml
23-
pytest tests -q
2429
```
2530

26-
这组命令会校验示例配置并运行测试。只有在把示例设备和凭据替换为真实值之后,
31+
这条命令只校验示例配置,不会连接任何设备。只有在把示例设备和凭据替换为真实值之后,
2732
才建议执行 `backup` 连接真实设备。
2833

2934
## 安装
3035

31-
正式版本发布到 PyPI
36+
PyPI 安装
3237

3338
```bash
3439
pip install NetConfigPulse
3540
netconfigpulse --help
3641
```
3742

38-
测试预发布包时,可以从 TestPyPI 安装:
39-
40-
```bash
41-
pip install \
42-
--index-url https://test.pypi.org/simple/ \
43-
--extra-index-url https://pypi.org/simple/ \
44-
NetConfigPulse
45-
netconfigpulse --help
46-
```
47-
48-
`--extra-index-url` 用于让 pip 从正式 PyPI 下载 `netmiko``PyYAML`
49-
这类第三方依赖,因为 TestPyPI 只是测试包索引,不一定包含这些依赖。
50-
51-
pip 包会安装 CLI 和 Python 库。如果要直接运行本仓库的示例配置文件,请 clone
43+
PyPI 包会同时安装 `netconfigpulse` 控制台命令和 Python 库 API。如果要直接运行本仓库的示例配置文件,请 clone
5244
仓库或复制 `config/` 目录,然后执行:
5345

5446
```bash

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "NetConfigPulse"
7-
version = "0.1.0"
8-
description = "Network configuration backup core engine with CLI-first workflows."
7+
version = "0.1.1"
8+
description = "CLI-first Python package for network device configuration backup, versioned snapshots, and diffs."
99
readme = "README.md"
1010
requires-python = ">=3.10"
1111
license = "Apache-2.0"

0 commit comments

Comments
 (0)