semvec/pypi-packages huggingface dataset:
dw-core 0.0.3
Core library for DeskWatch
Requires Python: >=3.7,<4.0

dw-core
=======

[![GitHub Actions badge](https://github.com/DeskWatch/dw-core/workflows/Build/badge.svg)](https://github.com/DeskWatch/dw-core/actions)
[![Code coverage](https://codecov.io/gh/DeskWatch/dw-core/branch/master/graph/badge.svg)](https://codecov.io/gh/DeskWatch/dw-core)
[![PyPI](https://img.shields.io/pypi/v/dw-core)](https://pypi.org/project/dw-core/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Typechecking: Mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)


Core library for DeskWatch.


## Modules

 - `dw_core`, contains basic datatypes and utilities, such as the `Event` class, helpers for configuration and logging, as well as schemas for buckets, events, and exports.
 - `dw_datastore`, contains the datastore classes used by dw-server-python.
 - `dw_transform`, all event-transforms used in queries.
 - `dw_query`, the query-language used by DeskWatch.


## How to install

To install the latest git version directly from github without cloning, run
`pip install git+https://github.com/DeskWatch/dw-core.git`

To install from a cloned version, cd into the directory and run
`poetry install` to install inside an virtualenv. If you want to install it
system-wide it can be installed with `pip install .`, but that has the issue
that it might not get the exact version of the dependencies due to not reading
the poetry.lock file.
dw-client 0.0.3
Client library for DeskWatch
Requires Python: >=3.7,<4.0

dw-client
=========

[![GitHub Actions badge](https://github.com/DeskWatch/dw-client/workflows/Build/badge.svg)](https://github.com/DeskWatch/dw-client/actions)
[![PyPI](https://img.shields.io/pypi/v/dw-client)](https://pypi.org/project dw-client/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Typechecking: Mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)


[**Documentation**](https://deskwatch.readthedocs.io/en/latest/)

Client library for DeskWatch in Python.

Please see the documentation for usage and examples.


## How to install

To install the latest git version directly from github without cloning, run
`pip install git+https://github.com/DeskWatch/dw-client.git`

To install from a cloned version, cd into the directory and run
`poetry install` to install inside an virtualenv. If you want to install it
system-wide it can be installed with `pip install .`, but that has the issue
that it might not get the exact version of the dependencies due to not reading
the poetry.lock file.

## Debugging

* Run python with `LOG_LEVEL=debug` to get additional debugging output
* If invalid events have been queued for submission, you may need to delete the file-based queues generated by this library
* To use the development version of this library use `dw-client = {path = "../dw-client" }` in `pyproject.toml`

## Examples

The `examples/` directory contains a couple of example scripts, including:

 - `time_spent_today.py` - fetches all non-afk events and sums their duration to get the total active time for the day.
 - `merge_buckets.py` - merges two buckets with non-intersecting events by moving all events from one into the other.
 - `redact_sensitive.py` - redact sensitive events.
CfgParser 0.0.1
this package will parse Cisco ios configuration file
Requires Python: >=3.6

# ConfigParser
## This Package will parse the Cisco running-configuration File in a parent/child style

## Install the package 

`pip install ConfigParser-arezazadeh`

## Regex Search Strings:

parse.find_parent_child("^router") --> to find lines in the configuration starting with "router"
parse.find_parent_child("^.") --> to parse all confuguration into parent and child format
parse.find_parent_child("^.*Loopback") --> to find lines in the configuration that has "Loopback" in them


## Examples:

* Finding Routing Protocol
```ruby
    from ConfigParser import *
    
    
    my_file = "switch01_running_config.txt"
    parse = ConfigParser(my_file)
    
    
    obj_list = parse.find_parent_child("^router")
    for i in obj_list:
        print(i.parent)
        for child_obj in i.child:
            print(child_obj)
 
 ```
 Output:
 
 ```
 router eigrp 252
 !
 address-family ipv4 vrf vrf_A autonomous-system 252
  network 10.10.10.0 0.0.0.63
  passive-interface default
  no passive-interface Vlan3123
  no passive-interface Vlan3124
  eigrp stub connected summary
 exit-address-family
 !
 address-family ipv4 vrf vrf_B autonomous-system 252
  network 10.20.10.0 0.0.0.3
  network 10.20.11.0 0.0.0.3
  passive-interface default
  no passive-interface Vlan3223
  no passive-interface Vlan3224
  eigrp stub connected summary
 exit-address-family
 !

 ```
 
 * Finding Interface and Helper address Example 

```ruby
    from ConfigParser import *


    my_file = "switch01_running_config.txt"
    parse = ConfigParser(my_file)
    obj_list = parse.find_parent_child("^interface")

    for i in obj_list:
        vlan_200 = re.search("Vlan200", i.parent)
        if vlan_200:
            print(i.parent)
            for c_obj in i.child:
                if str(c_obj).startswith(" ip helper"):
                    print(str(c_obj))
```
Output: 

```
interface Vlan200
 ip helper-address 192.168.1.10
 ip helper-address 172.31.10.10
```