Saravanan666/pypi-org huggingface dataset:
Package: wireguard-lib
wireguardОписаниеБиблиотека для работы с wireguardInstallationpython3 -m pip install wireguard-libПример использования:Сгенерируем конфиг сервера.Для этого нужен приватный ключ.Воспользуемся консолью Python для получения приватного ключа:>>> from wireguard import Wireguard
>>> Wireguard().get_private_key
'sBd8jkAY9Ht7wn+q5iGbW4MfShgjdxB1s3oTJsttaHc='Используя полученый ключ сгенерируем конфиг сервера:from wireguard import Wireguard

wg = Wireguard(
    server_private_key = 'sBd8jkAY9Ht7wn+q5iGbW4MfShgjdxB1s3oTJsttaHc=',
    server_addres='wireguard.example.org',
    server_ip='10.10.10.1',
    server_port=51821,
)

server_config = wg.get_config_server
print(server_config)Получим следующий конфиг:[Interface]
PrivateKey = sBd8jkAY9Ht7wn+q5iGbW4MfShgjdxB1s3oTJsttaHc=
Address = 10.10.10.1
ListenPort = 51821LicenseMIT License (MIT)
Package: wireguard-p2p
# WireGuard Peer-to-PeerA tool for setting up WireGuard connections from peer to peer.It takes care of exchanging public keys, IP addresses and NAT traversal.## Installation### 0) Install WireGuardSee WireGuard's [installation page](https://www.wireguard.io/install/)### 1) Install [BulletinBoard DHT](https://github.com/manuels/bulletinboard-dht/)```bashwget 'https://github.com/manuels/bulletinboard-dht/releases/download/v0.5.0/bulletinboard_0.5.0_amd64.deb'sudo dpkg -i bulletinboard_0.5.0_amd64.deb```### 2) Install wg-p2p```bashpip install wireguard-p2p```## Exchange Public Keys### 0) Create new config file (optional)Alice creates a new WireGuard [configuration file](https://git.zx2c4.com/WireGuard/about/src/tools/wg.8) on her computer named `bob`. (Bob does the same on his machine.)```bashalice$ wg-p2p bob new | sudo tee /etc/wireguard/bob.conf >/dev/nullalice$ sudo cat /etc/wireguard/bob.conf[Interface]ListenPort = 51800PrivateKey = p504swpAoXHitQOOPHfPmt4qqY5ik5xkUrMnAZTr4X8=Address = 10.0.100.2/24```### 1) Publish Public KeysAlice publishes her public key, so Bob can find it.```bashalice$ wg-p2p bob publish alice[sudo] password for alice: # to read /etc/wireguard/bob.confPublished public key LLgKTG7VaTZKzikIRR0oRkyZw1IKNPIXGt0RYJV2OWA= as "alice".```### 2) Retrieve Bob's Public KeyAlice adds Bob's public key to her configuration file. (Bob does the same on his machine.)```bashalice$ wg-p2p bob add-peer bob | sudo tee /etc/wireguard/bob.conf >/dev/null1 peer(s) found named "alice".Would you like to add the peer with public key EKJDRxMeLswhIpaCy6xnYLD1ZaHMNvi5SuT10L8w1m8=? [Y/n]```## Update Bob's IP and Port and traverse NATAlice and Bob can determine their current IP address and setup NAT traversal (using STUN) and publish it.This has to be done initially and from time to time when both IP addresses change or the NAT traversal expired.```bashalice$ wg-quick down bobalice$ wg-p2p bob update | sudo tee /etc/wireguard/bob.conf >/dev/nullOwn public address: 38.12.81.2:21280, NAT type: Full ConeLocal NAT:  Full ConeRemote NAT: Full Cone[Interface]ListenPort = 51800PrivateKey = p504swpAoXHitQOOPHfPmt4qqY5ik5xkUrMnAZTr4X8=Address = 10.0.100.2/24[Peer]AllowedIPs = 10.0.0.0/24PublicKey = EKJDRxMeLswhIpaCy6xnYLD1ZaHMNvi5SuT10L8w1m8=Endpoint = 81.52.9.1:2286alice$ wg-quick up bob```(Bob does the same on his machine.)
Package: wireguard-py
wireguard_py - A cython library allowing direct access to Wireguard kernel functions from PythonFor most use cases, the Wireguard CLI is all one needs to set up a working Wireguard tunnel.  However, for more complex scenarios (e.g. the creation and maintenance of a
Wireguard mesh involving many thousands of peers), using a high-level language to manage all of the peer configuration and monitoring make life much easier.  Thewireguard_pycython module exists to make this possible in Python without the additional overhead and fragility of having to shell out to the wireguard CLI, as well as providing type hints.InstallingInstallation is performed via pip:pip install wireguard-pyUsing wireguard_pyAn quick example of setting up a wireguard connection and peering:importipaddressimportpyroute2importwireguard_pyfromwireguard_py.wireguard_commonimportEndpoint# Create the wireguard interfaceipr=pyroute2.IPRoute()ipr.link("add",ifname="wg0",kind="wireguard")wg_ifc=ipr.link_lookup(ifname="wg0")[0]ipr.addr("add",index=wg_ifc,address="172.16.0.1",prefixlen=24)ipr.link("set",index=wg_ifc,state="up")# Configure wireguard interfacepriv_key=wireguard_py.gen_priv_key()wireguard_py.set_device(device_name=b"wg0",priv_key=priv_key,port=51820,)# Create a peerwireguard_py.set_peer(device_name=b"wg0",pub_key=b"lM77O8LlU4PNI0ZPWsTPYS3SGubG2/YT26uh9o9LKzM=",endpoint=Endpoint(ip=ipaddress.ip_address("172.16.0.2"),port=51820),allowed_ips={ipaddress.ip_network("172.16.0.2/32"),ipaddress.ip_network("10.0.0.0/8"),},replace_allowed_ips=True,)# List peerspeers=wireguard_py.list_peers(b"wg0")print(peers)Licensewireguard_py is licensed under the MIT License.
Package: wireless-control
Android Wireless ControlWireless-control based on wireless-control is a command line wireless control tool for Android automation enthusiasts.Wireless-control's source code is made available under theBSD license.Supported Python VersionsPython 3.6+Supported PlatformsWindows 10 (Other platforms have not been tested and are not intended to be supported for the time being officially)InstallationIf you havepipon your system, you can simply install or upgrade wireless-control:pip install -U wireless-controlAlternately, you can download the source distribution fromPyPI, unarchive it, and run:python setup.py installOr bygithub.com:git clone git@github.com:fjwCode/wireless-control.git
cd wireless-control
python setup.py installNote: You may want to consider usingvirtualenvto create isolated Python environments.UsageFirst, make sure that:Your Android phone has USB debugging turned on in developer options.Your computer and phone are connected to the same WiFi.Onlyone phoneconnects your computer via USB cable.OK, Let us begin now!C:\WINDOWS\system32>python -m wireless_control.py
Now you can unplug the USB cable, and control your device via WLAN.
>>> driver.unlock(1997)   # unlock your device by password
>>> driver.view_packgets_list(keyword='tencent')
['com.tencent.mm', 'com.tencent.android.qqdownloader', 'com.tencent.tim']
>>> driver.make_a_call(18268237856)   # call me
>>> driver.end_the_all()   # end the callAuthorWireless-control is written and maintained byWhite Turing(fujiawei@stu.hznu.edu.cn).
Package: wireless-sensor
wireless-sensor 🌡Command-line tool & python library to receive & decode signals of FT017TH wireless thermo/hygrometersRequirementsFT017THsensorCC1101 transceiverLinux machine with CC1101 connected to SPI port &GDO0connected to some GPIO pin
(wiring instructionsfor raspberry pi)Setup$pip3install--user--upgradewireless-sensorUsageCommand-line$wireless-sensor-receive2020-12-07T10:40:16+010023.9°C46.9%2020-12-07T10:41:04+010023.9°C46.9%2020-12-07T10:42:01+010023.8°C47.0%Python Libraryimportwireless_sensorsensor=wireless_sensor.FT017TH(gdo0_gpio_line_name=b'GPIO24')formeasurementinsensor.receive(timeout_seconds=600):ifnotmeasurement:print("invalid packet or timeout")continueprint(measurement.decoding_timestamp,measurement.temperature_degrees_celsius,measurement.relative_humidity,)
Package: wireless-sensor-mqtt
wireless-sensor-mqtt 🌡MQTT client reporting measurements of FT017TH wireless thermo/hygrometersRequirementsMQTT brokerFT017THsensorCC1101 transceiverLinux machine with CC1101 connected to SPI port
(wiring instructionsfor raspberry pi)Setup$pip3install--user--upgradewireless-sensor-mqttUsage$wireless-sensor-mqtt--mqtt-hostHOSTNAME_OR_IP_ADDRESS\--mqtt-topic-prefixMQTT_TOPIC_PREFIXMeasurements will be published on topicsMQTT_TOPIC_PREFIX/temperature-degrees-celsiusandMQTT_TOPIC_PREFIX/relative-humidity-percent(e.g.,living-room/temperature-degrees-celsiuswith--mqtt-topic-prefix living-room).Add--debugto get debug logs.MQTT via TLSTLS is enabled by default.
Runwireless-sensor-mqtt --mqtt-disable-tls …to disable TLS.MQTT Authenticationwireless-sensor-mqtt--mqtt-usernameme--mqtt-passwordsecret…# orwireless-sensor-mqtt--mqtt-usernameme--mqtt-password-file/var/lib/secrets/mqtt/password…Home Assistant 🏡Home Assistantwill detect two new sensors automatically,
if connected to the same MQTT broker
andMQTT discoveryis enabled
(enabled by default since version0.117.0).When using a customdiscovery_prefix, runwireless-sensor-mqtt --homeassistant-discovery-prefix custom-prefix ….Docker 🐳Pre-built docker images are available athttps://hub.docker.com/r/fphammerle/wireless-sensor-mqtt/tags$sudodockerrun--namewireless_sensor_mqtt\--device/dev/spidev0.0fphammerle/wireless-sensor-mqtt\wireless-sensor-mqtt--mqtt-hostHOSTNAME_OR_IP_ADDRESS…Optionally add--read-only --cap-drop ALL --security-opt no-new-privilegesbefore image specifier.Annotation of signed tagsdocker/*contains docker image digests:https://github.com/fphammerle/wireless-sensor-mqtt/tagsDocker Compose 🐙Clone this repository.Editdocker-compose.yml.sudo docker-compose up --build
Package: wiremapper
This is a python GTK3 application that uses the pockethernet library
to run various network tests using the Pockethernet hardware (a bluetooth
connected network diagnostics tool)FeaturesQuicktest feature which is a single-button test-everything sensible mode.
If you have a wiremap inserted it will run a wiremap and otherwise it
will run link/poe testsPair the pockethernet once with your regular bluetooth menu and
Wiremapper will deal with connecting for you. There’s a dropdown
in the header to switch between paired pockethernets if you have
multiple (showing bluetooth device aliases set in the regular bluetooth
menu)Run a custom test with multiple result “slots”, this is mainly for testing
a complete office building and exporting a .csv file with the results for
each ethernet outlet in the building.Responsive application that should work on any phone/tablet/laptop/desktopInstallationYou can install Wiremapper withpip3 install wiremapper. I haven’t figured out
how to correctly package a launcher yet but you can start it by runningwiremapperScreenshots
Package: wiremock
Python WireMockPython WireMock is a library that allows users to interact with a WireMock instance from within a Python project.
Full documentation can be found atwiremock.readthedocs.org.Key FeaturesWireMock can run in unit tests, as a standalone process or a container. Key features include:Testcontainers Pythonmodule to easily start WireMock server for your testsREST API Client for a standalone WireMock Java serverSupport for most of majorWireMock features(more on their way soon)ReferencesQuickstart GuideInstallationFull documentationExamplesThere are severalexample projectsincluded to demonstrate the different ways that WireMock can be used to mock
services in your tests and systems. The example test modules demonstrate different strategies for testing against
the same "product service" and act as a good demonstration of real world applications to help you get started.Testcontainers PythonStandalone Java Server VersionContributingSee theContributor Guide
Package: wirepas-console
Wirepas ConsoleWirepas Console is a tool for configuring and monitoring Wirepas networks. It is
a graphical user interface for theWirepas MQTT
Library. Wirepas Console is
provided as a Python wheel on thePython Package
Index(PyPI) and it supports Linux,
macOS and Windows.InstallationYou need to have at least Python 3.7 andpipinstalled on your operating
system to install Wirepas Console. Once you have a supported version of Python
installed, you can run the following command to install Wirepas Console fromPyPI:$pip3installwirepas-consoleIt is also possible to install Wirepas Console inside a Python virtual
environment, e.g. by using the Python standardvenvmodule.LinuxWirepas Console requires thePyGObjectPython module on Linux systems. The module is not required on macOS or Windows.To install PyGObject fromPyPI:$pip3installPyGObjectDepending on your Linux distribution, you may have to install extra
dependencies. The following command installs the required dependencies on Debian
or Ubuntu based systems:$sudoaptinstallpython3-gipython3-gi-cairogir1.2-gtk-3.0gir1.2-webkit2-4.0For other common Linux distributions, please consult the PyGObjectGetting
Startedpage.UsageOnce installed, Wirepas Console can be run from the command line:$wirepas-consoleA webview window will open, presenting the user interface. Closing the window
will close Wirepas Console and return to shell prompt.Another way to use Wirepas Console is with a web browser, without opening a
webview window:$wirepas-console--no-webviewThe browser can then be pointed tohttp://localhost:1414. In this mode Wirepas Console
must be manually closed by invoking a keyboard interrupt (Control-C).LicenseCopyright © 2021 Wirepas Ltd — All Rights Reserved
Package: wirepas-gateway
Wirepas Gateway Transport ServiceBuilding the wheelTo build the source distribution and wheel file, make sure you have the
wheel package installedpipinstallwheeland then runpy3clean.python3setup.pyclean--allpython3setup.pysdistbdist_wheelA convenience script is available from theutils folder.InstallationBefore you attempt to build and install this package, please ensure that
you haveall the requirements met.We highly recommend that you make your installation under a python virtual
environment such asvirtualenvorpipenv.To install this package run (use -e for development mode)pipinstall[-e].Running inside a virtual environmentWhen running inside a virtual environment you will need to provide access
to system libraries. You can achieve this by using--system-site-packageswhen setting up your environment or throughvext.If you opt to installvext, please install thePyGObjectmodule with:pipinstallvextvext.giYou also need to ensure that the following packages are installed inside
the virtual environment (as well as their system dependencies):pipinstallpygobjectgobjectStarting the servicePlease read onhow to configure and start the transport service
Package: wirepas-mesh-messaging
Wirepas Mesh MessagingThis Python wheel contains the generated code to interact with Wirepas Mesh Network
through the Gateway to Backend API.
It offers an easy way to use the API in Python without the need to build the protobuf files yourselfInstallationInstall from PyPiThis package is available fromPyPi.pipinstallwirepas-mesh-messagingFrom the sourceThis wheel can be built from source directly.
Flow will be described here but can already be seen from this repositoryGithub action.Usage exampleCreate a message to be sent to a Gateway in protobuf format>>>importwirepas_mesh_messagingaswmm>>>downlink_message=wmm.SendDataRequest(dest_add=1234,src_ep=10,dst_ep=10,qos=0,payload=bytes.fromhex("0102ABCD"))# downlink_message.payload can be published on right topic (protobuf formatted)>>>downlink_message.payloadb'\n\x1e2\x1c\n\x0b\x08\x8e\xac\x9c\xbf\xab\x95\xbd\xf6\xfe\x01\x10\xd2\t\x18\n\n(\x002\x04\x01\x02\xab\xcd'Parse a Wirepas message received from a Gateway in protobuf format>>>importwirepas_mesh_messagingaswmm# payload is the payload received from mqtt (protobuf formatted)# Let's assume it was created like this on Gateway side:# wmm.ReceivedDataEvent(gw_id="Gw1", sink_id="sink0", rx_time_ms_epoch=1608644981000, src=1234, dst=1, src_ep=10, dst_ep=10, travel_time_ms=128, qos=1).payload>>>uplink_message=wmm.ReceivedDataEvent.from_payload(payload)>>>print(uplink_message){'gw_id':'Gw1','sink_id':'sink0','event_id':12527549978202166391,'rx_time_ms_epoch':1608644981000,'source_address':1234,'destination_address':1,'source_endpoint':10,'destination_endpoint':10,'travel_time_ms':128,'qos':1,'data_payload':None,'data_size':None,'hop_count':0}Services API documentationPlease refer to thebackend apis repositoryfor
documentation on theGateway to Backend API.LicenseLicensed under the Apache License, Version 2.0.
SeeLICENSEfor the full license text.
Package: wirepas-messaging
Wirepas MessagingThis wheel contains the generated code to interact with Wirepas Mesh services.InstallationTo install the wirepas messaging package start by cloning the repogitclonehttps://github.com/wirepas/backend-apis.gitInstall the protocol buffer compiler, eg,pipinstallgrpcio-toolsCopy and compile the protocol buffer files./utils/pull_protos.sh./utils/compile_protos.shGenerate the python wheel with./utils/generate_wheel.shAfterwards, install the package from the dist folder withpythoninstalldist/wirepas_messaging-*.whlorpythoninstalldist/wirepas_messaging-*.tarFor development mode installation usepipinstall-e.If you wish to run the examples, please install with the extra requirementspythoninstalldist/wirepas_messaging-*.whl[examples]Services API documentationPlease refer to thebackend apis repositoryfor
documentation on the Wirepas' services APIs.ExamplesFor more information about Wirepas Network Tool examples please seeREADME.mdInstall from PyPiThis package is available fromPyPi.LicenseLicensed under the Apache License, Version 2.0.
SeeLICENSEfor the full license text.
Package: wirepas-networktool-messaging
wirepas-networktool-messaging-pythonThis repository contains WNT API protocol buffer Python bindings used for the real time situation data, and WNT API usage examples.InstallationFromPyPipip3installwirepas-networktool-messagingLicenseLicensed under the Apache License, Version 2.0.
SeeLICENSEfor the full license text.
Package: wirepickle
wirepickleEffortless python remote procedure calling with pickle overZeroMQ.
Allows you to expose a single class instance as an API server over every transport layer
that ZeroMQ provides.Quick SetupInstall wirepickle using your favorite package manager:$pipinstallwirepickleServerNext, on your server, annotate the methods you want to expose with the@exposedecorator:fromwirepickle.serverimportexpose,ServerclassFoo:@expose('bar')defbar(self):print('bar')return0@expose('baz')defbaz(self,arg1,kwarg1='baz'):print(kwarg1)returnself.bar()+arg1Note that you can return anything that can be pickled as a return value,
and that stdout will be mirrored to the client.Then, pass an instance of the class to theServerconstructor to create the server.
To start listening, call theServer#listen()method on the constructed server with
a bind URI:if__name__=='__main__':instance=Foo()Server(instance).listen('tcp://*:12345')ClientSimply pass a URI to connect to and start using the methods.fromwirepickle.clientimportClientfoo=Client('tcp://127.0.0.1:12345')foo.bar()If desired, you can pass atimeoutkwarg to theClientconstructor:foo=Client('tcp://127.0.0.1:12345',timeout=1_000)# milliseconds
Package: wirerope
The concepts:wirerope.rope.WireRopeis a wrapper interface for python callable.Customwirerope.wire.Wireclass provides user-defined behavior.
A subclass of this class is working similar to adecorator functionbody.A wire object is associated with a bound method.Rope is dispatching types.wirerope.rope.WireRopeis the wrapper for callables. By wrapping a
function withWireRopewith a custom subclass of thewirerope.wire.Wireclass, the wire object will be created by each function or bound method.Wireis the most important part. The given class will be instantiated and
bound to each function or bound method - which fits the concept ofinstance
cmethodof human.
For example, whenfis a free function or staticmethod, the wire also will
be a single object. Whenfis a method or property, wires will be created for
each method owner objectself. Whenfis a classmethod, wires will be
created for each method owner classcls. Yes, it will detect the owner
and bound to it regardless of the calling type.Ropeis internal dispatcher. It will be helpful when creating a complex
object for decorated callable instead of simple callable feature.See alsoSee [documentation](https://wirerope.readthedocs.io/en/latest/) - though it
is not yet written very well.Seetests/test_wire.pyfor simple example.See [methodtools](https://github.com/youknowone/methodtools) for practical
example.
Package: wires
Python Wires is a library to facilitate callable wiring by decoupling callers from callees. It can be used as a simple callable-based event notification system, as an in-process publish-subscribe like solution, or in any context where 1:N callable decoupling is appropriate.InstallationPython Wires is a pure Python package distributed viaPyPI. Install it with:$pipinstallwiresQuick StartCreate aWiresobject:fromwiresimportWiresw=Wires()Its attributes are callables, auto-created on first access, that can be wired to other callables:defsay_hello():print('Hello from wires!')w.my_callable.wire(say_hello)# Wires `w.my_callable`, auto-created, to `say_hello`.Calling such callables calls their wired callables:w.my_callable()# Prints 'Hello from wires!'More wirings can be added:defsay_welcome():print('Welcome!')w.my_callable.wire(say_welcome)# Wires `w.my_callable` to `say_welcome`, as well.w.my_callable()# Prints 'Hello from wires!' and 'Welcome!'.Wirings can also be removed:w.my_callable.unwire(say_hello)# Removes the wiring to `say_hello`.w.my_callable()# Prints 'Welcome!'w.my_callable.unwire(say_welcome)# Removes the wiring to `say_welcome`.w.my_callable()# Does nothing.To learn more about Python Wires, including passing parameters, setting wiring limits and tuning the call-time coupling behaviour, please refer to the remaining documentation athttps://python-wires.readthedocs.org/.ThanksHynek Schlawack for the articlesSharing Your Labor of Love: PyPI Quick and DirtyandTesting & Packaging.Stuart Colville for the articleIncluding parts of README.rst in your sphinx docs.AboutPython Wires was created by Tiago Montes.
Package: wireshark-remote
wireshark_remote - Initiate wireshark remote capture (SSH or AVM FRITZ!Box)This project provides thewireshark-sshandwireshark-fritzboxwrapper
scripts that simplify executing Wireshark to remotely capture network traffic.Installationwireshark_remote(and its dependencies) can be installed from PyPI with:python -m pip install wireshark_remoteIn addition the following programs need to be available an inPATH.
The corresponding packages have to be installed through your distro's package
manager.wireshark-sshrequires on the host:wiresharksshand on the remote machine (besides having an SSH server running):tcpdumpsudo (optional)wireshark-fritzboxrequires on the host:wiresharkwgetUsagewireshark-sshUsage:wireshark-ssh.py[OPTIONS]HOST[EXPRESSION]...Launcheswiresharklocallyandrunstcpdumpontheremote[USER@]HOSTviaSSH.AnoptionaltcpdumpfilterEXPRESSIONallowstoprefilterthecapturedpackets.

Options:-i,--interfaceTEXTTheinterfacetocapturefrom(defaultany).-s,--sudoRuntcpdumpviasudo.--helpShowthismessageandexit.The following example shows how to remotely capture DNS network traffic on any
interface over SSH (tcpdump is executed with sudo on the remote host):wireshark-ssh--sudo<user>@<host>port53wireshark-fritzboxUsage:wireshark-fritzbox.py[OPTIONS][HOST]LauncheswiresharklocallyandcapturesfromtheAVMFRITZ!Boxwebinterface.

Options:-i,--interfaceTEXTTheinterfacetocapturefrom(default3-0).-U,--usernameTEXT[required]-P,--passwordTEXT[required]--helpShowthismessageandexit.The following example shows how to remotely capture all network traffic on theRouting Interface(3-0) of the AVM FRITZ!Box onfritz.box:wireshark-fritzbox-U<username>-P<password>LicenseThis projected is licensed under the terms of the MIT license.