Metadata-Version: 2.1
Name: scrapli_cfg
Version: 2024.1.30
Summary: Network device configuration management with scrapli
Author-email: Carl Montanari <carl.r.montanari@gmail.com>
License: MIT License
        
        Copyright (c) 2021 Carl Montanari
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Changelog, https://scrapli.github.io/scrapli_cfg/changelog/
Project-URL: Docs, https://scrapli.github.io/scrapli_cfg/
Project-URL: Homepage, https://github.com/scrapli/scrapli_cfg
Keywords: arista,automation,cisco,eos,iosxe,iosxr,juniper,junos,netconf,network,nxos,ssh,telnet
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.8
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 :: Only
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: scrapli >=2022.01.30a2
Provides-Extra: asyncssh
Requires-Dist: asyncssh <3.0.0,>=2.2.1 ; extra == 'asyncssh'
Provides-Extra: dev
Requires-Dist: black <24.0.0,>=23.3.0 ; extra == 'dev'
Requires-Dist: darglint <2.0.0,>=1.8.1 ; extra == 'dev'
Requires-Dist: isort <6.0.0,>=5.10.1 ; extra == 'dev'
Requires-Dist: mypy <2.0.0,>=1.4.1 ; extra == 'dev'
Requires-Dist: nox ==2023.4.22 ; extra == 'dev'
Requires-Dist: pycodestyle <3.0.0,>=2.8.0 ; extra == 'dev'
Requires-Dist: pydocstyle <7.0.0,>=6.1.1 ; extra == 'dev'
Requires-Dist: pyfakefs <6.0.0,>=5.0.0 ; extra == 'dev'
Requires-Dist: pylama <9.0.0,>=8.4.0 ; extra == 'dev'
Requires-Dist: pylint <4.0.0,>=3.0.0 ; extra == 'dev'
Requires-Dist: pytest-asyncio <1.0.0,>=0.17.0 ; extra == 'dev'
Requires-Dist: pytest-cov <5.0.0,>=3.0.0 ; extra == 'dev'
Requires-Dist: pytest <8.0.0,>=7.0.0 ; extra == 'dev'
Requires-Dist: scrapli-replay ==2023.7.30 ; extra == 'dev'
Requires-Dist: toml <1.0.0,>=0.10.2 ; extra == 'dev'
Requires-Dist: paramiko <4.0.0,>=2.6.0 ; extra == 'dev'
Requires-Dist: asyncssh <3.0.0,>=2.2.1 ; extra == 'dev'
Requires-Dist: ssh2-python <2.0.0,>=0.23.0 ; (python_version < "3.12") and extra == 'dev'
Provides-Extra: docs
Requires-Dist: mdx-gh-links <1.0,>=0.2 ; extra == 'docs'
Requires-Dist: mkdocs <2.0.0,>=1.2.3 ; extra == 'docs'
Requires-Dist: mkdocs-gen-files <1.0.0,>=0.4.0 ; extra == 'docs'
Requires-Dist: mkdocs-literate-nav <1.0.0,>=0.5.0 ; extra == 'docs'
Requires-Dist: mkdocs-material <10.0.0,>=8.1.6 ; extra == 'docs'
Requires-Dist: mkdocs-material-extensions <2.0.0,>=1.0.3 ; extra == 'docs'
Requires-Dist: mkdocs-section-index <1.0.0,>=0.3.4 ; extra == 'docs'
Requires-Dist: mkdocstrings[python] <1.0.0,>=0.19.0 ; extra == 'docs'
Provides-Extra: paramiko
Requires-Dist: paramiko <4.0.0,>=2.6.0 ; extra == 'paramiko'
Provides-Extra: ssh2
Requires-Dist: ssh2-python <2.0.0,>=0.23.0 ; (python_version < "3.12") and extra == 'ssh2'

[![Supported Versions](https://img.shields.io/pypi/pyversions/scrapli_cfg.svg)](https://pypi.org/project/scrapli_cfg)
[![PyPI version](https://badge.fury.io/py/scrapli-cfg.svg)](https://badge.fury.io/py/scrapli-cfg)
[![Weekly Build](https://github.com/scrapli/scrapli_cfg/workflows/Weekly%20Build/badge.svg)](https://github.com/scrapli/scrapli_cfg/actions?query=workflow%3A%22Weekly+Build%22)
[![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
[![License: MIT](https://img.shields.io/badge/License-MIT-blueviolet.svg)](https://opensource.org/licenses/MIT)

scrapli_cfg
===========

---

**Documentation**: <a href="https://scrapli.github.io/scrapli_cfg" target="_blank">https://scrapli.github.io/scrapli_cfg</a>

**Source Code**: <a href="https://github.com/scrapli/scrapli_cfg" target="_blank">https://github.com/scrapli/scrapli_cfg</a>

**Examples**: <a href="https://github.com/scrapli/scrapli_cfg/tree/master/examples" target="_blank">https://github.com/scrapli/scrapli_cfg/tree/master/examples</a>

---

scrapli_cfg makes merging or replacing device configurations over Telnet or SSH easy, all while giving you the 
scrapli behaviour you know and love.


#### Key Features:

- __Easy__: It's easy to get going with scrapli and scrapli-cfg -- check out the documentation and example links above, 
  and you'll be managing device configurations in no time.
- __Fast__: Do you like to go fast? Of course you do! All of scrapli is built with speed in mind, but if you really 
  feel the need for speed, check out the `ssh2` transport plugin to take it to the next level! All the "normal" 
  scrapli transport plugin goodness exists here in scrapli-cfg too!
- __Great Developer Experience__: scrapli_cfg has great editor support thanks to being fully typed; that plus 
  thorough docs make developing with scrapli a breeze.


## Requirements

MacOS or \*nix<sup>1</sup>, Python 3.7+

scrapli_cfg's only requirements is `scrapli`.

<sup>1</sup> Although many parts of scrapli *do* run on Windows, Windows is not officially supported


## Installation

```
pip install scrapli-cfg
```

See the [docs](https://scrapli.github.io/scrapli_cfg/user_guide/installation) for other installation methods/details.



## A simple Example

```python
from scrapli import Scrapli
from scrapli_cfg import ScrapliCfg

device = {
   "host": "172.18.0.11",
   "auth_username": "scrapli",
   "auth_password": "scrapli",
   "auth_strict_key": False,
   "platform": "cisco_iosxe"
}

with open("myconfig", "r") as f:
    my_config = f.read()

with Scrapli(**device) as conn:
  cfg_conn = ScrapliCfg(conn=conn)
  cfg_conn.prepare()
  cfg_conn.load_config(config=my_config, replace=True)
  diff = cfg_conn.diff_config()
  print(diff.side_by_side_diff)
  cfg_conn.commit_config()
  cfg_conn.cleanup()

```
