Saravanan666/pypi-org huggingface dataset:
Package: zmha-py
Zm-pyA loose python wrapper around theZoneMinderAPI.
As time goes on additional functionality will be added to this API client.AcknowledgmentsNot to be confused with ZoneMinder's Pythonic wrapperpyzm,
this zm-py project (with a hyphen) is tailored for theHome Assistant ZoneMinder Integrationzm-py is based on code that was originally part ofHome Assistant.
Historical sources and authorship information is available as part of the Home Assistant project:ZoneMinder PlatformZoneMinder CameraZoneMinder SensorZoneMinder SwitchInstallationPyPIpipinstallzm-pyUsagefromzoneminder.zmimportZoneMinderSERVER_HOST="{{host}}:{{port}}"USER="{{user}}"PASS="{{pass}}"SERVER_PATH="{{path}}"zm_client=ZoneMinder(server_host=SERVER_HOST,server_path=SERVER_PATH,username=USER,password=PASS,verify_ssl=False)#Zoneminder authenticationzm_client.login()#Get all monitorsmonitors=zm_client.get_monitors()formonitorinmonitors:print(monitor)>>>Monitor(id='monitor_id',name='monitor_name',controllable='is_controllable')#Move camera downcontrollable_monitors=[mforminmonitorsifm.controllable]formonitorincontrollable_monitors:zm_client.move_monitor(monitor,"right")
Package: zmipc
zmipcDescriptionA Zero-copy Memory-sharing based IPC which intends to be handy in some cases where socket-based communications do not work well.Getting StartedThe usage of zmipc intends to be straight-forward. Here is an example:fromzmipcimportZMClientsender=ZMClient()receiver=ZMClient()sender.add_publication(topic='test')receiver.add_subscription(topic'test')sender.publish(topic='test',msg='Hello World!')print(receiver.receive(topic='test'))
Package: zmkx
zmkx-sdkzmkx.app的 Python 实现，包含一个供二次开发的库和一个简单的 CLI 客户端。安装需要 Python 3.8 以上。pip3install-Uzmkx快速上手本仓库提供了一个最简单的examples/set_image.py演示换图功能：python3examples/set_image.py你的图片.jpg命令行本仓库实现了一个命令行工具zmkx来操作设备，命令格式如下：zmkx [-s SERIAL] command ...完整命令说明请参考zmkx -h。列出设备$ zmkx list
* HelloWord HW-75 Dynamic (序列号: 34314704001A002B)
* HelloWord HW-75 Keyboard (序列号: 55895648066BFF53)监控电机状态$ zmkx knob --monitor
控制模式: 角度 | 当前角度:  23.7° | 当前速度:   -0.01 rad/s | 目标角度:  30.6° | 目标速度:    1.76 rad/s | 目标电压:   0.035 V换图$ zmkx eink --set 图片.jpg --dither相关链接zmkx.appZMK for HW-75peng-zhihui/HelloWord-Keyboard协议MIT License
Package: zmon-cli
ZMON CLICommand line client for the Zalando Monitoring solution (ZMON).InstallationRequires Python 3.4+$sudopip3install--upgradezmon-cliExampleCreating or updating a single check definition from its YAML file:$zmoncheck-definitionsupdateexamples/check-definitions/zmon-stale-active-alerts.yamlReleaseUpdate zmon_cli/__init__.py in a PR with new version and mergeApprove Release step manually in the CDP pipeline
Package: zmongo-filter
Mongo FilterPermite filtrar múltiples objetos de primer nivel de tipo Embebido y 1 de tipo RefenceField, aparir de un dict agregando como primera palabra el nombre del modelo seguido del campo de búsqueda, modeloA_campo_busqueda.Los campos de búsqueda pueden ser de tipo serializables y es capaz de reconocer valoresboolenviados comostr. Si envía el siguiente campo"active":"true"la query se ejecutara como"active":TrueParametros:principal_modelsrefence_modelsparamsModelo que contiene las referencias y embebidosModelo RefenceFielddict con keys para filtrarEjemplo:model_a:{    
    "id": 1,	    
    "name": "abc",	    
    "nid": "12323",	    
    "addres": EmbeddedDocumentField(model_b),	    
    "nid_type": ReferenceField(model_c, dbref=True)    
}model_b:[    
    {	    
        "id": 1,	    
        "name": "cll qwer",	    
        "description": ""	    
    },    
    {	    
        "id": 2,    
        "name": "cll abc",    
        "description": ""    
    }    
]model_c:{
	{
		"id": 1,
		"name": "C.C",
		"description": "
	},
	{
		"id": 2,
		"name": "C.E",
		"description": "
	}
}Parámetros de búsqueda:{    
	"id": 1,    
	"model_b_name": "cll abc",    
	"model_c_name": "C.C"    
}QuerySet :zmongo.queryset(model_a, model_c, Params)repuesta:{   
    "id": 1,	    
    "name": "",	    
    "addres": [addres[0]],	    
    "nid_type": (object)    
}InstallationIf you're running python3 on most systems, you can install the package with the following command:pip3 install zmongo-filterUsagezmongo.queryset(model_a, model_c, Params)
Package: zmon-worker
ZMON’s Python worker is doing the heavy lifting of executing tasks against entities, and evaluating all alerts assigned to check.
Tasks are picked up from Redis and the resulting check values plus alert state changes are written back to Redis.Local DevelopmentStart Redis on localhost:6379:$dockerrun-p6379:6379-itredisInstall the required development libraries:$sudoapt-getinstallbuild-essentialpython2.7-devlibpq-devlibldap2-devlibsasl2-devlibsnappy-dev$sudopip2install-rrequirements.txtStart the ZMON worker process:$python2-mzmon_worker_monitorYou can query the worker monitor via RPC:$python2-mzmon_worker_monitor.rpc_clienthttp://localhost:23500/zmon_rpclist_statsRunning Unit Tests$sudopip2install-rtest_requirements.txt$python2setup.pytestBuilding the Docker Image$dockerbuild-tzmon-worker.$dockerrun-itzmon-workerRunning the Docker imageThe Docker image supports many configuration options via environment variables.
Configuration options are explained in theZMON Documentation.
Package: zmote
Unofficial zmote.io interface=======================This module serves as a Python interface for the [zmote.io](http://zmote.io/)IoT gadget- it's basically a USB-powered, WiFI connected IR blaster.The module was written using the[zmote.io API documentation](http://www.zmote.io/apis) and tested against tworeal devices.----#### OverviewThis module supports the discovery of devices via multicast and interactingwith devices via HTTP or TCP; in all instances communication is directlywith the device (and not via the zmote.io cloud application).#### To install for use standalone/in your project<code>pip install zmote</code>##### To passively discover all devices on your network until timeout (30 seconds)<code>python -m zmote.discoverer</code>##### To actively discover two devices on your local network<code>python -m zmote.discoverer -l 2 -a</code>##### To passively discover a particular device on your local network (e.g. in case of DHCP)<code>python -m zmote.discoverer -u CI001f1234</code>##### To put a device into learn mode via TCP<code>python -m zmote.connector -t tcp -d 192.168.1.1 -c learn</code>##### To tell a device to send an IR signal via HTTP<code>python -m zmote.connector -t http -d 192.168.1.1 -c send -p 1:1,0,36000,1,1,32,32,64,32,32,64,32,3264</code>### To install for further developmentPrerequisites:* [virtualenvwrapper](https://virtualenvwrapper.readthedocs.io/en/latest/])#### Clone the repo<code>git clone https://github.com/initialed85/zmotecd zmote</code>#### Build the virtualenv<code>mkvirtualenv zmotepip install -r requirements-dev.txt</code>#### Run the tests<code>py.test -v</code>
Package: zm-py
Zm-pyA loose python wrapper around theZoneMinderAPI.
As time goes on additional functionality will be added to this API client.AcknowledgmentsNot to be confused with ZoneMinder's Pythonic wrapperpyzm,
this zm-py project (with a hyphen) is tailored for theHome Assistant ZoneMinder Integrationzm-py is based on code that was originally part ofHome Assistant.
Historical sources and authorship information is available as part of the Home Assistant project:ZoneMinder PlatformZoneMinder CameraZoneMinder SensorZoneMinder SwitchInstallationPyPIpipinstallzm-pyUsagefromzoneminder.zmimportZoneMinderSERVER_HOST="{{host}}:{{port}}"USER="{{user}}"PASS="{{pass}}"SERVER_PATH="{{path}}"zm_client=ZoneMinder(server_host=SERVER_HOST,server_path=SERVER_PATH,username=USER,password=PASS,verify_ssl=False)# Zoneminder authenticationzm_client.login()# Get all monitorsmonitors=zm_client.get_monitors()formonitorinmonitors:print(monitor)>>>Monitor(id='monitor_id',name='monitor_name',controllable='is_controllable')# Move camera downcontrollable_monitors=[mforminmonitorsifm.controllable]formonitorincontrollable_monitors:zm_client.move_monitor(monitor,"right")
Package: zmqbus
A bus implementation for Python using ZeroMQzmqbusis package for Python that allows for communication between
collaborative processes in a bus fashion on the same machine. The bus
allows connected parties to subscribe and publish messages, with the
ability to direct messages to specific connections. It also supports
request/response messages for remote procedure calls (RPC), where
connections can send request and receive responses from well-known
addresses registered in the bus.IMPORTANT:zmqbusis still beta software. Use in production is
strongly discouraged.RequirementsPython 3.7 or abovepyzmqInstallationYou can installzmqbususing pip:pip install zmqbusUsageSeedemo.pyfor usage examples.LicenseSee theLICENSE.txt filefor details.Bug? Critics? Suggestions?Go tohttps://github.com/flaviovs/zmqbus
Package: zmqcs
zmqcszmqcsis apython package that implements a client server infrastructure based on the zeromq library. To do so it fixes some properties:There are 2 types of concurrent communications:Request - response: Used to send commands from the client to the server. Server always answer when the command has finished. Is up to the developer to let the answer return before ending the comand in case the command is takes long to execute.Pub - Sub: The server has the ability to send packages to the client with data. The client has to subscribe to the topics he wants to receive data and define a callback to be executed every time data is received for that topicA full detailed example on how to use the library can be found athttps://github.com/IFAEControl/zmqCSExampleAll the packages are JSON formatted.
Package: zmqdecorators
Decorators for pyZMQ to make it almost as easy to use a DBUS (requires Bonjour for discovery magic)Forked from <https://github.com/HelsinkiHacklab/reactor>## Requirementssudo apt-get install python python-pip python-zmq python-tornado libavahi-compat-libdnssd1
sudo pip install pybonjour || sudo pip install –allow-external pybonjour –allow-unverified pybonjour pybonjourThough pybonjour will be installed by pip automagically if you install this package with pip.Remember to enable global site packages for the ZMQ bindings if using virtualenv.Pro tip for thos wishing to work on the code <http://guide.python-distribute.org/pip.html#installing-from-a-vcs> (short version checkout thenpip install -e ./)
Package: zmqfan
# Helper Code for ZMQ UsagePrimary purpose is shuffling around JSON.## zmqsubThis module is for decoding & encoding JSON and receiving & sending it over sockets.It’s a little bit dodgy at the moment, needs some shine & polish.Particularly, it needs better error handling and a more flexible API. Not yet 1.0, so the API could change. If you need stability, use a git commit id or an exact version number in PyPI.### zmqsub unit testscd zmqfan
nosetests -vv tests/
Package: zmqflp
zmqflpImprovements to the Freelance protocol-based zeromq server/client (Python)
The client and server talk using cbor2, so the api accepts dictionaries as input.To create a zmqflp server:# create the server object (it runs in an asyncio zmq context)self.server=zmqflp_server.ZMQFLPServer(self.config.identity,self.config.zmq_port)# use the following code to process messages received by the server and send them backasyncdefprocess_messages(self):(serialized_request,orig_headers)=awaitself.server.receive()ifserialized_request=='EXIT':awaitself.server.send(orig_headers,'exiting')returnFalseelifserialized_request!="PING":try:request=serialized_requestresponse=self.process_request(request)awaitself.server.send(orig_headers,response)returnTrueexceptExceptionase:logging.exception(e)returnFalsereturnTrueTo create a client without using a context manager:# create the client object (this does NOT run in an asyncio context)self.client=zmqflp_client.ZMQFLPClient(self.config.list_of_servers)# to send and receive with the clientmsg_to_send={'message':'hello!','other-key':'stuff goes here'}status=self.client.send_and_receive(msg_to_send)To create a client using a context manager (for example, to run on AWS Lambda):# create the client object (this does NOT run in an asyncio context)withzmqflp_client.ZMQFLPClient(self.config.list_of_servers)asclient:# to send and receive with the clientmsg_to_send={'message':'hello!','other-key':'stuff goes here'}status=client.send_and_receive(msg_to_send)
Package: zmq_legos
A collection of usefull zeromq legos. Building blocks for larger applications.MPDAsyncio implementation using zeromq of the [Majordomo Protocol](https://rfc.zeromq.org/spec:7/MDP/).Currently on my laptop can serve around 4K msg/secondWith a few tweeks:can control eager scheduling of messages to workers (useful for messages that take unequal time)READY additionally returns json dict of worker configuration
Package: zmq-message-patterns
Library to quickly build ZeroMQ based Python applications.IntroductionLibrary to make writing applications usingZeroMQmessage patterns throughPyZMQeasier.TODO: explainZMessageandZNodeclasses.PipelineA ventilator sends jobs to multiple worker processes, which send the results to a sink.Channels:ventilator -> worker: jobs for the workersventilator -> sink: IDs of jobs sent to workers, so sink knows if all jobs have completedworker -> sink: resultssink -> worker: sink sends shutdown command, when finishedDiagram:ventilator-------------+
          |                  |
  +-------+------+           |
  |       |      |           |
worker worker worker  ...    |
  ||      ||    ||           |
  ++------++----++           |
          ||                 |
         sink----------------+An is a fully functional example in the examples directory (examples/pipeline_example.py).
Package: zmqnumpy
Zmqnumpy module implements a series of functions used to exchange
numpy ndarrays between U{zeromq<http://www.zeromq.org>} sockets.
Serializtion of numpy arrays happens using the numpy.ndarray.tostring method
which preserves portability to standard C binary format,
enabling data exchange with different programming languages.
A very simple protocol is defined in order to exchange array data, the
multipart messages will be composed of:identifier string namethe numpy array element type (dtype) in its string representationnumpy array shape encoded as a binary numpy.int32 arraythe array data encoded as string using numpy.ndarray.tostring()This protocol guarantees that numpy array can be carried around and
recostructed uniquely without errors on both ends of a connected pair enabling
an efficient interchange of data between processes and nodes.@author: Marco Bartolini
@contact:marco.bartolini@gmail.com@version: 0.1
Package: zmq-ops
1. 简介zmq_ops是Avatar训练框架依赖的一个组件，通过把它集成到tensorflow中，可以使得tensorflow支持在线实时学习和训练。它的主要功能包括：符合tensorflow io接口标准，能够和tensorflow集成在一起提供单向数据传输的PUSH-PULL模式，也支持双向数据传输的REQ-ROUTER模式2. 安装2.1 安装依赖condainstallzeromq
condainstalltensorflow2.2 从源码安装# 编译前要设置conda环境路径exportCONDA_ENV_PATH=/path/to/conda/envcdzmq_ops
pythonsetup.pyinstall2.3 二进制安装pipinstallzmq-ops3. 使用3.1 ZmqReaderzmq reader主要提供ZMQ中的PUSH-PULL模式中的PULL端，它提供了3个OP：zmq_reader_init(end_point, hwm)：初始化zmq readerzmq_reader_next(resource, types, shapes)：读取下一组数据zmq_reader_readable(resource)：判断zmq reader是否可读3.2 ZmqServerzmq server主要提供ZMQ中的REQ-ROUTER模式中的ROUTER端，它提供了3个OPzmq_server_init(end_point, hwm)：初始化zmq serverzmq_server_recv_all(resource, types, shapes, min_cnt, max_cnt)：尽量从zmq server多读取数据，最少min_cnt条数据，最多max_cnt条数据，并把数据组成一个batch返回，返回client_id和tensorszmq_server_send_all(resource, client_id, tensors)：把tensors按照client_id发送给不同的客户端具体使用案例可以参考zmq_reader_test.py和zmq_server_test.py文件
Package: zmqpubsub
# zmqpubsubdemoPython publisher & subscriber to send JSON payloads over ZMQ.## Installation
1. Install pip3
-sudo apt-get update-sudo apt-get -y install python3-pip2. Install pyzmq
-sudo pip3 install pyzmq### Create a Publisher:
-zmqpubsub.Publisher(ip=’x.x.x.x’, port=’yyyy’)### Create a Subscriber
-zmqpubsub.Subscriber(ip=’x.x.x.x’, port=’yyyy’)Change Log0.0.1 (05/05/2022)First Release0.0.2 (20/07/2022)Added the unsubscribe option.0.0.3 (20/07/2022)Implemented try catch statement0.0.8 (21/10/2022)fixed an issue such that it is possible now to subscribe to many topics on the same subscriber.
Package: zmq_rpc
zmq_rpc0mq RPC calls implemented with pyzmq; part of thezmq_rpcproject.InstallingInstall from pip:$ pip install zmq_rpcPlaying aroundRun the demo server:python zmq_rpc/server.pyRun the demo client:python zmq_rpc/client.pyWatch them talk! =)ContributorsIn order of appearance in the project:Houzéfa Abbasbhay, <houzefa.abba@xcg-consulting.fr>Jérémie Gavrel, <jeremie.gavrel@xcg-consulting.fr>Changelog1.0.1Update the demo server so our demo actually works.Doc updates.0.4Packaging tweaks following pypi changes (no multiple source packs).0.3Fix imports.Dependencies: Move tomsgpackinstead ofmsgpack-python.0.2Take logging set-up out of the lib itself.0.1Initial version.
Package: zmqTools
python使用MessageQueue技術進行跨平台跨程序間的訊息傳遞,
這裡我們主要時使zmq將Client的金融交易資料傳遞至Server端,
並由Server端與券商API串接進行交易.在Client端的Package我們使用的類型為dealer模式建置,
但Server端接收時則使用Router的非同步模式,
以利訊息可以順利接收而必免堵塞.
Package: zmsai
A command line utility for topic discovery and doc-linking within the Zettelkasten using AI approaches.InstallationInstallzmsaiby executing the following command-$pip3installzmsaiTest RunTest run using dummy docs (see./custom)$zmsaitestUsageTo learnntopics in your Zettelkasten at/path/to/your/zettelkasten/-$zmsairun-tn-p"/path/to/your/zettelkasten/"This will create a metadata filemeta.zmsstoring all the distributions exhibited by the documents in your Zettelkasten.[Runningthemodel]itmaytakeawhile.Hangtight![Datastored]...kbYou can delete your metadata file by executing-$zmsaideleteThese learnt distributions can be printed usingzmsai display. You can pass an additional argument-w, the number of top most occuring words that you want to print from the distributions involing words.To display doc-topic distribution-$zmsaidisplay-ddtTo display topic-word distribution-$zmsaidisplay-wn-dtwTo display doc-word distribution-$zmsaidisplay-wn-ddwTo display vocabulary-$zmsaidisplay-wn-dvocTo display all distributions at once-$zmsaidisplay-wn-dallor simply$zmsaidisplayThis will take default value of 5 fornwordsargument.TroubleshootingIf you getModuleNotFoundError: No module named 'sklearn'error withdisplay, try installingscikit-learnmanually.$sudopip3install-Uscikit-learnAlternatively, if you're on ubuntu, try executing the following command-$zmsaifix-ubuntuFeel free to raise an issue if you feel stuck.Manualusage:zmsai[-h][--path[PATH]][--topics[TOPICS]][--nwords[NWORDS]][--distro[DISTRO]][task]positionalarguments:taskProvidetasktoperform[default:'run'][values:'run','delete','display','man','test','fix-ubuntu']optionalarguments:-h,--helpshowthishelpmessageandexit--path[PATH],-p[PATH]Providedirectoryoftextfiles.[with:'run'][default:'./custom']--topics[TOPICS],-t[TOPICS]Howmanytopicsdoyouexpect?[with:'run'][default:'number of docs']--nwords[NWORDS],-w[NWORDS]Howmanywordspertopic/docdoyouwanttodisplay?[with:'display'][default:5]--distro[DISTRO],-d[DISTRO]Whatdistributionsdoyouwanttodisplay?[with:'display'][default:all][values:'dt','tw','dw','voc','all']Dependency Graphattrs==20.2.0-pytest==6.1.1[requires:attrs>=17.4.0]iniconfig==1.1.1-pytest==6.1.1[requires:iniconfig]joblib==0.17.0-scikit-learn==0.23.2[requires:joblib>=0.11]-sklearn==0.0[requires:scikit-learn]numpy==1.19.2-scikit-learn==0.23.2[requires:numpy>=1.13.3]-sklearn==0.0[requires:scikit-learn]-scipy==1.5.3[requires:numpy>=1.14.5]-scikit-learn==0.23.2[requires:scipy>=0.19.1]-sklearn==0.0[requires:scikit-learn]pip==20.1.1pluggy==0.13.1-pytest==6.1.1[requires:pluggy>=0.12,<1.0]py==1.9.0-pytest==6.1.1[requires:py>=1.8.2]pyparsing==2.4.7-packaging==20.4[requires:pyparsing>=2.0.2]-pytest==6.1.1[requires:packaging]setuptools==46.4.0six==1.15.0-packaging==20.4[requires:six]-pytest==6.1.1[requires:packaging]threadpoolctl==2.1.0-scikit-learn==0.23.2[requires:threadpoolctl>=2.0.0]-sklearn==0.0[requires:scikit-learn]toml==0.10.1-pytest==6.1.1[requires:toml]wheel==0.34.2ContributionAre welcome.LicenseGNU General Public License v3 (GPLv3)
Package: zmsgcentre
消息中心, 避免代码的强耦合性, 支持多线程zmsgcentre是什么zmsgcentre是一个消息中心, 整个程序所有的模块和函数引用都不需要直接调用了, 而是通过消息中心进行转发, 极大的降低代码耦合性为什么需要降低代码耦合性在开发大型程序的时候难免会出现代码的强耦合性, 这是一个危险的设计, 假设你在维护你的程序时, 将某个函数名或参数改变了, 那么所有调用这个函数的代码都必须同时更改, 如果是少数则改代码很简单.Q: 如果是几十个甚至上百上千个地方引用了这个函数怎么办?A: 你告诉我你时间多没关系慢慢改.Q: 万一忘记了一两处没改怎么办?A: ctrl+f全局替换就行了.Q: 如果你的函数名是多用的呢, 如: 函数名为'AA', 或者某个函数名为'AAX', 某一处字符串为'AABC', 你还能淡定么?A: 正则表达式替换...Q: 新的函数名或参数是否会和其他函数产生冲突, 你的任何一处代码更改, 需花费10倍以上的时间来评估整个程序的健壮性, 更改后多个模块之间是否会冲突, 出现隐藏bug如何调试A: emmmmm.....如何使用zmsgcentre使用zmsgcentre你需要明白sender角色, receiver角色以及msg_tagsender可以理解为一个广播电台.msg_tag就是广播电台的频率receiver就是接收电台消息的接收器它有什么优点一次发送广播可以被多个接收器接收.线程安全.支持标签级别线程锁.允许在接收器回调函数中创建和销毁接收器, 销毁消息标签.理解简单, 无需消息订阅系统那么复杂的创建topic和消费者观念.使用方便, 发送者和接受器只需要一行代码定义, 不影响代码阅读性, 让代码逻辑更简单代码开源, 精简, 整个模块只有3.5kb.一个简单的实例importzmsgcentre# 导入zmsgcentre模块defreceiver_func(a):print(a)zmsgcentre.create_receiver('test_tag',receiver_func)# 创建一个接收器, 接收消息标签为'test_tag'的内容zmsgcentre.send('test_tag','广播数据')# 发送广播到'test_tag'多模块实例manager.pyimportzmsgcentreimporttest_Aimporttest_Bdefsend(data):returnzmsgcentre.send('test_tag',data)#发送广播到'test_tag'if__name__=='__main__':result=send('主模块发送来的消息')print(result)# send返回一个列表, 这个列表包含所有接收器的返回值(无序), 无接收器返回一个空列表test_A.pyimportzmsgcentredefreceiver_func_a(data):print(data)return'test_A已收到'zmsgcentre.create_receiver('test_tag',receiver_func_a)# 创建接收器, 指定消息标签, 绑定回调函数test_B.pyimportzmsgcentredefreceiver_func_b(data):print(data)return'test_B已收到'zmsgcentre.create_receiver('test_tag',receiver_func_b)# 创建接收器, 指定消息标签, 绑定回调函数使用装饰器简化代码manager.pyimportzmsgcentreimporttest_Aimporttest_B@zmsgcentre.sender('test_tag')# 创建广播器, 指定广播的消息标签, 绑定广播入口为send函数defsend(data):pass# 无需任何代码, 写了也不会执行这里的代码, 因为没必要.if__name__=='__main__':result=send('主模块发送来的消息')print(result)test_A.pyimportzmsgcentre@zmsgcentre.receiver('test_tag')# 创建接收器, 指定消息标签, 绑定回调函数defreceiver_func_a(data):print(data)return'test_A已收到'test_B.pyimportzmsgcentre@zmsgcentre.receiver('test_tag')# 创建接收器, 指定消息标签, 绑定回调函数defreceiver_func_b(data):print(data)return'test_B已收到'注: 即使使用了装饰器定义了一个接收器, 仍然可以主动调用它, 如上可以不通过消息中心直接调用receiver_func_b接收器优先级importzmsgcentre# priority表示优先级, 你可以简单理解为接收器到广播器的距离, 数字越小越先收到消息, 数字相等的接收器收到消息顺序随机@zmsgcentre.receiver('test_tag',priority=999)defreceiver_func(a):print(a)更新日志发布时间发布版本发布说明19-01-292.0.1发送器新增一个参数stop_send_flag, 如果有一个接收器返回这个标记则停止发送(内部使用is判断)并且返回True19-01-102.0.0新增了接收器优先级优化了接收器函数中创建和销毁接收器的逻辑, 用户不需要再去判断是否强制使用线程来创建销毁接收器优化了多线程安全更改了所有函数名18-10-051.0.3这是v1版本的最后一版, 将不再更新, 请使用最新版本本项目仅供所有人学习交流使用, 禁止用于商业用途
Package: zmux
zmuxA tmux parameterizerZmux provides a simple way to parameterize commands across several tmux panes. A simple example:$ zmux launch "ls {directory}"
Supply up to 6 values for directory: ., zmux

💅 Creating tmux layout

🚀 Sending command to pane 1/2
🚀 Sending command to pane 2/2% ls .
LICENSE         setup.py        zmux
README.md       tests           zmux.egg-info

______________________________________________________

% ls zmux
__init__.py     __main__.py     __pycache__     cli.pyInstallationInstallation usingpipxis recommended:pipx install zmuxOr usingpip:pip install zmuxUsageFor help, run:zmux --helpYou can also use:python -m zmux --helpDevelopmentTo contribute to this tool, first checkout the code. Then create a new virtual environment:cd zmux
python -m venv venv
source venv/bin/activateNow install the dependencies and test dependencies:pip install -e '.[test]'To run the tests:pytest