Saravanan666/pypi-org huggingface dataset:
Package: rpcompletion
rpCompletionCompletes mono-component reactions output by RetroPath2.0 with the appropriate cofactors. Creates sub-paths when multiple reaction rules are associated with a single reaction. Input is a single pathways file produced by RP2Paths. It stands on rpCache which store pre-computed data.InputRequired:rp2_pathways: (string) Path to the RetroPath2.0 pathways filerp2paths_compounds: (string) Path to the rp2paths compounds filerp2paths_pathways: (string) Path to the rp2paths pathways fileoutdir: (string) Path to the folder where result files are writtenAdvanced options:-upper_flux_bound: (integer, default=9999) Upper flux bound value-lower_flux_bound: (integer, default=0) Lower flux bound value-maxSubPaths_filter: (integer, default=10) Number of subpaths per path-pathway_id: (string, default=rp_pathway) ID of the heterologous pathway-compartment_id: (string, default=MNXC3 (i.e. cytoplasm)) Heterologous pathway compartment ID-species_group_id: (string, default=central_species) ID of the central species, i.e. not cofactors, in the heterologous reactions--store-mode, -sm: (optional, string, default: file) Store mode. If 'file', rpCache is supposed to be stored in files. Else, the rpCache is supposed to be stored in a redis database which the name is the value of this input field. The redis server is considered to be up and running.Memory managementFile modeThis is the default mode. All cache data are stored into files on disk and loaded in memory each time the tool is used. In this mode, fingerprint in memory is equal to the size of cache files loaded in memory multiplied by the number of processes which are running at the same time. Option can be specified by--store-mode file.DB modeIn order to save memory space, cache data can be loaded once in a database (redis) so that the memory space taken is equal to one instance of the cache, whatever the number of processes whic are running. Option can be specified by--store-mode <db_host>, wheredb_hostis the hostname on which redis server is running.InstallrpCompletion requiresRDKitwhich is not available through pip. It can be installed through Conda:[sudo]condainstall-crdkitrdkitFrom pip[sudo]python-mpipinstallrpcompletionFrom Conda[sudo]condainstall-cbrsynthrpcompletionRunrpCompletion processFrom Python codefromrpcompletionimportrpCompletion,build_args_parserparser=build_args_parser()args=parser.parse_args()rpcompletion=rpCompletion(db=args.store_mode)rpcompletion.rp2ToSBML(args.rp2_pathways,args.rp2paths_compounds,args.rp2paths_pathways,args.outdir)From CLIpython-mrpcompletion\rp2_pathways.csv\rp2paths_compounds.csv\rp2paths_pathways.csv\<outdir>TestTests can be runned. To do so, please follow insructions below:cd tests
./test-in-docker.shAuthorsMelchior du LacJoan HérissonAcknowledgmentsThomas DuigouLicencerpCompletion is released under the MIT licence. See the LICENCE file for details.
Package: rpconnect
Lightweight Remote Procedure Call framework.
Only two components are of importance:RpcServerA long-running server, where callables can be registered.remote_callA single-use client, to call procedures on an RpcServer.OverviewOn the server side, you can define and register callables.
These are then exposed by name:def pingpong(*args, **kwargs):
    return args, kwargs

with RpcServer(23000) as server:
    server.register(pingpong)
    server.run()On the client side, you can directly dispatch aremote_call.
This will block until a reply is available:remote_call('localhost', 23000, 'pingpong', 'hello', 'world')AboutThis is a simple RPC library, primarily for prototyping and education setups.
It uses a JSON based protocol, which protects against undesired code execution.
Any complex protocols, such as packed or pickle based data, can be implemented on top.
Package: rpc-over-redis
Remote Procedure Call over RedisThis library provides an RPC implementation over Redis.To forward a request from the client to the service for the execution of the method,Redis Streamsis used together withConsumer Groupssto distribute requests.To forward the result of the method execution from the service to the client,Redis PubSubis used with unique client and request identifiersFeaturesTransparent forwarding of arguments and return valueSupports/forces the use of Python type hintsBuilt-in consistency check client-side with the server-sideSupports multiple server-side instances at the same time, balancing via RedisZeroconf, does not require open ports, addresses, HTTP API implementation, etc. Only Redis.Uses the built-in capabilities of Redis 5.0+ to forwarding in both directionsInstallationpip install rpc-over-redisUsingFirst, you need to declare the server-side (service) app:server.pyimportosfromrpc_over_redis.coreimportRPCOverRedisServiceredis_url=os.environ['REDIS_URL']# REDIS_URL=redis://:password@redis/0# initializing server-sider=RPCOverRedisService(redis_url,'SmartEchoService')@r.registerdefecho()->None:print('echo is called')passr.run_forever()Then, you need to create a header class with empty methods.Now you can use it like a regular class. The arguments and the return value will be transparently passed through Redisimportosfromrpc_over_redis.coreimportRPCOverRedisClientclassSmartEchoService(RPCOverRedisClient):def__init__(self,conn_url:str):super().__init__(conn_url,self.__class__.__name__,strict_validate_schema=True)defecho(self)->None:...# initializing client-sideclient=SmartEchoService(os.environ['REDIS_URL'])# REDIS_URL=redis://:password@redis/0# execute remote methods as local class methods...client.echo()# none returnedMore examples seehereAdditional options// TODOLimitationsOnly built-in types that allow to be converted to json/string should be used as arguments and return values.
Package: rpcpdb
A PDB wrapper designed to be part of RPC systems for remote
introspection and debugging of RPC server stateFeaturesdebug any API function from the client sidestore a trace file from any API functionopen an interactive console into the RPC processmatch and ignore count on function breakpointsPython 2 and 3 supportAboutrpcpdb supports three main functions to support debugging of RPC contexts:a wrapper around the pdb debugger with stdio routed over a UNIX sockettracing of API functionsan interactive console available within the target RPC processIt is designed to fulfil the need to debug a function on
an already-running server which uses threads or processes
to dispatch each remote procedure call, without having to
change the source code to the server in any way. There is
no disruption to other clients and rpc calls while the
selected call is being debugged or traced.In particular, a mixin class is provided which adds a small number of
debug and trace methods to your RPC server.
These allow breakpoints to be controlled by another RPC client.For an example, run the xmlrpc_server.py server process,
then run one or more xmlrpc_client.py processes which will
continually perform RPC requests against it. xmlrpc_debug.py
can then be run to inject a debug breakpoint in a method
which the clients are continually calling; the next client
to call that function will be remotely debuggable, while
other clients carry on oblivious.An alternative example added in v0.2 is the ‘test_server.py’
which does not use RPC but runs functions in background threads.
It gives a good overview of usage in a single module without
extra dependencies.Currently the debug interface is provided via a UNIX socket,
but this will be extended in future.RPC framework support is intended to cover XMLRPC, RPyC and
Pyro in the initial stages.PlansUpdate examples, tidy up, document.Support other interfaces than termsock / UNIX socket.Support json-rpcImprove API tracing functionalityLicense informationCopyright (c) 2010-2015 Ben Bass <benbass@codedstructure.net>
All rights reserved.See the file “LICENSE” for information terms & conditions
for usage, and a DISCLAIMER OF ALL WARRANTIES.
Package: rpcplugin
rpcplugin for PythonThis is a Python library implementing therpcpluginprotocol, allowing an application written in Python to consume plugins as
a client, or allowing plugin servers to be written in Python.The rpcplugin protocol is a low-level protocol built aroundgRPC. If you're intending to write a plugin for an
application that uses this protocol, check first to see if that application
offers an application-specific Python SDK that wraps this library, so you
can avoid dealing with low-level gRPC details and Protocol Buffers definitions.
Package: rpc-reader
rpc_readerA RPC III file is a data file conforming to the RPC III file specification developed by MTS corporation. This utility reads RPC format and store the data using Numpy arrays.This reader does not have the capacity to read all variants specified in thedocumentationprovided by MTS.InstallationThis program can be installed from PyPi or from Gitlab.com# From PyPipython-mpipinstallrpc-reader# From gitlab.compython-mpipinstallgit+https://gitlab.com/t8237/rpc_reader.gitUsagePython moduleimportpathlibimportrpc_reader# Set path to filerpc_file_path=pathlib.Path('rpc_file_path.rpc')# Instantiate reader objectrpc_object=rpc_reader.ReadRPC(rpc_file_path)# Import datarpc_object.import_rpc_data_from_file()# Export data to numpy as compressed npz filerpc_object.save_npy_data_to_file()# Get headersheaders=rpc_object.get_headers()# Get channelschannels=rpc_object.get_channels()# Get measurement data as a numpy arraydata=rpc_object.get_data()Command line usageThe command line version will read the content of the rpc-file and export it as a Numpy compressed npz file.# This will export source data to path_to_file.npzrpc_readerpath_to_file.rpc# Add extra headers missing in the source data and export it to path_to_file.npzrpc_readerpath_to_file.rpc--extra-headerMY_HEADERMY_HEADER_VALUE--extra-headerENGINEER_NAMEBAT_MANVersion history0.9Bug fixes for FLOATING_POINT DATA_TYPEType hints introduced0.8Added possibility to add extra headers from command line0.7Minor cleanup of code0.6Corrected header readingAllow for reading of demultiplexed data0.5Allow for multiple data types from header DATA_TYPEContributed by: Zhang Xing Jing0.4First  public version with working basic functionalityContribution and bug reportsPlease use this issue tracker in the on gitlab.com for issues and enhancements!rpc-reader issuesContributorsNiklas MelinMichal GaluszkaZhang Xing Jing
Package: rpcsniffer
[![Build Status](https://travis-ci.org/alext234/rpc-sniffer.svg?branch=master)](https://travis-ci.org/alext234/rpc-sniffer)# rpc-sniffer
This tool captures network traffic and decode them if they contain (Ethereum) JSON RPC.
This might be useful in the following scenarios:You want to know the exact RPC requests and responses sent to and from your Ethereum node.You want to debug and understand whatweb3sends out.You want to capture the contentsweb3sends out in order to use them in a different program.# InstallationThe following assumes you already have Python virtualenv activated.
If not you may need to addsudoin front of the setup.py command and the pip command.Via thesetup.pyscript` git clonehttps://github.com/alext234/rpc-sniffercdrpc-snifferpython setup.py install `Or  viapip` pip install rpcsniffer `# Usage
TODO# LimitationsThis tool does not support encrypted SSL traffic (e.g. when you interact with an infura.io node).This tool does not support RPC traffic that spans multiple packets (development is in progress for this feature).
Package: rpc.synpase.astraea
## 西纳普斯 - synapse (Python Version)### 此为系统核心交互组件,包含了事件和RPC系统包地址> https://pypi.python.org/pypi/astraeagit:> git clone https://github.com/synapse-rpc/astraea.git synapse或者使用PIP安装：> pip install astraea初始化方法:```python#使用pip安装from synapse import Synapse#创建一个新的对象(这里有疑问,是不是应该加括号)server = Synapse()#定义事件回调server.event_callback_map = {"icarus.test": callback,"pytest.test": callback}#定义RPC服务方法server.rpc_callback_map = {"pyt.get": pyt,}#设置系统名称(相同的系统中的APP才能相互调用)server.sys_name = ""#设置应用名称(RPC调用和事件的标识)server.app_name = ""#RabbitMQ 服务器地址server.mq_host = ""#RabbitMQ 服务器端口server.mq_port = 5672#RabbitMQ 服务器用户server.mq_user = ""#RabbitMQ 服务器密码server.mq_pass =""#调试模式开关 (打开后可以看到很多LOG)server.debug = True#是否禁用RPC客户端功能 (默认可以进行RPC请求)server.disable_rpc_client = True#是否禁用发送事件的机能 (默认允许发送事件)server.disable_event_client = True#开始服务server.serve()```事件处理方法类型:```pythoncallback(params, raw)#params 为字典,客户端请求数据#raw 为RPC传输的数据包,一般情况不使用#需要返回 True表示处理完成,返回False表示处理失败```RPC服务方法类型:```pythonpyt(params, raw)#params 为字典,客户端请求数据#raw 为RPC传输的数据包,一般情况不使用#需要返回 一个key为string的字典```发送RPC请求:```python#第一个参数为要调用组件的名称#第二个参数为要调用组件的方法#第三个参数为一个key为string的字典 要发送的数据server.send_rpc("icarus","echo",{"ceshi":"我是中文","test":"from python"})```发送事件请求:```python#第一个参数为要触发的事件名称#第二个参数为 事件的相关数据 一个key为string的字典server.send_event("test",{"ceshi":"我是中文","test":"from python"})```上面发送了一个名为 app_name.test 的事件, 只需要在监听器中注册 app_name.test 即可在产生事件时被通知
Package: rpcudp
RPCUDP :RPCoverUDPin PythonRPC over UDP may seem like a silly idea, but things like theDHTKademliarequire it.  This project is specifically designed forasynchronous Python 3code to accept and send remote proceedure calls.Because of the use of UDP, you will not always know whether or not a procedure call was successfully received.  This isn't considered an exception state in the library, though you will know if a response isn't received by the server in a configurable amount of time.Installationpip install rpcudpUsageThis assumes you have a working familiarity withasyncio.First, let's make a server that accepts a remote procedure call and spin it up.importasynciofromrpcudp.protocolimportRPCProtocolclassRPCServer(RPCProtocol):# Any methods starting with "rpc_" are available to clients.defrpc_sayhi(self,sender,name):return"Hello%syou live at%s:%i"%(name,sender[0],sender[1])# You can also define a coroutineasyncdefrpc_sayhi_slowly(self,sender,name):awaitsome_awaitable()return"Hello%syou live at%s:%i"%(name,sender[0],sender[1])# start a server on UDP port 1234loop=asyncio.get_event_loop()listen=loop.create_datagram_endpoint(RPCServer,local_addr=('127.0.0.1',1234))transport,protocol=loop.run_until_complete(listen)loop.run_forever()Now, let's make a client script.  Note that we do need to specify a port for the client as well, since it needs to listen for responses to RPC calls on a UDP port.importasynciofromrpcudp.protocolimportRPCProtocolasyncdefsayhi(protocol,address):# result will be a tuple - first arg is a boolean indicating whether a response# was received, and the second argument is the response if one was received.result=awaitprotocol.sayhi(address,"Snake Plissken")print(result[1]ifresult[0]else"No response received.")# Start local UDP server to be able to handle responsesloop=asyncio.get_event_loop()listen=loop.create_datagram_endpoint(RPCProtocol,local_addr=('127.0.0.1',4567))transport,protocol=loop.run_until_complete(listen)# Call remote UDP server to say hifunc=sayhi(protocol,('127.0.0.1',1234))loop.run_until_complete(func)loop.run_forever()You can run this example in the examples folder (client.py and server.py).LoggingThis library uses the standardPython logging library.  To see debut output printed to STDOUT, for instance, use:importlogginglog=logging.getLogger('rpcudp')log.setLevel(logging.DEBUG)log.addHandler(logging.StreamHandler())Implementation DetailsThe protocol is designed to be as small and fast as possible.  Python objects are serialized usingMsgPack.  All calls must fit within 8K (generally small enough to fit in one datagram packet).
Package: rpcviaredis
rpcviaredis==========*Using redis server to build RPC environment - by Oscar LASM*----------rpcviaredis intended to provide a simple tool for establishing a pattern RPC over an installation Redis.Implement python, it is composed of:- **Server** which serve remote commands- **Client** Use to connect and call commands hosted on server- **Transport protocol** Use to pack and unpack request and response during communication process**Examples**:Server implementation:from rpcviaredis import *class DummyServer(ServerRPC):def sum(self, x, y):return Response(response=x+y, exception=None, reason=None, return_code=200)def naive_div(self, x, y):return Response(response=x/y, exception=None, reason=None, return_code=200)def multiplication(self, x, y):return Response(response=x*y, exception=None, reason=None, return_code=200)if __name__ == "__main__":import redisr = redis.StrictRedis(db=2)s = DummyServer(r, 'test-rpc', transport_klass=JSONTransport)try:s.start()except KeyboardInterrupt:passfinally:s.stop()Client Implementationimport redisfrom rpcviaredis import Clientr = redis.StrictRedis(db=2)c = Client(r, 'test-rpc', transport_klass=JsonTransport)retval = c.sum(1,2)print(retval.response) # print 3
Package: rpc-viewer
rpc_viewerA RPC III file is a data file conforming to the RPC III file specification developed by MTS corporation. This utility may be used to plot RPC data.This reader does not have the capacity to read all variants specified in thedocumentationprovided by MTS.InstallationThis program can be installed from PyPi or from Gitlab.com# From PyPipython-mpipinstallrpc-viewer# From gitlab.compython-mpipinstallgit+https://gitlab.com/t8237/rpc_viewer.gitUsagePython moduleimportpathlibfromrpc_viewer.rpc_viewerimportViewRPC# Set path to filerpc_file_path=pathlib.Path('rpc_file_path.prc')# Instantiate reader objectprc_object=ViewRPC(rpc_file_path)# Import data, example to plot channel 0prc_object.plot_channel(0)# Print channel headersprc_object.print_channel_header_data()Version history0.1Initial versionContribution and bug reportsPlease use this issue tracker in the on gitlab.com for issues and enhancements!rpc-reader issuesContributorsLukas StockmannNiklas Melin
Package: rpcx
RPCxAsynchronous RPC server/client for Python 3.8+ with streaming support.Async backend implemented byanyioproviding support forasyncioandtrio.Generic stream support for transport includes Websockets.Messages are serialized withmsgpack.importmathimportanyiofromanyio.streams.stapledimportStapledObjectStreamfromrpcximportRPCClient,RPCManager,RPCServer,Streamasyncdefadd(a:int,b:int)->int:"""Add two numbers"""returna+basyncdeffibonacci(n:int,stream:Stream)->None:"""Stream each number as computed in the Fibonacci sequence for a given starting number"""a,b=0,1foriinrange(n):awaitstream.send(i)a,b=b,a+basyncdefsum(stream:Stream)->int:"""Stream numbers from client and return the sum"""total=0asyncfornuminstream:total+=numreturntotalmanager=RPCManager()manager.register("add",add)manager.register("fibonacci",fibonacci)manager.register("sum",sum)asyncdefmain()->None:# Create two connected stapled streams to simulate a network connectionserver_send,server_receive=anyio.create_memory_object_stream[bytes](math.inf)client_send,client_receive=anyio.create_memory_object_stream[bytes](math.inf)server_stream=StapledObjectStream(client_send,server_receive)client_stream=StapledObjectStream(server_send,client_receive)server=RPCServer(server_stream,manager)asyncwithanyio.create_task_group()astask_group:task_group.start_soon(server.serve)asyncwithRPCClient(client_stream)asclient:# Simple method callassertawaitclient.request("add",1,2)==3# Streaming (server to client) exampleasyncwithclient.request_stream("fibonacci",6)asstream:asyncfornuminstream:print(num)# 1, 1, 2, 3, 5, 8# Streaming (client to server) exampleasyncwithclient.request_stream("sum")asstream:fornuminrange(10):awaitstream.send(num)assertawaitstream==45anyio.run(main)DevelopmentInstallationRunpoetry installto install the project.Execute testsExecutepoetry run toxto run tests for all python environments.Pre-commit hooksExecutepoetry run pre-commit run -ato run all linters, formatters, and checks.
Package: rpdb
rpdb - remote debugger based on pdbrpdb is a wrapper around pdb that re-routes stdin and stdout to a socket
handler. By default it opens the debugger on port 4444:import rpdb; rpdb.set_trace()But you can change that by simply instantiating Rpdb manually:import rpdb
debugger = rpdb.Rpdb(port=12345)
debugger.set_trace()It is known to work on Jython 2.5 to 2.7, Python 2.5 to 3.1. It was written
originally for Jython since this is pretty much the only way to debug it when
running it on Tomcat.Upon reachingset_trace(), your script will “hang” and the only way to get it
to continue is to access rpdb using telnet, netcat, etc..:nc 127.0.0.1 4444Installation in CPython (standard Python)pip install rpdbFor a quick, ad hoc alternative, you can copy the entire rpdb subdirectory
(the directory directly containing the __init__.py file) to somewhere on your
$PYTHONPATH.Installation in a Tomcat webappJust copy the rpdb directory (the one with the __init__.py file) in your
WEB-INF/lib/Lib folder along with the standard Jython library (required).Trigger rpdb with signalset_trace()can be triggered at any time by using the TRAP signal handler.
This allows you to debug a running process independantly of a specific failure
or breakpoint:import rpdb
rpdb.handle_trap()

# As with set_trace, you can optionally specify addr and port
rpdb.handle_trap("0.0.0.0", 54321)Callinghandle_trapwill overwrite the existing handler for SIGTRAP if one has
already been defined in your application.Known bugsThe socket is not always closed properly so you will need to ^C in netcat
and Esc+q in telnet to exit after a continue or quit.There is a bug in Jython 2.5/pdb that causes rpdb to stop on ghost
breakpoints after you continue (‘c’), this is fixed in 2.7b1.Author(s)Bertrand Janin <b@janin.com> -http://tamentis.com/With contributions from (chronological, latest first):Cameron Davidson-Pilon - @CamDavidsonPilonPavel Fux - @fuxpavelKen Manheimer - @kenmanheimerSteven Willis - @onlynoneJorge Niedbalski R <niedbalski@gmail.com>Cyprien Le Pannérer <clepannerer@edd.fr>k4ml <kamal.mustafa@gmail.com>Sean M. Collins <sean@coreitpro.com>Sean Myers <sean.myers@redhat.com>This is inspired by:http://bugs.python.org/issue721464http://snippets.dzone.com/posts/show/72480.1.6 (2015-01-05)Give access to attributes of stdin and stdout (by @fuxpavel).Add rpdb.post_mortem(), similar to pdb.post_mortem() (by @CamDavidsonPilon).0.1.5 (2014-10-16)Write addr/port to stderr instead of stdout (thanks to @onlynone).Allow for dynamic host port (thanks to @onlynone).Make q/quit do proper cleanup (@kenmanheimer)Benignly disregard repeated rpdb.set_trace() to same port as currently
active session (@kenmanheimer)Extend backwards compatibility down to Python 2.5 (@kenmanheimer)0.1.4 (2014-04-28)Expose the addr, port arguments to the set_trace method (thanks to @niedbalski).0.1.3 (2013-08-02)Remove a try/finally that seemed to shift the trace location (thanks tok4ml@github).0.1.2 (2012-01-26)Catch IOError raised by print in initialization, it may not work in some
environments (e.g. mod_wsgi). (Menno Smits)0.1.1 (2010-05-09)Initial release.
Package: rpds-py
Python bindings to theRust rpds cratefor persistent data structures.What’s here is quite minimal (in transparency, it was written initially to support replacingpyrsistentin thereferencing library).
If you see something missing (which is very likely), a PR is definitely welcome to add it.InstallationThe distribution on PyPI is namedrpds.py(equivalentlyrpds-py), and thus can be installed via e.g.:$pipinstallrpds-pyNote that if you installrpds-pyfrom source, you will need a Rust toolchain installed, as it is a build-time dependency.
An example of how to do so in aDockerfilecan be foundhere.If you believe you are on a common platform which should have wheels built (i.e. and not need to compile from source), feel free to file an issue or pull request modifying the GitHub action used here to build wheels viamaturin.UsageMethods in general are named similarly to theirrpdscounterparts (rather thanpyrsistent‘s conventions, though probably a full drop-inpyrsistent-compatible wrapper module is a good addition at some point).>>>fromrpdsimportHashTrieMap,HashTrieSet,List>>>m=HashTrieMap({"foo":"bar","baz":"quux"})>>>m.insert("spam",37)==HashTrieMap({"foo":"bar","baz":"quux","spam":37})True>>>m.remove("foo")==HashTrieMap({"baz":"quux"})True>>>s=HashTrieSet({"foo","bar","baz","quux"})>>>s.insert("spam")==HashTrieSet({"foo","bar","baz","quux","spam"})True>>>s.remove("foo")==HashTrieSet({"bar","baz","quux"})True>>>L=List([1,3,5])>>>L.push_front(-1)==List([-1,1,3,5])True>>>L.rest==List([3,5])True