Saravanan666/pypi-org huggingface dataset:
Package: netmanager
NetManagerVersion: 2.1 (05.03.21)Author: Danila KislukVK:https://vk.com/danilakislukGmail:dankis12a@gmail.comInstallationpip install netmamangerDescriptionNetManager is a Python library for interacting with the Internet from Kivy Android apps.
You can also use NetManager for interacting with the Internet from other projects.
NetManger can make network requests and interact with Firebase Realtime Database.What's new in version 2.1?Added description.Fixed small bugs.NetRequestNetRequest makes network requests and returns their results.fromnetmanagerimportNetRequesturl="some.url/path"# Writing 'https://' is optional. This does not apply to other protocols.""" GET request """get_request=NetRequest(url)# 'GET' is default method.status=get_request.statusheaders=get_request.headersresult=get_request.resultprint(status,type(status))# 200 <class 'int'>print(headers,type(headers))# {"header": "header_data"} <class 'dict'>print(result,type(result))# {"response":"response_data"} <class 'str'>""" POST request """post_request=NetRequest(url,method='POST',data='{"key":"value"}')status=post_request.statusheaders=post_request.headersresult=post_request.resultprint(status,type(status))# 200 <class 'int'>print(headers,type(headers))# {'header': 'header_data'} <class 'dict'>print(result,type(result))# {"response":"response_data"} <class 'str'>FirebaseRTDBFirebaseRTDB interact with Firebase Realtime Database.fromnetmanagerimportFirebaseRTDBdatabase_url="my-default-rtdb.firebasedatabase.app"# Writing 'https://' is optional. This does not apply to other protocols.db=FirebaseRTDB(database_url)path="users"# '/' is default path.""" Get """users=db.get(path)print(users,type(users))# {"user1":"user_data"} <class 'str'>""" Set """data='{"user1":"new_user_data"}'set=db.set(path,data)print(set,type(set))# 200 <class 'int'>
Package: netmem
Basic memory synchronization across the network in Python.This package has a network-synchronized dictionary that runs
onasyncioevent loops.  It supports binding to the
dictionary similar totk.Variable()and is also compatible
withtkinterand its event loops.InstallationThe easiest way is to just open your favorite terminal and typepip install netmemAlternatively you can clone this repo and install it withpython setup.py installRequirementsThe amazing aiohttp libraryPython v3.5+The basis fornetmemis asynchronous IO and event loops, so I
apologize to Python v2.x users and for that matter, Python v3.4.
Although Python v3.4 supportsasyncio, I really like
theasync forandasync withconstructs introduced in v3.5,
and I use them in a number of places.  Since Python is already on
v3.6 at the time of this writing, I do not feel too terribly bad
leaving v3.4 behind.UsageHere is the smallest meaningful example I can come up with.
Run it on two different computers on the same network.import tkinter as tk
import netmem

def main():
    print("Run this on two different computers.")
    mem = netmem.NetworkMemory()
    mem.connect_on_new_thread(netmem.UdpConnector(local_addr=("225.0.0.1", 9991)))

    tk1 = tk.Tk()
    lbl = tk.Label(tk1, text="Favorite operating system:")
    lbl.pack()
    txt = tk.Entry(tk1, textvariable=mem.tk_var("fav_os"))
    txt.pack()

    tk1.mainloop()


if __name__ == "__main__":
    main()You can bind a listener to theNetworkMemoryobject to be notified when
a value changes, such as when an update arrives over the network.  The listener
works like the following code snippet.def memory_changed(netmem_dict, key, old_val, new_val)
    print("Update  {}:{}".format(key, new_val))

def main():
    mem = netmem.NetworkMemory()
    mem.add_listener(memory_changed)
    mem["foo"] = "bar"The output from this would be the followingUpdate foo:barIncidentally the underlyingBindableDictclass is pretty handy on its own,
without even the network synchronizing capabilities.Data StructureNetworkMemorysubclasses a Python dictionary, so you can access the
data within it as you do any dictionary object.  Additionally you can
bind listeners to NetworkMemory (because in fact it subclasses a
bindable dictionary, which is something I borrowed from other code
I wrote).
Package: netmetr-proxy
netmetr-proxyHelper proxy to sit betweennetmetrweb client and backend. Adds a token/key and calls backend for:Monthly stats approvalUncleaned data downloadbrowser       netmetr-proxy          backend
   |                 |                   |
   |     GET         |     POST          |
   | --- month ----> | --- month-------> |
   |   + year        |   + year          |
   |                 |   + token         |
   |                 |                   |
   | <-- response -- | <-- response ---- |
   |   (zip or json) |                   |
   |                 |                   |It also adds some input validation, since the backend will happily return empty CSVs for future dates or even a.zipfile with plaintext"illegal parameters"content.DependenciesPython >= 3.6pyaml >= 17flask >= 0.12Installation$ virtualenv -p `which python3.6` .venv
$ source .venv/bin/activate
$ pip install netmetr_proxy
$ cp config.example.yml config.yml
$ $EDITOR config.yml # set backend url & access tokenRunning in productionuWSGI:$ uwsgi --master --single-interpreter --threads 2 --http :5000 -H .venv -w netmetr_proxy.serverGUnicorn:$ gunicorn -w 2 -k gevent --timeout 160 -n netmetr-proxy netmetr_proxy:server:appUsageDownloading uncleaned open dataGET /opendata
month <int>
year <int>Returns opendata ZIP for download (NetMetr-opendata-dirty-{year}-{month}.zip).Monthly stats approvalGET /approve
month <int>
year <int>Returns:GET /approve?year=2018&month=3
-> 200
   {"success": true, "message": "Results for 2018-03 were successfully approved."}if called again:GET /approve?year=2018&month=3
-> 200
   {"success": true, "message": "Results for 2018-03 were already approved before."}Error responsesReturns errors from backend wrapped in JSON:GET /opendata?year=2018&month=1
# invalid key in config results in "ERROR: invalid key!" message
# from backend (with HTTP 200 for some reason…)
-> 403
   {'error': 'invalid key!'}Returns HTTP 400 and an error message for missing invalid params (bad format or future date):GET /opendata?year=2018&month=0
-> 400
   {'error': 'Invalid date.'}GET /opendata?year=0&month=march
-> 400
   {'error': 'Invalid date.'}GET /approve?year=2018
-> 400
   {'error': 'Missing or invalid parameter (year, month).'}Returns 404 for any non-existing endpoint:GET /
-> 404GET /foo
-> 404DevelopmentStarting server with auto reload on file changes:$ FLASK_APP=netmetr_proxy/server.py FLASK_DEBUG=1 flask runLinting Python code:$ flake8 --config=.flake8rc *pyLicenseGPLv3
Package: netmiko-balabit
netmiko_balabit is an out of tree netmiko driver for the balabit shell control box.InstallationInstall the netmiko balabit driver by running:pip3 install netmiko-balabitUsagefromnetmikoimportConnectHandlerimportnetmiko_balabittarget={'device_type':'balabit_scb','target_device_type':'linux','ip':ssh_host,# ip of balabit gateway'username':ssh_username,# gu=<balabit_username>@<target_username>@<target_ip>'password':[ssh_gw_password,ssh_password],# password list [<balabit_password>,<target_password>]'port':22,}ssh=ConnectHandler(**target)print(ssh.send_command("ls /"))ContributeIssue Tracker:https://github.com/jinjamator/netmiko_balabit/issuesSource Code:https://github.com/jinjamator/netmiko_balabitLicenseThis project is licensed under the Apache License Version 2.0
Package: netmiko-bridge
Netmiko BridgeEnglish |简体中文This is a decorator forNetmikovendor driver extension.You can use this module to add yourself vendor driver without modifyNetmikosource code.How to buildFirst you must installwheelorbuildwithpip.This example is usebuild.use buildpipinstall--upgradebuildThen you can build this module.python-mbuildHow to installInstall via DirectoryYou can installnetmiko_bridgedirect with directory.pipinstall--upgrade{netmiko_bridge_path}Install via BinaryAfter build this module, you can install it to your system.pipinstall-f{netmiko_bridge_path}/dist/--upgradenetmiko_bridgeInstall via PyPipipinstallnetmiko-bridgeHow to use1. Netmiko source code modifyTo use this module, you must do some minimal modify inNetmiko.In filenetmiko/ssh_dispatcher.py,
please add this code beforedef ConnectHandler(*args: Any, **kwargs: Any) -> "BaseConnection":, likeimportnetmiko_bridge@netmiko_bridge.connect_handler_bridge(platforms,vendor_module="your_custom_driver_module_package",vendor_getter_attr="your_custom_vendor_getter_attr_name")defConnectHandler(*args:Any,**kwargs:Any)->"BaseConnection":"""......"""You can also use the default value on theConnectHandlerdecoratorimportnetmiko_bridge@netmiko_bridge.connect_handler_bridge(platforms)defConnectHandler(*args:Any,**kwargs:Any)->"BaseConnection":"""......"""This the bash script help you to modify the source code, and it can match more netmiko version._python_lib_path=/usr/lib64/python3.6/site-packages_netmiko_fix_file=${_python_lib_path}/netmiko/ssh_dispatcher.pyif[-f"${_netmiko_fix_file}"];then_netmiko_fixed=$(grep-c"@netmiko_bridge.connect_handler_bridge"${_netmiko_fix_file})if["${_netmiko_fixed}"-eq"0"];thensed-i"s/def ConnectHandler/import netmiko_bridge\n@netmiko_bridge.connect_handler_bridge(platforms)\ndef ConnectHandler/"${_netmiko_fix_file}fifi2. VendorGetter InstanceThen you can build yourself vendor driver module like thisfromnetmiko_bridge.vendor_getterimportVendorGetterfromnetmiko.cisco_base_connectionimportCiscoBaseConnectionclassCustom(CiscoBaseConnection):"""Your Custom Vendor Support"""def__init__(self):passvendor_getter=VendorGetter()# you can add the mapper use thevendor_getter.add_vendor({"custom_device":Custom})To build vendor module, you can reference modulenetmiko_bridge_vendor.3. Use netmikoNow you can useNetmikowith yourself vendor device driver.fromnetmiko.ssh_dispatcherimportConnectHandlerconn=ConnectHandler(device_type='custom_device')
Package: netmiko-bridge-vendor
Netmiko Bridge VendorThis is Netmiko vendor driver extension with netmiko_bridge module.How to buildFirst you must installwheelorbuildwith pip.use buildpipinstall--upgradebuildThen you can build this module.python-mbuildHow to installInstall without buildYou can installnetmiko_bridgedirect with directory.pipinstall--upgrade{netmiko_bridge_path}Install with binary packageThe last you can install the module to your system.pipinstallnetmiko_bridgeSupportbdcom
Package: netmiko-mhrt
netmiko_multihop is an out of tree netmiko monkeypatch which adds multihop capability.
Currently following platforms are supported as intermediate hop:linuxcisco_nxoscisco_iosOther platforms can be added easily if required.InstallationInstall the netmiko_multihop package by running:pip3 install netmiko-mhrtUsageimportnetmiko_multihopfromnetmikoimportConnectHandlerjumphost1={'device_type':'linux','ip':<ip_jumphost1>,'username':<ssh_username_jumphost1>,'password':<ssh_password_jumphost1>,'port':22,}jumphost2={'device_type':'linux','ip':<ip_jumphost2>,'username':<ssh_username_jumphost2>,'password':<ssh_password_jumphost2>,'port':22,}target1={'device_type':'cisco_nxos','ip':<ip_target1>,'username':<ssh_username_target1>,,'password':<ssh_password_target1>,'port':22,}target2={'device_type':'cisco_ios','ip':<ip_target2>,'username':<ssh_username_target2>,'password':<ssh_password_target2>,'port':22,}# If the next hop is reachable via vrf on the current hop, add the vrf parameter to the destination configuration.# Eg.: Target1 is reachable via vrf mgmt from target2.#      You want to jump from target1 to target2.#      Add the parameter vrf='mgmt' to target2 configuration before you jump from target1 to target2.ssh=ConnectHandler(**jumphost1)# now we are on jumphost1# this is where the magic starts. as jump_to returns the object instance we can jump multiple hops at oncessh.jump_to(**jumphost2).jump_to(**target1)# now we are on target1print(ssh.send_command("show inventory"))# lets get back a single jumpssh.jump_back()# now we are on jumphost2ssh.jump_to(**target2)# now we are on target2print(ssh.send_command("show inventory"))ssh.jump_back()PatchIn some cases network device may have a warning banner following the login banner, and need user input (yes or a simple enter) to continue.
This patch pads in an “enter” command in the channel when “continue:” or “#” is detected during jump_to() process.ContributeIssue Tracker:https://github.com/1mmortalPhoenix/netmiko_mhrt/issuesSource Code:https://github.com/1mmortalPhoenix/netmiko_mhrtLicenseThis project is licensed under the Apache License Version 2.0
Package: netmiko-multihop
netmiko_multihop is an out of tree netmiko monkeypatch which adds multihop capability.
Currently following platforms are supported as intermediate hop:linuxcisco_nxoscisco_iosOther platforms can be added easily if required.InstallationInstall the netmiko_multihop package by running:pip3 install netmiko-multihopUsageimportnetmiko_multihopfromnetmikoimportConnectHandlerjumphost1={'device_type':'linux','ip':<ip_jumphost1>,'username':<ssh_username_jumphost1>,'password':<ssh_password_jumphost1>,'port':22,}jumphost2={'device_type':'linux','ip':<ip_jumphost2>,'username':<ssh_username_jumphost2>,'password':<ssh_password_jumphost2>,'port':22,}target1={'device_type':'cisco_nxos','ip':<ip_target1>,'username':<ssh_username_target1>,,'password':<ssh_password_target1>,'port':22,}target2={'device_type':'cisco_ios','ip':<ip_target2>,'username':<ssh_username_target2>,'password':<ssh_password_target2>,'port':22,}# If the next hop is reachable via vrf on the current hop, add the vrf parameter to the destination configuration.# Eg.: Target1 is reachable via vrf mgmt from target2.#      You want to jump from target1 to target2.#      Add the parameter vrf='mgmt' to target2 configuration before you jump from target1 to target2.ssh=ConnectHandler(**jumphost1)# now we are on jumphost1# this is where the magic starts. as jump_to returns the object instance we can jump multiple hops at oncessh.jump_to(**jumphost2).jump_to(**target1)# now we are on target1print(ssh.send_command("show inventory"))# lets get back a single jumpssh.jump_back()# now we are on jumphost2ssh.jump_to(**target2)# now we are on target2print(ssh.send_command("show inventory"))ssh.jump_back()ContributeIssue Tracker:https://github.com/jinjamator/netmiko_multihop/issuesSource Code:https://github.com/jinjamator/netmiko_multihopLicenseThis project is licensed under the Apache License Version 2.0
Package: netmikro
NetmikroNetmikro is a simple library that provides an easy way to manage Mikrotik routers, simplifying configuration and monitoring tasks.Everything works through an instance of the RouterOS class that creates an SSH connection with the device, think of the instantiated object as your own router, this object hasmethodsto interact with your router, or you can Run custom commands directly in your router's terminal with thecmd()method.Netmikro is on the shoulders of theNetmikoproject, responsible for creating a connection via SSH with the Mikrotik router.📝Note:I'm just a computer networking enthusiast and have experience with handling MIkrotik routers. All Netmikro features are being tested during development with a Mikrotik RB912UAG-5HPn router. The idea is to test it on other models as soon as possible.Documentation:https://netmikro.henriquesebastiao.comSource Code:https://github.com/henriquesebastiao/netmikroHow to installNetmikro is available on PyPi, so just use your preferred package manager:pip install netmikroBasic usageYou just need to create an instance of RouterOS to use Netmikro features:fromnetmikroimportRouterOSrouter=RouterOS('192.168.3.3','user','password',22,)router.cmd('/system identity print')LicenseThis project is licensed under the terms of theMIT license.
Package: netmon
Command line network monitor for linux. Written in python.Installpip install git+https://github.com/TheDen/netmonRun$ netmonBy defaultnetmonwill try to detect your network device. If it
fails, you can specify the network device, e.g.,netmon wlan1DevelopmentPRs are more than welcomeBuilding—make buildPublishing—make publishConverting the markdown readme torst—make convertmake clean—a simplegit clean-fdx
Package: netmri-bootstrap
Bootstrap Framework to facilitate development on NetMRIFree software: Apache licenseDocumentation:https://netmri-bootstrap.readthedocs.org.IntentThe goal of NetMRI-bootstrap is to be a framework that allows you to easily write, maintain and run scripts
and policies on NetMRI. The workflow would be that you clone this project so it can access your NetMRI instance
and place your scripts in the relevant folder.InstallationInstall netmri-bootstrap using pip:pip install netmri-bootstrapHistory0.0.1 (2019-11-07)Initial commit
Package: netneurotools
This toolbox is a collection of functions written in Python that get frequent
usage in theNetwork Neuroscience Lab, housed in
theBrain Imaging CentreatMcGill University.InstallationInstall directly from PyPi withpip install netneurotoolsor install the main branch withgitclonehttps://github.com/netneurolab/netneurotools.gitcdnetneurotoolspipinstall.FeaturesNetwork neuroscience metrics: up-to-date and optimizedNetwork communicationNull networksBrain plotting functions: easy to use and customizeSurface visualizationplot_fsaverageandplot_fslr3D point brainplot_point_brainSorted communitiesplot_mod_heatmapStatistics functionsDominance analysisget_dominance_statsFetchers for common datasetsUtilities for working with FreeSurfer and CIVETCheck out ourdocumentationfor more information!DevelopmentThis package has been developed by members of the Network Neuroscience Lab in
pursuit of their research. While we’ve made every effort to ensure these tools
work and have some documentation, there is always room for improvement! If
you’ve found a bug, are experiencing a problem, or have a question, create a
newissuewith some
information about it and one of our team members will do our best to help you.License InformationThis codebase is licensed under the 3-clause BSD license. The full license can
be found in theLICENSEfile in thenetneurotoolsdistribution.All trademarks referenced herein are property of their respective holders.
Package: netneurotools-scipyfix
This toolbox is a collection of functions written in Python that get frequent
usage in theNetwork Neuroscience Lab, housed in
theBrain Imaging CentreatMcGill University.InstallationInstall directly from PyPi withpip install netneurotoolsor install the main branch withgitclonehttps://github.com/netneurolab/netneurotools.gitcdnetneurotoolspipinstall.FeaturesNetwork neuroscience metrics: up-to-date and optimizedNetwork communicationNull networksBrain plotting functions: easy to use and customizeSurface visualizationplot_fsaverageandplot_fslr3D point brainplot_point_brainSorted communitiesplot_mod_heatmapStatistics functionsDominance analysisget_dominance_statsFetchers for common datasetsUtilities for working with FreeSurfer and CIVETCheck out ourdocumentationfor more information!DevelopmentThis package has been developed by members of the Network Neuroscience Lab in
pursuit of their research. While we’ve made every effort to ensure these tools
work and have some documentation, there is always room for improvement! If
you’ve found a bug, are experiencing a problem, or have a question, create a
newissuewith some
information about it and one of our team members will do our best to help you.License InformationThis codebase is licensed under the 3-clause BSD license. The full license can
be found in theLICENSEfile in thenetneurotoolsdistribution.All trademarks referenced herein are property of their respective holders.
Package: netoapi
NetoAPI LibraryA Python API client for theNeto(Maropost) Ecommerce platform.Requirements:Python 3.7+RequestsTo install:pipinstallnetoapiBasic use:importnetoapiapi=netoapi.NetoAPIClient(my_endpoint,my_username,my_apikey)payload={"Filter":{"SKU":"LSD","OutputSelector":["Name","RRP"]}}response=api.execute_api_call("GetItem",payload)print(response){'Item':[{'RRP':'150.00','InventoryID':'31673','Name':'Luke Skywalker Doll','SKU':'LSD'}],'CurrentTime':'2021-02-06 10:49:40','Ack':'Success'}Method - NetoAPIClient.execute_api_call():# Parameters:action:str"""Used in the 'NETOAPI_ACTION' request header"""payload:dict"""Converted to JSON as the request payload"""# See NETO API documentation for more information on building# JSON payloads and available 'NETOAPI_ACTION' headersCustom exceptions:Raised if netoapi is imported without the requests library installed:netoapi.errors.DependencyNotFoundErrorRaised if an error occurs during an API call:netoapi.errors.NetoAPIRequestError# Catch this error to avoid breaking executiontry:api.execute_api_call(action,payload)exceptNetoAPIRequestErrorase:# Handle the errortimeout:Setting the connection and response timeout property# The timeout property will always return a tuple (connection, response)print(type(api.timeout))<class'tuple'># By default the timeout property is set to (5, 5)# timeout can be set to an integer, a tuple or NoneType# Set both timeouts to the same value with an integerapi.timeout=10# 10 seconds# Set the timeouts individually with a tupleapi.timeout=(5,10)# Set the connection timeout to 5 and wait forever for a responseapi.timeout=(5,None)# Cancel all time limits on connections and requestsapi.timeout=NoneThat's about all there is to it!For more info seeNeto API docsWritten bygithub.com/dan-hobdayRoadmap:-> V1.0.0 - Current release-> V1.1.0 - Map API fields to classes. This will make building payloads easier, less error prone and add support for field constraints.
Package: netom
netomNetwork object modelsDevelopmentInstall (poetry)[https://python-poetry.org/]poetryinstallTesting:poetryrunpytest-v-rxs--cov-reportterm-missing--cov=src/netom/tests/Rendering:poetryrunnetomrenderbgp_neighborsnetom0bird1-0tests/data/config/bgp/neighbors.ymlTemplate filtersmake_variable_name: Makes value into a name safe to use as a variable name. Changes spaces, punctuation, etc into_ip_version: returns IP version of passed value (returns either 4 or 6).LicenseCopyright 2018-2021 20C, LLCLicensed under the Apache License, Version 2.0 (the "License");
you may not use this softare except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Package: netopsauto
NetOpsAuto : Automation Module For Network SwitchesNetOpsAuto (netopsauto) is a lightweight automation package for Juniper switches using theJuniper PyEZPython library.Expansion for Aruba Network Switch automation is a possiblility in the future.DocumentationNetOpsAuto's documentation is located athttps://netopsauto.readthedocs.io/InstallationNetOpsAuto suppoorts Python 3.85+. The reccomended way of installing the module is via pip:pipinstallnetopsautoYou can also clone thegit repositoryand run the setup.py in a new virtual environment.Create new virtual environment within the netopsauto repository:python-mvenvenvActivate the virtual environment:./env/Scripts/Activate.ps1To install the package, run thesetup.py:pipinstall./If you encounter any errors installing through pip, update by runningpython -m pip install --upgrade pipand try again.Installing Through GitHubYou can also directly clone a copy of the repository using git, like so:pipinstall--upgradegit+https://github.com/dmtx97/netopsautoUsageIf you cloned the repository, thecli.pyscript provides an example implementation of the module with command line arguments. It is also advised to create a switch schema similar to the one provided indata/input/switches-example.json.Module CompletionJuniper Network InstanceSecure access port automation changeAutomate Rescue ConfigurationsAdd SNMP Automation ScriptComplete password change functionAruba Switch Instance