MisterAI's picture
download
raw
920 Bytes
"""Import basic exposure of libzmq C API as a backend"""
# Copyright (C) PyZMQ Developers
# Distributed under the terms of the Modified BSD License.
from importlib import import_module
from typing import Any
public_api = [
'Context',
'Socket',
'Frame',
'Message',
'proxy',
'proxy_steerable',
'zmq_poll',
'strerror',
'zmq_errno',
'has',
'curve_keypair',
'curve_public',
'zmq_version_info',
'IPC_PATH_MAX_LEN',
'PYZMQ_DRAFT_API',
]
def select_backend(name: str) -> dict[str, Any]:
"""Select the pyzmq backend"""
try:
mod = import_module(name)
except ImportError:
raise
except Exception as e:
raise ImportError(f"Importing {name} failed with {e}") from e
ns = {
# private API
'monitored_queue': mod.monitored_queue,
}
ns.update({key: getattr(mod, key) for key in public_api})
return ns

Xet Storage Details

Size:
920 Bytes
·
Xet hash:
89c71c71b5e5c3b0d81ed864b3f90037d8343022154b0110a9d5ad42935fd45f

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.