sdkagent

pyzmq API reference

143 public APIs from pyzmq (zeromq/pyzmq) — 49 classes, 28 functions, 66 methods. Signatures extracted by static analysis of the actual source.

Repository: zeromq/pyzmq

KindCount
Classes49
Functions28
Methods66

API list

funcbuildutils.constants.promoted_constants()
Generate CONST: int for mypy
funcperf.perf.do_run(test, **kwargs)
Do a single run
funcperf.perf.latency(url, count, size, poll=False, copy=True, quiet=False)
Perform a latency test
classzmq.asyncio.Context
Context for creating asyncio-compatible Sockets
classzmq.asyncio.Poller
Poller returning asyncio.Future for poll results.
classzmq.asyncio.Socket
Socket returning asyncio Futures for send/recv/poll methods.
classzmq.asyncio.ZMQEventLoop
DEPRECATED: AsyncIO eventloop using zmq_poll.
funczmq.asyncio.install()
DEPRECATED: No longer needed in pyzmq 17
classzmq.auth.asyncio.AsyncioAuthenticator
ZAP authentication for use in the asyncio IO loop
methodzmq.auth.asyncio.AsyncioAuthenticator.start() -> None
Start ZAP authentication
methodzmq.auth.asyncio.AsyncioAuthenticator.stop() -> None
Stop ZAP authentication
classzmq.auth.base.Authenticator
Implementation of ZAP authentication for zmq connections.
methodzmq.auth.base.Authenticator.allow(*addresses:str) -> None
Allow IP address(es).
methodzmq.auth.base.Authenticator.configure_curve(domain:str='*', location:Union[str, os.PathLike]='.') -> None
Configure CURVE authentication for a given domain.
methodzmq.auth.base.Authenticator.configure_curve_callback(domain:str='*', credentials_provider:Any=None) -> None
Configure CURVE authentication for a given domain.
methodzmq.auth.base.Authenticator.configure_plain(domain:str='*', passwords:Optional[dict[str, str]]=None) -> None
Configure PLAIN authentication for a given domain.
methodzmq.auth.base.Authenticator.deny(*addresses:str) -> None
Deny IP address(es).
methodzmq.auth.base.Authenticator.handle_zap_message(msg:list[bytes])
Perform ZAP authentication
methodzmq.auth.base.Authenticator.start() -> None
Create and bind the ZAP socket
methodzmq.auth.base.Authenticator.stop() -> None
Close the ZAP socket
funczmq.auth.certs.create_certificates(key_dir:Union[str, os.PathLike], name:str, metadata:Optional[dict[str, str]]=None) -> tuple[str, str]
Create zmq certificates.
funczmq.auth.certs.load_certificate(filename:Union[str, os.PathLike]) -> tuple[bytes, Optional[bytes]]
Load public and secret key from a zmq certificate.
funczmq.auth.certs.load_certificates(directory:Union[str, os.PathLike]='.') -> dict[bytes, bool]
Load public keys from all certificates in a directory
classzmq.auth.ioloop.IOLoopAuthenticator
ZAP authentication for use in the tornado IOLoop
classzmq.auth.thread.ThreadAuthenticator
Run ZAP authentication in a background thread
methodzmq.auth.thread.ThreadAuthenticator.is_alive() -> bool
Is the ZAP thread currently running?
methodzmq.auth.thread.ThreadAuthenticator.start() -> None
Start the authentication thread
methodzmq.auth.thread.ThreadAuthenticator.stop() -> None
Stop the authentication thread
methodzmq.backend.cffi.context.Context.get(option)
get context option see zmq_ctx_get
methodzmq.backend.cffi.context.Context.set(option, value)
set a context option see zmq_ctx_set
methodzmq.backend.cffi.message.Frame.fast_copy()
Fast shallow copy of the Frame.
funczmq.backend.cffi.utils.has(capability)
Check for zmq capability by name (e.g.
funczmq.backend.cffi.zmq_version_info()
Get libzmq version as tuple of ints
classzmq.backend.cython._zmq.Context
Manage the lifecycle of a 0MQ context.
methodzmq.backend.cython._zmq.Context.get(option:C.int)
Get the value of a context option.
methodzmq.backend.cython._zmq.Context.set(option:C.int, optval)
Set a context option.
methodzmq.backend.cython._zmq.Context.term()
Close or terminate the context.
methodzmq.backend.cython._zmq.Frame.buffer()
A memoryview of the message contents.
methodzmq.backend.cython._zmq.Frame.get(option)
Get a Frame option or property.
methodzmq.backend.cython._zmq.Frame.set(option, value)
Set a Frame option.
classzmq.backend.cython._zmq.Socket
A 0MQ socket.
methodzmq.backend.cython._zmq.Socket.bind(addr:str | bytes)
Bind the socket to an address.
methodzmq.backend.cython._zmq.Socket.close(linger:int | None=None)
Close the socket.
methodzmq.backend.cython._zmq.Socket.closed()
Whether the socket is closed
methodzmq.backend.cython._zmq.Socket.connect(addr:str | bytes) -> None
Connect to a remote 0MQ socket.
methodzmq.backend.cython._zmq.Socket.get(option:C.int)
Get the value of a socket option.
methodzmq.backend.cython._zmq.Socket.join(group:str | bytes)
Join a RADIO-DISH group Only for DISH sockets.
methodzmq.backend.cython._zmq.Socket.monitor(addr:str | bytes | None, events:C.int=ZMQ_EVENT_ALL)
Start publishing socket events on inproc.
methodzmq.backend.cython._zmq.Socket.recv(flags=0, copy:bint=True, track:bint=False)
Receive a message.
methodzmq.backend.cython._zmq.Socket.set(option:C.int, optval)
Set socket options.
methodzmq.backend.cython._zmq.Socket.unbind(addr:str | bytes)
Unbind from an address (undoes a call to bind).
funczmq.backend.cython._zmq.free_python_msg(data:p_void, vhint:p_void) -> C.int
A pure-C function for DECREF'ing Python-owned message data.
funczmq.backend.cython._zmq.has(capability:str) -> bool
Check for zmq capability by name (e.g.
funczmq.backend.cython._zmq.monitored_queue(in_socket:Socket, out_socket:Socket, mon_socket:Socket, in_prefix:bytes=b'in', out_prefix:bytes=b'out')
Start a monitored queue device.
funczmq.backend.cython._zmq.strerror(errno:C.int) -> str
Return the error string given the error number.
funczmq.backend.cython._zmq.zmq_errno() -> C.int
Return the integer errno of the most recent zmq error.
funczmq.backend.select.select_backend(name:str) -> dict
Select the pyzmq backend
classzmq.constants.ContextOption
Options for Context.get/set ..
classzmq.constants.DeviceType
Device type constants for zmq.device ..
classzmq.constants.Errno
libzmq error codes ..
classzmq.constants.Event
Socket monitoring events ..
classzmq.constants.Flag
Send/recv flags ..
classzmq.constants.MessageOption
Options on zmq.Frame objects ..
classzmq.constants.NormMode
Values for zmq.NORM_MODE socket option ..
classzmq.constants.PollEvent
Which events to poll for in poll methods ..
classzmq.constants.ReconnectStop
Select behavior for socket.reconnect_stop ..
classzmq.constants.RouterNotify
Values for zmq.ROUTER_NOTIFY socket option ..
classzmq.constants.SocketOption
Options for Socket.get/set ..
classzmq.constants.SocketType
zmq socket types ..
funczmq.decorators.socket(*args, **kwargs)
Decorator for adding a socket to a function.
classzmq.devices.basedevice.Device
A 0MQ Device to be run in the background.
methodzmq.devices.basedevice.Device.bind_in(addr:str) -> None
Enqueue ZMQ address for binding on in_socket.
methodzmq.devices.basedevice.Device.bind_out(addr:str) -> None
Enqueue ZMQ address for binding on out_socket.
methodzmq.devices.basedevice.Device.connect_in(addr:str) -> None
Enqueue ZMQ address for connecting on in_socket.
methodzmq.devices.basedevice.Device.connect_out(addr:str)
Enqueue ZMQ address for connecting on out_socket.
methodzmq.devices.basedevice.Device.join(timeout:Optional[float]=None) -> None
wait for me to finish, like Thread.join.
methodzmq.devices.basedevice.Device.run() -> None
wrap run_device in try/catch ETERM
methodzmq.devices.basedevice.Device.run_device() -> None
The runner method.
methodzmq.devices.basedevice.Device.start() -> None
Start the device.
classzmq.devices.basedevice.ProcessDevice
A Device that will be run in a background Process.
classzmq.devices.basedevice.ThreadDevice
A Device that will be run in a background Thread.
classzmq.devices.monitoredqueuedevice.MonitoredQueue
Class for running monitored_queue in the background.
classzmq.devices.monitoredqueuedevice.MonitoredQueueBase
Base class for overriding methods.
classzmq.devices.monitoredqueuedevice.ProcessMonitoredQueue
Run zmq.monitored_queue in a separate process.
classzmq.devices.monitoredqueuedevice.ThreadMonitoredQueue
Run zmq.monitored_queue in a background thread.
classzmq.devices.proxydevice.ProcessProxy
Proxy in a Process.
classzmq.devices.proxydevice.Proxy
Threadsafe Proxy object.
classzmq.devices.proxydevice.ProxyBase
Base class for overriding methods.
classzmq.devices.proxydevice.ThreadProxy
Proxy in a Thread.
classzmq.devices.proxysteerabledevice.ProcessProxySteerable
ProxySteerable in a Process.
classzmq.devices.proxysteerabledevice.ProxySteerable
Class for running a steerable proxy in the background.
classzmq.devices.proxysteerabledevice.ProxySteerableBase
Base class for overriding methods.
classzmq.devices.proxysteerabledevice.ThreadProxySteerable
ProxySteerable in a Thread.
classzmq.error.Again
Wrapper for zmq.EAGAIN ..
classzmq.error.ContextTerminated
Wrapper for zmq.ETERM ..
classzmq.error.DraftFDWarning
Warning for using experimental FD on draft sockets.
classzmq.error.ZMQBaseError
Base exception class for 0MQ errors in Python.
classzmq.error.ZMQBindError
An error for ``Socket.bind_to_random_port()``.
classzmq.error.ZMQError
Wrap an errno style error.
classzmq.eventloop._deprecated.DelayedCallback
Schedules the given callback to be called once.
methodzmq.eventloop._deprecated.DelayedCallback.start()
Starts the timer.
classzmq.eventloop._deprecated.ZMQPoller
A poller that can be used in the tornado IOLoop.
methodzmq.log.handlers.TopicLogger.log(level, topic, msg, *args, **kwargs)
Log 'msg % args' with level and topic.
methodzmq.sugar.context.Context.getsockopt(opt:int) -> OptValT
get default socket options for new sockets created by this Context ..
methodzmq.sugar.context.Context.instance(io_threads:int=1) -> _ContextType
Returns a global Context instance.
methodzmq.sugar.context.Context.setsockopt(opt:int, value:Any) -> None
set default socket options for new sockets created by this Context ..
methodzmq.sugar.context.Context.socket(socket_type:int, socket_class:Callable[[_ContextType, int], _SocketType] | None=None, **kwargs:Any) -> _SocketType
Create a Socket associated with this Context.
methodzmq.sugar.context.Context.term() -> None
Close or terminate the context.
funczmq.sugar.device(device_type:DeviceType, frontend:socket.Socket, backend:socket.Socket)
Deprecated alias for zmq.proxy ..
methodzmq.sugar.frame.Frame.group()
The RADIO-DISH group of the message.
classzmq.sugar.poll.Poller
A stateful poll interface that mirrors Python's built-in poll.
methodzmq.sugar.poll.Poller.poll(timeout:int | None=None) -> list[tuple[Any, int]]
Poll the registered 0MQ or native fds for I/O.
methodzmq.sugar.poll.Poller.unregister(socket:Any)
Remove a 0MQ socket or native fd for I/O monitoring.
methodzmq.sugar.socket.Socket.bind(addr:str) -> _SocketContext[_SocketType]
s.bind(addr) Bind the socket to an address.
methodzmq.sugar.socket.Socket.bind_to_random_port(addr:str, min_port:int=49152, max_port:int=65536, max_tries:int=100) -> int
Bind this socket to a random port in a range.
methodzmq.sugar.socket.Socket.close(linger=None) -> None
Close the socket.
methodzmq.sugar.socket.Socket.connect(addr:str) -> _SocketContext[_SocketType]
s.connect(addr) Connect to a remote 0MQ socket.
methodzmq.sugar.socket.Socket.fileno() -> int
Return edge-triggered file descriptor for this socket.
methodzmq.sugar.socket.Socket.get_hwm() -> int
Get the High Water Mark.
methodzmq.sugar.socket.Socket.get_string(option:int, encoding='utf-8') -> str
Get the value of a socket option.
methodzmq.sugar.socket.Socket.poll(timeout:int | None=None, flags:int=zmq.POLLIN) -> int
Poll the socket for events.
methodzmq.sugar.socket.Socket.recv_json(flags:int=0, **kwargs) -> _JSONType
Receive a Python object as a message using json to serialize.
methodzmq.sugar.socket.Socket.recv_pyobj(flags:int=0) -> Any
Receive a Python object as a message using UNSAFE pickle to serialize.
methodzmq.sugar.socket.Socket.recv_string(flags:int=0, encoding:str='utf-8') -> str
Receive a unicode string, as sent by send_string.
methodzmq.sugar.socket.Socket.send_json(obj:Any, flags:int=0, **kwargs) -> None
Send a Python object as a message using json to serialize.
methodzmq.sugar.socket.Socket.set_hwm(value:int) -> None
Set the High Water Mark.
methodzmq.sugar.socket.Socket.set_string(option:int, optval:str, encoding='utf-8') -> None
Set socket options with a unicode object.
methodzmq.sugar.socket.Socket.subscribe(topic:str | bytes) -> None
Subscribe to a topic Only for SUB sockets.
methodzmq.sugar.socket.Socket.unsubscribe(topic:str | bytes) -> None
Unsubscribe from a topic Only for SUB sockets.
classzmq.sugar.tracker.MessageTracker
A class for tracking if 0MQ is done using one or more messages.
funczmq.sugar.version.pyzmq_version() -> str
return the version of pyzmq as a string
funczmq.sugar.version.zmq_version() -> str
return the version of libzmq as a string
classzmq.utils.garbage.GarbageCollectorThread
Thread in which garbage collection actually happens.
funczmq.utils.jsonapi.dumps(o:object, **kwargs:Any) -> bytes
Serialize object to JSON bytes (utf-8).
funczmq.utils.jsonapi.loads(s:bytes | str, **kwargs:Any) -> dict[str, Any] | list[Any] | str | float
Load object from JSON bytes (utf-8).
funczmq.utils.monitor.parse_monitor_message(msg:list[bytes]) -> _MonitorMessage
decode zmq_monitor event messages.
funczmq.utils.strtypes.cast_bytes(s:str | bytes, encoding:str='utf8', errors:str='strict') -> bytes
cast str or bytes to bytes
funczmq.utils.strtypes.cast_unicode(s:str | bytes, encoding:str='utf8', errors:str='strict') -> str
cast bytes or str to str
classzmq.utils.win32.allow_interrupt
Utility for fixing CTRL-C events on Windows.
funczmq.utils.z85.decode(z85bytes:str | _RawBytes) -> bytes
decode Z85 bytes to raw bytes, accepts ASCII string
funczmq.utils.z85.encode(rawbytes:_RawBytes) -> bytes
encode raw bytes into Z85
funczmqversion.include_dirs_from_path()
Check the exec path for include dirs.
funczmqversion.ver_str(version)
version tuple as string

About this data

These signatures were extracted from the public source of zeromq/pyzmq using Python's ast module. Argument names, default values, type annotations and return types are taken verbatim from the code. Implementation bodies are never stored. See how it works for details.

Back to all 805 libraries