repo
stringlengths
7
54
path
stringlengths
4
223
func_name
stringlengths
1
134
original_string
stringlengths
75
104k
language
stringclasses
1 value
code
stringlengths
75
104k
code_tokens
listlengths
20
28.4k
docstring
stringlengths
1
46.3k
docstring_tokens
listlengths
1
1.66k
sha
stringlengths
40
40
url
stringlengths
87
315
partition
stringclasses
1 value
summary
stringlengths
4
350
obf_code
stringlengths
7.85k
764k
docker/docker-py
docker/models/containers.py
Container.export
def export(self, chunk_size=DEFAULT_DATA_CHUNK_SIZE): """ Export the contents of the container's filesystem as a tar archive. Args: chunk_size (int): The number of bytes returned by each iteration of the generator. If ``None``, data will be streamed as it is ...
python
def export(self, chunk_size=DEFAULT_DATA_CHUNK_SIZE): """ Export the contents of the container's filesystem as a tar archive. Args: chunk_size (int): The number of bytes returned by each iteration of the generator. If ``None``, data will be streamed as it is ...
[ "def", "export", "(", "self", ",", "chunk_size", "=", "DEFAULT_DATA_CHUNK_SIZE", ")", ":", "return", "self", ".", "client", ".", "api", ".", "export", "(", "self", ".", "id", ",", "chunk_size", ")" ]
Export the contents of the container's filesystem as a tar archive. Args: chunk_size (int): The number of bytes returned by each iteration of the generator. If ``None``, data will be streamed as it is received. Default: 2 MB Returns: (str): The f...
[ "Export", "the", "contents", "of", "the", "container", "s", "filesystem", "as", "a", "tar", "archive", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/models/containers.py#L210-L226
train
Export the contents of the container s filesystem as a tar archive.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/models/containers.py
Container.get_archive
def get_archive(self, path, chunk_size=DEFAULT_DATA_CHUNK_SIZE): """ Retrieve a file or folder from the container in the form of a tar archive. Args: path (str): Path to the file or folder to retrieve chunk_size (int): The number of bytes returned by each iterati...
python
def get_archive(self, path, chunk_size=DEFAULT_DATA_CHUNK_SIZE): """ Retrieve a file or folder from the container in the form of a tar archive. Args: path (str): Path to the file or folder to retrieve chunk_size (int): The number of bytes returned by each iterati...
[ "def", "get_archive", "(", "self", ",", "path", ",", "chunk_size", "=", "DEFAULT_DATA_CHUNK_SIZE", ")", ":", "return", "self", ".", "client", ".", "api", ".", "get_archive", "(", "self", ".", "id", ",", "path", ",", "chunk_size", ")" ]
Retrieve a file or folder from the container in the form of a tar archive. Args: path (str): Path to the file or folder to retrieve chunk_size (int): The number of bytes returned by each iteration of the generator. If ``None``, data will be streamed as it is ...
[ "Retrieve", "a", "file", "or", "folder", "from", "the", "container", "in", "the", "form", "of", "a", "tar", "archive", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/models/containers.py#L228-L258
train
Retrieve a file or folder from the container in the form of a tar archive.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/models/containers.py
Container.kill
def kill(self, signal=None): """ Kill or send a signal to the container. Args: signal (str or int): The signal to send. Defaults to ``SIGKILL`` Raises: :py:class:`docker.errors.APIError` If the server returns an error. """ return...
python
def kill(self, signal=None): """ Kill or send a signal to the container. Args: signal (str or int): The signal to send. Defaults to ``SIGKILL`` Raises: :py:class:`docker.errors.APIError` If the server returns an error. """ return...
[ "def", "kill", "(", "self", ",", "signal", "=", "None", ")", ":", "return", "self", ".", "client", ".", "api", ".", "kill", "(", "self", ".", "id", ",", "signal", "=", "signal", ")" ]
Kill or send a signal to the container. Args: signal (str or int): The signal to send. Defaults to ``SIGKILL`` Raises: :py:class:`docker.errors.APIError` If the server returns an error.
[ "Kill", "or", "send", "a", "signal", "to", "the", "container", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/models/containers.py#L260-L272
train
Kill or send a signal to the container.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/models/containers.py
Container.logs
def logs(self, **kwargs): """ Get logs from this container. Similar to the ``docker logs`` command. The ``stream`` parameter makes the ``logs`` function return a blocking generator you can iterate over to retrieve log output as it happens. Args: stdout (bool): Get `...
python
def logs(self, **kwargs): """ Get logs from this container. Similar to the ``docker logs`` command. The ``stream`` parameter makes the ``logs`` function return a blocking generator you can iterate over to retrieve log output as it happens. Args: stdout (bool): Get `...
[ "def", "logs", "(", "self", ",", "*", "*", "kwargs", ")", ":", "return", "self", ".", "client", ".", "api", ".", "logs", "(", "self", ".", "id", ",", "*", "*", "kwargs", ")" ]
Get logs from this container. Similar to the ``docker logs`` command. The ``stream`` parameter makes the ``logs`` function return a blocking generator you can iterate over to retrieve log output as it happens. Args: stdout (bool): Get ``STDOUT``. Default ``True`` stderr...
[ "Get", "logs", "from", "this", "container", ".", "Similar", "to", "the", "docker", "logs", "command", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/models/containers.py#L274-L302
train
Returns a generator that returns the logs from the container.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/models/containers.py
Container.put_archive
def put_archive(self, path, data): """ Insert a file or folder in this container using a tar archive as source. Args: path (str): Path inside the container where the file(s) will be extracted. Must exist. data (bytes): tar data to be extracted ...
python
def put_archive(self, path, data): """ Insert a file or folder in this container using a tar archive as source. Args: path (str): Path inside the container where the file(s) will be extracted. Must exist. data (bytes): tar data to be extracted ...
[ "def", "put_archive", "(", "self", ",", "path", ",", "data", ")", ":", "return", "self", ".", "client", ".", "api", ".", "put_archive", "(", "self", ".", "id", ",", "path", ",", "data", ")" ]
Insert a file or folder in this container using a tar archive as source. Args: path (str): Path inside the container where the file(s) will be extracted. Must exist. data (bytes): tar data to be extracted Returns: (bool): True if the call suc...
[ "Insert", "a", "file", "or", "folder", "in", "this", "container", "using", "a", "tar", "archive", "as", "source", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/models/containers.py#L314-L330
train
Insert a file or folder in this container using a tar archive as source.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/models/containers.py
Container.remove
def remove(self, **kwargs): """ Remove this container. Similar to the ``docker rm`` command. Args: v (bool): Remove the volumes associated with the container link (bool): Remove the specified link and not the underlying container force (bool):...
python
def remove(self, **kwargs): """ Remove this container. Similar to the ``docker rm`` command. Args: v (bool): Remove the volumes associated with the container link (bool): Remove the specified link and not the underlying container force (bool):...
[ "def", "remove", "(", "self", ",", "*", "*", "kwargs", ")", ":", "return", "self", ".", "client", ".", "api", ".", "remove_container", "(", "self", ".", "id", ",", "*", "*", "kwargs", ")" ]
Remove this container. Similar to the ``docker rm`` command. Args: v (bool): Remove the volumes associated with the container link (bool): Remove the specified link and not the underlying container force (bool): Force the removal of a running container (uses ...
[ "Remove", "this", "container", ".", "Similar", "to", "the", "docker", "rm", "command", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/models/containers.py#L332-L347
train
Remove this container. Similar to the docker rm command.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/models/containers.py
Container.rename
def rename(self, name): """ Rename this container. Similar to the ``docker rename`` command. Args: name (str): New name for the container Raises: :py:class:`docker.errors.APIError` If the server returns an error. """ return self.c...
python
def rename(self, name): """ Rename this container. Similar to the ``docker rename`` command. Args: name (str): New name for the container Raises: :py:class:`docker.errors.APIError` If the server returns an error. """ return self.c...
[ "def", "rename", "(", "self", ",", "name", ")", ":", "return", "self", ".", "client", ".", "api", ".", "rename", "(", "self", ".", "id", ",", "name", ")" ]
Rename this container. Similar to the ``docker rename`` command. Args: name (str): New name for the container Raises: :py:class:`docker.errors.APIError` If the server returns an error.
[ "Rename", "this", "container", ".", "Similar", "to", "the", "docker", "rename", "command", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/models/containers.py#L349-L360
train
Rename this container. Similar to the docker rename command.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/models/containers.py
Container.resize
def resize(self, height, width): """ Resize the tty session. Args: height (int): Height of tty session width (int): Width of tty session Raises: :py:class:`docker.errors.APIError` If the server returns an error. """ re...
python
def resize(self, height, width): """ Resize the tty session. Args: height (int): Height of tty session width (int): Width of tty session Raises: :py:class:`docker.errors.APIError` If the server returns an error. """ re...
[ "def", "resize", "(", "self", ",", "height", ",", "width", ")", ":", "return", "self", ".", "client", ".", "api", ".", "resize", "(", "self", ".", "id", ",", "height", ",", "width", ")" ]
Resize the tty session. Args: height (int): Height of tty session width (int): Width of tty session Raises: :py:class:`docker.errors.APIError` If the server returns an error.
[ "Resize", "the", "tty", "session", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/models/containers.py#L362-L374
train
Resize the tty session.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/models/containers.py
Container.restart
def restart(self, **kwargs): """ Restart this container. Similar to the ``docker restart`` command. Args: timeout (int): Number of seconds to try to stop for before killing the container. Once killed it will then be restarted. Default is 10 seconds. ...
python
def restart(self, **kwargs): """ Restart this container. Similar to the ``docker restart`` command. Args: timeout (int): Number of seconds to try to stop for before killing the container. Once killed it will then be restarted. Default is 10 seconds. ...
[ "def", "restart", "(", "self", ",", "*", "*", "kwargs", ")", ":", "return", "self", ".", "client", ".", "api", ".", "restart", "(", "self", ".", "id", ",", "*", "*", "kwargs", ")" ]
Restart this container. Similar to the ``docker restart`` command. Args: timeout (int): Number of seconds to try to stop for before killing the container. Once killed it will then be restarted. Default is 10 seconds. Raises: :py:class:`docker.err...
[ "Restart", "this", "container", ".", "Similar", "to", "the", "docker", "restart", "command", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/models/containers.py#L376-L389
train
Restarts this container. Similar to the docker restart command.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/models/containers.py
Container.start
def start(self, **kwargs): """ Start this container. Similar to the ``docker start`` command, but doesn't support attach options. Raises: :py:class:`docker.errors.APIError` If the server returns an error. """ return self.client.api.start(self....
python
def start(self, **kwargs): """ Start this container. Similar to the ``docker start`` command, but doesn't support attach options. Raises: :py:class:`docker.errors.APIError` If the server returns an error. """ return self.client.api.start(self....
[ "def", "start", "(", "self", ",", "*", "*", "kwargs", ")", ":", "return", "self", ".", "client", ".", "api", ".", "start", "(", "self", ".", "id", ",", "*", "*", "kwargs", ")" ]
Start this container. Similar to the ``docker start`` command, but doesn't support attach options. Raises: :py:class:`docker.errors.APIError` If the server returns an error.
[ "Start", "this", "container", ".", "Similar", "to", "the", "docker", "start", "command", "but", "doesn", "t", "support", "attach", "options", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/models/containers.py#L391-L400
train
Start this container. Similar to the docker start command but causes an error if the server returns an error.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/models/containers.py
Container.stats
def stats(self, **kwargs): """ Stream statistics for this container. Similar to the ``docker stats`` command. Args: decode (bool): If set to true, stream will be decoded into dicts on the fly. Only applicable if ``stream`` is True. False by de...
python
def stats(self, **kwargs): """ Stream statistics for this container. Similar to the ``docker stats`` command. Args: decode (bool): If set to true, stream will be decoded into dicts on the fly. Only applicable if ``stream`` is True. False by de...
[ "def", "stats", "(", "self", ",", "*", "*", "kwargs", ")", ":", "return", "self", ".", "client", ".", "api", ".", "stats", "(", "self", ".", "id", ",", "*", "*", "kwargs", ")" ]
Stream statistics for this container. Similar to the ``docker stats`` command. Args: decode (bool): If set to true, stream will be decoded into dicts on the fly. Only applicable if ``stream`` is True. False by default. stream (bool): If set to fal...
[ "Stream", "statistics", "for", "this", "container", ".", "Similar", "to", "the", "docker", "stats", "command", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/models/containers.py#L402-L418
train
Returns the current statistics for this container.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/models/containers.py
Container.stop
def stop(self, **kwargs): """ Stops a container. Similar to the ``docker stop`` command. Args: timeout (int): Timeout in seconds to wait for the container to stop before sending a ``SIGKILL``. Default: 10 Raises: :py:class:`docker.errors.APIError...
python
def stop(self, **kwargs): """ Stops a container. Similar to the ``docker stop`` command. Args: timeout (int): Timeout in seconds to wait for the container to stop before sending a ``SIGKILL``. Default: 10 Raises: :py:class:`docker.errors.APIError...
[ "def", "stop", "(", "self", ",", "*", "*", "kwargs", ")", ":", "return", "self", ".", "client", ".", "api", ".", "stop", "(", "self", ".", "id", ",", "*", "*", "kwargs", ")" ]
Stops a container. Similar to the ``docker stop`` command. Args: timeout (int): Timeout in seconds to wait for the container to stop before sending a ``SIGKILL``. Default: 10 Raises: :py:class:`docker.errors.APIError` If the server returns an err...
[ "Stops", "a", "container", ".", "Similar", "to", "the", "docker", "stop", "command", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/models/containers.py#L420-L432
train
Stops a container. Similar to the docker stop command.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/models/containers.py
Container.top
def top(self, **kwargs): """ Display the running processes of the container. Args: ps_args (str): An optional arguments passed to ps (e.g. ``aux``) Returns: (str): The output of the top Raises: :py:class:`docker.errors.APIError` ...
python
def top(self, **kwargs): """ Display the running processes of the container. Args: ps_args (str): An optional arguments passed to ps (e.g. ``aux``) Returns: (str): The output of the top Raises: :py:class:`docker.errors.APIError` ...
[ "def", "top", "(", "self", ",", "*", "*", "kwargs", ")", ":", "return", "self", ".", "client", ".", "api", ".", "top", "(", "self", ".", "id", ",", "*", "*", "kwargs", ")" ]
Display the running processes of the container. Args: ps_args (str): An optional arguments passed to ps (e.g. ``aux``) Returns: (str): The output of the top Raises: :py:class:`docker.errors.APIError` If the server returns an error.
[ "Display", "the", "running", "processes", "of", "the", "container", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/models/containers.py#L434-L448
train
Display the running processes of the container.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/models/containers.py
Container.update
def update(self, **kwargs): """ Update resource configuration of the containers. Args: blkio_weight (int): Block IO (relative weight), between 10 and 1000 cpu_period (int): Limit CPU CFS (Completely Fair Scheduler) period cpu_quota (int): Limit CPU CFS (Compl...
python
def update(self, **kwargs): """ Update resource configuration of the containers. Args: blkio_weight (int): Block IO (relative weight), between 10 and 1000 cpu_period (int): Limit CPU CFS (Completely Fair Scheduler) period cpu_quota (int): Limit CPU CFS (Compl...
[ "def", "update", "(", "self", ",", "*", "*", "kwargs", ")", ":", "return", "self", ".", "client", ".", "api", ".", "update_container", "(", "self", ".", "id", ",", "*", "*", "kwargs", ")" ]
Update resource configuration of the containers. Args: blkio_weight (int): Block IO (relative weight), between 10 and 1000 cpu_period (int): Limit CPU CFS (Completely Fair Scheduler) period cpu_quota (int): Limit CPU CFS (Completely Fair Scheduler) quota cpu_shar...
[ "Update", "resource", "configuration", "of", "the", "containers", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/models/containers.py#L460-L485
train
Update the resource configuration of the containers.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/models/containers.py
Container.wait
def wait(self, **kwargs): """ Block until the container stops, then return its exit code. Similar to the ``docker wait`` command. Args: timeout (int): Request timeout condition (str): Wait until a container state reaches the given condition, eithe...
python
def wait(self, **kwargs): """ Block until the container stops, then return its exit code. Similar to the ``docker wait`` command. Args: timeout (int): Request timeout condition (str): Wait until a container state reaches the given condition, eithe...
[ "def", "wait", "(", "self", ",", "*", "*", "kwargs", ")", ":", "return", "self", ".", "client", ".", "api", ".", "wait", "(", "self", ".", "id", ",", "*", "*", "kwargs", ")" ]
Block until the container stops, then return its exit code. Similar to the ``docker wait`` command. Args: timeout (int): Request timeout condition (str): Wait until a container state reaches the given condition, either ``not-running`` (default), ``next-exit``, ...
[ "Block", "until", "the", "container", "stops", "then", "return", "its", "exit", "code", ".", "Similar", "to", "the", "docker", "wait", "command", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/models/containers.py#L487-L508
train
Block until the container stops then return its exit code.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/models/containers.py
ContainerCollection.run
def run(self, image, command=None, stdout=True, stderr=False, remove=False, **kwargs): """ Run a container. By default, it will wait for the container to finish and return its logs, similar to ``docker run``. If the ``detach`` argument is ``True``, it will start the containe...
python
def run(self, image, command=None, stdout=True, stderr=False, remove=False, **kwargs): """ Run a container. By default, it will wait for the container to finish and return its logs, similar to ``docker run``. If the ``detach`` argument is ``True``, it will start the containe...
[ "def", "run", "(", "self", ",", "image", ",", "command", "=", "None", ",", "stdout", "=", "True", ",", "stderr", "=", "False", ",", "remove", "=", "False", ",", "*", "*", "kwargs", ")", ":", "if", "isinstance", "(", "image", ",", "Image", ")", ":...
Run a container. By default, it will wait for the container to finish and return its logs, similar to ``docker run``. If the ``detach`` argument is ``True``, it will start the container and immediately return a :py:class:`Container` object, similar to ``docker run -d``. Example...
[ "Run", "a", "container", ".", "By", "default", "it", "will", "wait", "for", "the", "container", "to", "finish", "and", "return", "its", "logs", "similar", "to", "docker", "run", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/models/containers.py#L514-L837
train
Runs a container and returns its output.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/models/containers.py
ContainerCollection.create
def create(self, image, command=None, **kwargs): """ Create a container without starting it. Similar to ``docker create``. Takes the same arguments as :py:meth:`run`, except for ``stdout``, ``stderr``, and ``remove``. Returns: A :py:class:`Container` object. ...
python
def create(self, image, command=None, **kwargs): """ Create a container without starting it. Similar to ``docker create``. Takes the same arguments as :py:meth:`run`, except for ``stdout``, ``stderr``, and ``remove``. Returns: A :py:class:`Container` object. ...
[ "def", "create", "(", "self", ",", "image", ",", "command", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "isinstance", "(", "image", ",", "Image", ")", ":", "image", "=", "image", ".", "id", "kwargs", "[", "'image'", "]", "=", "image", "...
Create a container without starting it. Similar to ``docker create``. Takes the same arguments as :py:meth:`run`, except for ``stdout``, ``stderr``, and ``remove``. Returns: A :py:class:`Container` object. Raises: :py:class:`docker.errors.ImageNotFound` ...
[ "Create", "a", "container", "without", "starting", "it", ".", "Similar", "to", "docker", "create", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/models/containers.py#L839-L862
train
Create a container without starting it.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/models/containers.py
ContainerCollection.get
def get(self, container_id): """ Get a container by name or ID. Args: container_id (str): Container name or ID. Returns: A :py:class:`Container` object. Raises: :py:class:`docker.errors.NotFound` If the container does not exi...
python
def get(self, container_id): """ Get a container by name or ID. Args: container_id (str): Container name or ID. Returns: A :py:class:`Container` object. Raises: :py:class:`docker.errors.NotFound` If the container does not exi...
[ "def", "get", "(", "self", ",", "container_id", ")", ":", "resp", "=", "self", ".", "client", ".", "api", ".", "inspect_container", "(", "container_id", ")", "return", "self", ".", "prepare_model", "(", "resp", ")" ]
Get a container by name or ID. Args: container_id (str): Container name or ID. Returns: A :py:class:`Container` object. Raises: :py:class:`docker.errors.NotFound` If the container does not exist. :py:class:`docker.errors.APIError...
[ "Get", "a", "container", "by", "name", "or", "ID", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/models/containers.py#L864-L881
train
Get a container by name or ID.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/models/containers.py
ContainerCollection.list
def list(self, all=False, before=None, filters=None, limit=-1, since=None, sparse=False, ignore_removed=False): """ List containers. Similar to the ``docker ps`` command. Args: all (bool): Show all containers. Only running containers are shown by default...
python
def list(self, all=False, before=None, filters=None, limit=-1, since=None, sparse=False, ignore_removed=False): """ List containers. Similar to the ``docker ps`` command. Args: all (bool): Show all containers. Only running containers are shown by default...
[ "def", "list", "(", "self", ",", "all", "=", "False", ",", "before", "=", "None", ",", "filters", "=", "None", ",", "limit", "=", "-", "1", ",", "since", "=", "None", ",", "sparse", "=", "False", ",", "ignore_removed", "=", "False", ")", ":", "re...
List containers. Similar to the ``docker ps`` command. Args: all (bool): Show all containers. Only running containers are shown by default since (str): Show only containers created since Id or Name, include non-running ones before (str): Show ...
[ "List", "containers", ".", "Similar", "to", "the", "docker", "ps", "command", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/models/containers.py#L883-L948
train
List the containers in the system.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/models/services.py
Service.tasks
def tasks(self, filters=None): """ List the tasks in this service. Args: filters (dict): A map of filters to process on the tasks list. Valid filters: ``id``, ``name``, ``node``, ``label``, and ``desired-state``. Returns: :py:clas...
python
def tasks(self, filters=None): """ List the tasks in this service. Args: filters (dict): A map of filters to process on the tasks list. Valid filters: ``id``, ``name``, ``node``, ``label``, and ``desired-state``. Returns: :py:clas...
[ "def", "tasks", "(", "self", ",", "filters", "=", "None", ")", ":", "if", "filters", "is", "None", ":", "filters", "=", "{", "}", "filters", "[", "'service'", "]", "=", "self", ".", "id", "return", "self", ".", "client", ".", "api", ".", "tasks", ...
List the tasks in this service. Args: filters (dict): A map of filters to process on the tasks list. Valid filters: ``id``, ``name``, ``node``, ``label``, and ``desired-state``. Returns: :py:class:`list`: List of task dictionaries. Raise...
[ "List", "the", "tasks", "in", "this", "service", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/models/services.py#L35-L54
train
Returns a list of tasks in this service.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/models/services.py
Service.update
def update(self, **kwargs): """ Update a service's configuration. Similar to the ``docker service update`` command. Takes the same parameters as :py:meth:`~ServiceCollection.create`. Raises: :py:class:`docker.errors.APIError` If the server returns an...
python
def update(self, **kwargs): """ Update a service's configuration. Similar to the ``docker service update`` command. Takes the same parameters as :py:meth:`~ServiceCollection.create`. Raises: :py:class:`docker.errors.APIError` If the server returns an...
[ "def", "update", "(", "self", ",", "*", "*", "kwargs", ")", ":", "# Image is required, so if it hasn't been set, use current image", "if", "'image'", "not", "in", "kwargs", ":", "spec", "=", "self", ".", "attrs", "[", "'Spec'", "]", "[", "'TaskTemplate'", "]", ...
Update a service's configuration. Similar to the ``docker service update`` command. Takes the same parameters as :py:meth:`~ServiceCollection.create`. Raises: :py:class:`docker.errors.APIError` If the server returns an error.
[ "Update", "a", "service", "s", "configuration", ".", "Similar", "to", "the", "docker", "service", "update", "command", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/models/services.py#L56-L83
train
Updates the service s configuration.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/models/services.py
Service.logs
def logs(self, **kwargs): """ Get log stream for the service. Note: This method works only for services with the ``json-file`` or ``journald`` logging drivers. Args: details (bool): Show extra details provided to logs. Default: ``False`` f...
python
def logs(self, **kwargs): """ Get log stream for the service. Note: This method works only for services with the ``json-file`` or ``journald`` logging drivers. Args: details (bool): Show extra details provided to logs. Default: ``False`` f...
[ "def", "logs", "(", "self", ",", "*", "*", "kwargs", ")", ":", "is_tty", "=", "self", ".", "attrs", "[", "'Spec'", "]", "[", "'TaskTemplate'", "]", "[", "'ContainerSpec'", "]", ".", "get", "(", "'TTY'", ",", "False", ")", "return", "self", ".", "cl...
Get log stream for the service. Note: This method works only for services with the ``json-file`` or ``journald`` logging drivers. Args: details (bool): Show extra details provided to logs. Default: ``False`` follow (bool): Keep connection open to read log...
[ "Get", "log", "stream", "for", "the", "service", ".", "Note", ":", "This", "method", "works", "only", "for", "services", "with", "the", "json", "-", "file", "or", "journald", "logging", "drivers", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/models/services.py#L85-L112
train
Get the logs for the service.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/models/services.py
Service.scale
def scale(self, replicas): """ Scale service container. Args: replicas (int): The number of containers that should be running. Returns: bool: ``True`` if successful. """ if 'Global' in self.attrs['Spec']['Mode'].keys(): raise Invalid...
python
def scale(self, replicas): """ Scale service container. Args: replicas (int): The number of containers that should be running. Returns: bool: ``True`` if successful. """ if 'Global' in self.attrs['Spec']['Mode'].keys(): raise Invalid...
[ "def", "scale", "(", "self", ",", "replicas", ")", ":", "if", "'Global'", "in", "self", ".", "attrs", "[", "'Spec'", "]", "[", "'Mode'", "]", ".", "keys", "(", ")", ":", "raise", "InvalidArgument", "(", "'Cannot scale a global container'", ")", "service_mo...
Scale service container. Args: replicas (int): The number of containers that should be running. Returns: bool: ``True`` if successful.
[ "Scale", "service", "container", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/models/services.py#L114-L131
train
Scale this service container.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/models/services.py
ServiceCollection.create
def create(self, image, command=None, **kwargs): """ Create a service. Similar to the ``docker service create`` command. Args: image (str): The image name to use for the containers. command (list of str or str): Command to run. args (list of str): Arguments t...
python
def create(self, image, command=None, **kwargs): """ Create a service. Similar to the ``docker service create`` command. Args: image (str): The image name to use for the containers. command (list of str or str): Command to run. args (list of str): Arguments t...
[ "def", "create", "(", "self", ",", "image", ",", "command", "=", "None", ",", "*", "*", "kwargs", ")", ":", "kwargs", "[", "'image'", "]", "=", "image", "kwargs", "[", "'command'", "]", "=", "command", "create_kwargs", "=", "_get_create_service_kwargs", ...
Create a service. Similar to the ``docker service create`` command. Args: image (str): The image name to use for the containers. command (list of str or str): Command to run. args (list of str): Arguments to the command. constraints (list of str): :py:class:`~doc...
[ "Create", "a", "service", ".", "Similar", "to", "the", "docker", "service", "create", "command", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/models/services.py#L148-L224
train
Create a new service in the container system.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/models/services.py
ServiceCollection.get
def get(self, service_id, insert_defaults=None): """ Get a service. Args: service_id (str): The ID of the service. insert_defaults (boolean): If true, default values will be merged into the output. Returns: :py:class:`Service`: The se...
python
def get(self, service_id, insert_defaults=None): """ Get a service. Args: service_id (str): The ID of the service. insert_defaults (boolean): If true, default values will be merged into the output. Returns: :py:class:`Service`: The se...
[ "def", "get", "(", "self", ",", "service_id", ",", "insert_defaults", "=", "None", ")", ":", "return", "self", ".", "prepare_model", "(", "self", ".", "client", ".", "api", ".", "inspect_service", "(", "service_id", ",", "insert_defaults", ")", ")" ]
Get a service. Args: service_id (str): The ID of the service. insert_defaults (boolean): If true, default values will be merged into the output. Returns: :py:class:`Service`: The service. Raises: :py:class:`docker.errors.NotFound...
[ "Get", "a", "service", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/models/services.py#L226-L249
train
Get a service s metadata.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/models/services.py
ServiceCollection.list
def list(self, **kwargs): """ List services. Args: filters (dict): Filters to process on the nodes list. Valid filters: ``id``, ``name`` , ``label`` and ``mode``. Default: ``None``. Returns: list of :py:class:`Service`: The servic...
python
def list(self, **kwargs): """ List services. Args: filters (dict): Filters to process on the nodes list. Valid filters: ``id``, ``name`` , ``label`` and ``mode``. Default: ``None``. Returns: list of :py:class:`Service`: The servic...
[ "def", "list", "(", "self", ",", "*", "*", "kwargs", ")", ":", "return", "[", "self", ".", "prepare_model", "(", "s", ")", "for", "s", "in", "self", ".", "client", ".", "api", ".", "services", "(", "*", "*", "kwargs", ")", "]" ]
List services. Args: filters (dict): Filters to process on the nodes list. Valid filters: ``id``, ``name`` , ``label`` and ``mode``. Default: ``None``. Returns: list of :py:class:`Service`: The services. Raises: :py:class:`do...
[ "List", "services", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/models/services.py#L251-L270
train
List the services in the cluster.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/models/resource.py
Model.reload
def reload(self): """ Load this object from the server again and update ``attrs`` with the new data. """ new_model = self.collection.get(self.id) self.attrs = new_model.attrs
python
def reload(self): """ Load this object from the server again and update ``attrs`` with the new data. """ new_model = self.collection.get(self.id) self.attrs = new_model.attrs
[ "def", "reload", "(", "self", ")", ":", "new_model", "=", "self", ".", "collection", ".", "get", "(", "self", ".", "id", ")", "self", ".", "attrs", "=", "new_model", ".", "attrs" ]
Load this object from the server again and update ``attrs`` with the new data.
[ "Load", "this", "object", "from", "the", "server", "again", "and", "update", "attrs", "with", "the", "new", "data", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/models/resource.py#L43-L49
train
Reload the object from the server and update the attrs attribute with the new data.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/models/resource.py
Collection.prepare_model
def prepare_model(self, attrs): """ Create a model from a set of attributes. """ if isinstance(attrs, Model): attrs.client = self.client attrs.collection = self return attrs elif isinstance(attrs, dict): return self.model(attrs=attr...
python
def prepare_model(self, attrs): """ Create a model from a set of attributes. """ if isinstance(attrs, Model): attrs.client = self.client attrs.collection = self return attrs elif isinstance(attrs, dict): return self.model(attrs=attr...
[ "def", "prepare_model", "(", "self", ",", "attrs", ")", ":", "if", "isinstance", "(", "attrs", ",", "Model", ")", ":", "attrs", ".", "client", "=", "self", ".", "client", "attrs", ".", "collection", "=", "self", "return", "attrs", "elif", "isinstance", ...
Create a model from a set of attributes.
[ "Create", "a", "model", "from", "a", "set", "of", "attributes", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/models/resource.py#L81-L93
train
Create a model from a set of attributes.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/models/networks.py
Network.containers
def containers(self): """ The containers that are connected to the network, as a list of :py:class:`~docker.models.containers.Container` objects. """ return [ self.client.containers.get(cid) for cid in (self.attrs.get('Containers') or {}).keys() ]
python
def containers(self): """ The containers that are connected to the network, as a list of :py:class:`~docker.models.containers.Container` objects. """ return [ self.client.containers.get(cid) for cid in (self.attrs.get('Containers') or {}).keys() ]
[ "def", "containers", "(", "self", ")", ":", "return", "[", "self", ".", "client", ".", "containers", ".", "get", "(", "cid", ")", "for", "cid", "in", "(", "self", ".", "attrs", ".", "get", "(", "'Containers'", ")", "or", "{", "}", ")", ".", "keys...
The containers that are connected to the network, as a list of :py:class:`~docker.models.containers.Container` objects.
[ "The", "containers", "that", "are", "connected", "to", "the", "network", "as", "a", "list", "of", ":", "py", ":", "class", ":", "~docker", ".", "models", ".", "containers", ".", "Container", "objects", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/models/networks.py#L19-L27
train
Returns a list of all containers that are connected to the network as a list of container objects.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/models/networks.py
Network.connect
def connect(self, container, *args, **kwargs): """ Connect a container to this network. Args: container (str): Container to connect to this network, as either an ID, name, or :py:class:`~docker.models.containers.Container` object. aliases ...
python
def connect(self, container, *args, **kwargs): """ Connect a container to this network. Args: container (str): Container to connect to this network, as either an ID, name, or :py:class:`~docker.models.containers.Container` object. aliases ...
[ "def", "connect", "(", "self", ",", "container", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "isinstance", "(", "container", ",", "Container", ")", ":", "container", "=", "container", ".", "id", "return", "self", ".", "client", ".", "a...
Connect a container to this network. Args: container (str): Container to connect to this network, as either an ID, name, or :py:class:`~docker.models.containers.Container` object. aliases (:py:class:`list`): A list of aliases for this endpoint. ...
[ "Connect", "a", "container", "to", "this", "network", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/models/networks.py#L29-L58
train
Connects a container to this network.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/models/networks.py
Network.disconnect
def disconnect(self, container, *args, **kwargs): """ Disconnect a container from this network. Args: container (str): Container to disconnect from this network, as either an ID, name, or :py:class:`~docker.models.containers.Container` object. ...
python
def disconnect(self, container, *args, **kwargs): """ Disconnect a container from this network. Args: container (str): Container to disconnect from this network, as either an ID, name, or :py:class:`~docker.models.containers.Container` object. ...
[ "def", "disconnect", "(", "self", ",", "container", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "isinstance", "(", "container", ",", "Container", ")", ":", "container", "=", "container", ".", "id", "return", "self", ".", "client", ".", ...
Disconnect a container from this network. Args: container (str): Container to disconnect from this network, as either an ID, name, or :py:class:`~docker.models.containers.Container` object. force (bool): Force the container to disconnect from a network. ...
[ "Disconnect", "a", "container", "from", "this", "network", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/models/networks.py#L60-L79
train
Disconnect a container from this network.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/models/networks.py
NetworkCollection.create
def create(self, name, *args, **kwargs): """ Create a network. Similar to the ``docker network create``. Args: name (str): Name of the network driver (str): Name of the driver used to create the network options (dict): Driver options as a key-value dictionary...
python
def create(self, name, *args, **kwargs): """ Create a network. Similar to the ``docker network create``. Args: name (str): Name of the network driver (str): Name of the driver used to create the network options (dict): Driver options as a key-value dictionary...
[ "def", "create", "(", "self", ",", "name", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "resp", "=", "self", ".", "client", ".", "api", ".", "create_network", "(", "name", ",", "*", "args", ",", "*", "*", "kwargs", ")", "return", "self", ...
Create a network. Similar to the ``docker network create``. Args: name (str): Name of the network driver (str): Name of the driver used to create the network options (dict): Driver options as a key-value dictionary ipam (IPAMConfig): Optional custom IP scheme for...
[ "Create", "a", "network", ".", "Similar", "to", "the", "docker", "network", "create", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/models/networks.py#L98-L155
train
Create a new network in the cluster.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/models/networks.py
NetworkCollection.get
def get(self, network_id, *args, **kwargs): """ Get a network by its ID. Args: network_id (str): The ID of the network. verbose (bool): Retrieve the service details across the cluster in swarm mode. scope (str): Filter the network by scope (``...
python
def get(self, network_id, *args, **kwargs): """ Get a network by its ID. Args: network_id (str): The ID of the network. verbose (bool): Retrieve the service details across the cluster in swarm mode. scope (str): Filter the network by scope (``...
[ "def", "get", "(", "self", ",", "network_id", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "self", ".", "prepare_model", "(", "self", ".", "client", ".", "api", ".", "inspect_network", "(", "network_id", ",", "*", "args", ",", "*", ...
Get a network by its ID. Args: network_id (str): The ID of the network. verbose (bool): Retrieve the service details across the cluster in swarm mode. scope (str): Filter the network by scope (``swarm``, ``global`` or ``local``). Retu...
[ "Get", "a", "network", "by", "its", "ID", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/models/networks.py#L157-L181
train
Get a specific network by its ID.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/models/networks.py
NetworkCollection.list
def list(self, *args, **kwargs): """ List networks. Similar to the ``docker networks ls`` command. Args: names (:py:class:`list`): List of names to filter by. ids (:py:class:`list`): List of ids to filter by. filters (dict): Filters to be processed on the net...
python
def list(self, *args, **kwargs): """ List networks. Similar to the ``docker networks ls`` command. Args: names (:py:class:`list`): List of names to filter by. ids (:py:class:`list`): List of ids to filter by. filters (dict): Filters to be processed on the net...
[ "def", "list", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "greedy", "=", "kwargs", ".", "pop", "(", "'greedy'", ",", "False", ")", "resp", "=", "self", ".", "client", ".", "api", ".", "networks", "(", "*", "args", ",", "*...
List networks. Similar to the ``docker networks ls`` command. Args: names (:py:class:`list`): List of names to filter by. ids (:py:class:`list`): List of ids to filter by. filters (dict): Filters to be processed on the network list. Available filters: ...
[ "List", "networks", ".", "Similar", "to", "the", "docker", "networks", "ls", "command", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/models/networks.py#L183-L211
train
List the networks on the server.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/auth.py
AuthConfig.parse_auth
def parse_auth(cls, entries, raise_on_error=False): """ Parses authentication entries Args: entries: Dict of authentication entries. raise_on_error: If set to true, an invalid format will raise InvalidConfigFile Returns: Au...
python
def parse_auth(cls, entries, raise_on_error=False): """ Parses authentication entries Args: entries: Dict of authentication entries. raise_on_error: If set to true, an invalid format will raise InvalidConfigFile Returns: Au...
[ "def", "parse_auth", "(", "cls", ",", "entries", ",", "raise_on_error", "=", "False", ")", ":", "conf", "=", "{", "}", "for", "registry", ",", "entry", "in", "six", ".", "iteritems", "(", "entries", ")", ":", "if", "not", "isinstance", "(", "entry", ...
Parses authentication entries Args: entries: Dict of authentication entries. raise_on_error: If set to true, an invalid format will raise InvalidConfigFile Returns: Authentication registry.
[ "Parses", "authentication", "entries" ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/auth.py#L87-L153
train
Parses the authentication entries and returns a dictionary of authentication entries.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/auth.py
AuthConfig.resolve_authconfig
def resolve_authconfig(self, registry=None): """ Returns the authentication data from the given auth configuration for a specific registry. As with the Docker client, legacy entries in the config with full URLs are stripped down to hostnames before checking for a match. Returns N...
python
def resolve_authconfig(self, registry=None): """ Returns the authentication data from the given auth configuration for a specific registry. As with the Docker client, legacy entries in the config with full URLs are stripped down to hostnames before checking for a match. Returns N...
[ "def", "resolve_authconfig", "(", "self", ",", "registry", "=", "None", ")", ":", "if", "self", ".", "creds_store", "or", "self", ".", "cred_helpers", ":", "store_name", "=", "self", ".", "get_credential_store", "(", "registry", ")", "if", "store_name", "is"...
Returns the authentication data from the given auth configuration for a specific registry. As with the Docker client, legacy entries in the config with full URLs are stripped down to hostnames before checking for a match. Returns None if no match was found.
[ "Returns", "the", "authentication", "data", "from", "the", "given", "auth", "configuration", "for", "a", "specific", "registry", ".", "As", "with", "the", "Docker", "client", "legacy", "entries", "in", "the", "config", "with", "full", "URLs", "are", "stripped"...
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/auth.py#L221-L254
train
Resolves the authentication configuration for a specific registry.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/api/exec_api.py
ExecApiMixin.exec_create
def exec_create(self, container, cmd, stdout=True, stderr=True, stdin=False, tty=False, privileged=False, user='', environment=None, workdir=None, detach_keys=None): """ Sets up an exec instance in a running container. Args: container (str): T...
python
def exec_create(self, container, cmd, stdout=True, stderr=True, stdin=False, tty=False, privileged=False, user='', environment=None, workdir=None, detach_keys=None): """ Sets up an exec instance in a running container. Args: container (str): T...
[ "def", "exec_create", "(", "self", ",", "container", ",", "cmd", ",", "stdout", "=", "True", ",", "stderr", "=", "True", ",", "stdin", "=", "False", ",", "tty", "=", "False", ",", "privileged", "=", "False", ",", "user", "=", "''", ",", "environment"...
Sets up an exec instance in a running container. Args: container (str): Target container where exec instance will be created cmd (str or list): Command to be executed stdout (bool): Attach to stdout. Default: ``True`` stderr (bool): Attach to stde...
[ "Sets", "up", "an", "exec", "instance", "in", "a", "running", "container", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/api/exec_api.py#L9-L80
train
Create an exec instance in a running container.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/api/exec_api.py
ExecApiMixin.exec_inspect
def exec_inspect(self, exec_id): """ Return low-level information about an exec command. Args: exec_id (str): ID of the exec instance Returns: (dict): Dictionary of values returned by the endpoint. Raises: :py:class:`docker.errors.APIError` ...
python
def exec_inspect(self, exec_id): """ Return low-level information about an exec command. Args: exec_id (str): ID of the exec instance Returns: (dict): Dictionary of values returned by the endpoint. Raises: :py:class:`docker.errors.APIError` ...
[ "def", "exec_inspect", "(", "self", ",", "exec_id", ")", ":", "if", "isinstance", "(", "exec_id", ",", "dict", ")", ":", "exec_id", "=", "exec_id", ".", "get", "(", "'Id'", ")", "res", "=", "self", ".", "_get", "(", "self", ".", "_url", "(", "\"/ex...
Return low-level information about an exec command. Args: exec_id (str): ID of the exec instance Returns: (dict): Dictionary of values returned by the endpoint. Raises: :py:class:`docker.errors.APIError` If the server returns an error.
[ "Return", "low", "-", "level", "information", "about", "an", "exec", "command", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/api/exec_api.py#L82-L99
train
Return low - level information about an exec command.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/api/exec_api.py
ExecApiMixin.exec_resize
def exec_resize(self, exec_id, height=None, width=None): """ Resize the tty session used by the specified exec command. Args: exec_id (str): ID of the exec instance height (int): Height of tty session width (int): Width of tty session """ if ...
python
def exec_resize(self, exec_id, height=None, width=None): """ Resize the tty session used by the specified exec command. Args: exec_id (str): ID of the exec instance height (int): Height of tty session width (int): Width of tty session """ if ...
[ "def", "exec_resize", "(", "self", ",", "exec_id", ",", "height", "=", "None", ",", "width", "=", "None", ")", ":", "if", "isinstance", "(", "exec_id", ",", "dict", ")", ":", "exec_id", "=", "exec_id", ".", "get", "(", "'Id'", ")", "params", "=", "...
Resize the tty session used by the specified exec command. Args: exec_id (str): ID of the exec instance height (int): Height of tty session width (int): Width of tty session
[ "Resize", "the", "tty", "session", "used", "by", "the", "specified", "exec", "command", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/api/exec_api.py#L101-L117
train
Resize the tty session used by the specified exec command.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/api/exec_api.py
ExecApiMixin.exec_start
def exec_start(self, exec_id, detach=False, tty=False, stream=False, socket=False, demux=False): """ Start a previously set up exec instance. Args: exec_id (str): ID of the exec instance detach (bool): If true, detach from the exec command. ...
python
def exec_start(self, exec_id, detach=False, tty=False, stream=False, socket=False, demux=False): """ Start a previously set up exec instance. Args: exec_id (str): ID of the exec instance detach (bool): If true, detach from the exec command. ...
[ "def", "exec_start", "(", "self", ",", "exec_id", ",", "detach", "=", "False", ",", "tty", "=", "False", ",", "stream", "=", "False", ",", "socket", "=", "False", ",", "demux", "=", "False", ")", ":", "# we want opened socket if socket == True", "data", "=...
Start a previously set up exec instance. Args: exec_id (str): ID of the exec instance detach (bool): If true, detach from the exec command. Default: False tty (bool): Allocate a pseudo-TTY. Default: False stream (bool): Stream response data. Defau...
[ "Start", "a", "previously", "set", "up", "exec", "instance", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/api/exec_api.py#L120-L169
train
Start a previously set up exec command.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/api/client.py
APIClient._raise_for_status
def _raise_for_status(self, response): """Raises stored :class:`APIError`, if one occurred.""" try: response.raise_for_status() except requests.exceptions.HTTPError as e: raise create_api_error_from_http_exception(e)
python
def _raise_for_status(self, response): """Raises stored :class:`APIError`, if one occurred.""" try: response.raise_for_status() except requests.exceptions.HTTPError as e: raise create_api_error_from_http_exception(e)
[ "def", "_raise_for_status", "(", "self", ",", "response", ")", ":", "try", ":", "response", ".", "raise_for_status", "(", ")", "except", "requests", ".", "exceptions", ".", "HTTPError", "as", "e", ":", "raise", "create_api_error_from_http_exception", "(", "e", ...
Raises stored :class:`APIError`, if one occurred.
[ "Raises", "stored", ":", "class", ":", "APIError", "if", "one", "occurred", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/api/client.py#L258-L263
train
Raises stored : class : APIError if one occurred.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/api/client.py
APIClient._stream_helper
def _stream_helper(self, response, decode=False): """Generator for data coming from a chunked-encoded HTTP response.""" if response.raw._fp.chunked: if decode: for chunk in json_stream(self._stream_helper(response, False)): yield chunk else: ...
python
def _stream_helper(self, response, decode=False): """Generator for data coming from a chunked-encoded HTTP response.""" if response.raw._fp.chunked: if decode: for chunk in json_stream(self._stream_helper(response, False)): yield chunk else: ...
[ "def", "_stream_helper", "(", "self", ",", "response", ",", "decode", "=", "False", ")", ":", "if", "response", ".", "raw", ".", "_fp", ".", "chunked", ":", "if", "decode", ":", "for", "chunk", "in", "json_stream", "(", "self", ".", "_stream_helper", "...
Generator for data coming from a chunked-encoded HTTP response.
[ "Generator", "for", "data", "coming", "from", "a", "chunked", "-", "encoded", "HTTP", "response", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/api/client.py#L334-L354
train
Generator for data coming from a chunked - encoded HTTP response.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/api/client.py
APIClient._multiplexed_buffer_helper
def _multiplexed_buffer_helper(self, response): """A generator of multiplexed data blocks read from a buffered response.""" buf = self._result(response, binary=True) buf_length = len(buf) walker = 0 while True: if buf_length - walker < STREAM_HEADER_SIZE_BYTES...
python
def _multiplexed_buffer_helper(self, response): """A generator of multiplexed data blocks read from a buffered response.""" buf = self._result(response, binary=True) buf_length = len(buf) walker = 0 while True: if buf_length - walker < STREAM_HEADER_SIZE_BYTES...
[ "def", "_multiplexed_buffer_helper", "(", "self", ",", "response", ")", ":", "buf", "=", "self", ".", "_result", "(", "response", ",", "binary", "=", "True", ")", "buf_length", "=", "len", "(", "buf", ")", "walker", "=", "0", "while", "True", ":", "if"...
A generator of multiplexed data blocks read from a buffered response.
[ "A", "generator", "of", "multiplexed", "data", "blocks", "read", "from", "a", "buffered", "response", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/api/client.py#L356-L370
train
A generator of multiplexed data blocks read from a buffered response.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/api/client.py
APIClient._multiplexed_response_stream_helper
def _multiplexed_response_stream_helper(self, response): """A generator of multiplexed data blocks coming from a response stream.""" # Disable timeout on the underlying socket to prevent # Read timed out(s) for long running processes socket = self._get_raw_response_socket(respon...
python
def _multiplexed_response_stream_helper(self, response): """A generator of multiplexed data blocks coming from a response stream.""" # Disable timeout on the underlying socket to prevent # Read timed out(s) for long running processes socket = self._get_raw_response_socket(respon...
[ "def", "_multiplexed_response_stream_helper", "(", "self", ",", "response", ")", ":", "# Disable timeout on the underlying socket to prevent", "# Read timed out(s) for long running processes", "socket", "=", "self", ".", "_get_raw_response_socket", "(", "response", ")", "self", ...
A generator of multiplexed data blocks coming from a response stream.
[ "A", "generator", "of", "multiplexed", "data", "blocks", "coming", "from", "a", "response", "stream", "." ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/api/client.py#L372-L391
train
A generator that yields the multiplexed data blocks coming from a response stream.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/api/client.py
APIClient._stream_raw_result
def _stream_raw_result(self, response, chunk_size=1, decode=True): ''' Stream result for TTY-enabled container and raw binary data''' self._raise_for_status(response) for out in response.iter_content(chunk_size, decode): yield out
python
def _stream_raw_result(self, response, chunk_size=1, decode=True): ''' Stream result for TTY-enabled container and raw binary data''' self._raise_for_status(response) for out in response.iter_content(chunk_size, decode): yield out
[ "def", "_stream_raw_result", "(", "self", ",", "response", ",", "chunk_size", "=", "1", ",", "decode", "=", "True", ")", ":", "self", ".", "_raise_for_status", "(", "response", ")", "for", "out", "in", "response", ".", "iter_content", "(", "chunk_size", ",...
Stream result for TTY-enabled container and raw binary data
[ "Stream", "result", "for", "TTY", "-", "enabled", "container", "and", "raw", "binary", "data" ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/api/client.py#L393-L397
train
Stream result for TTY - enabled container and raw binary data
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/api/client.py
APIClient._disable_socket_timeout
def _disable_socket_timeout(self, socket): """ Depending on the combination of python version and whether we're connecting over http or https, we might need to access _sock, which may or may not exist; or we may need to just settimeout on socket itself, which also may or may not have set...
python
def _disable_socket_timeout(self, socket): """ Depending on the combination of python version and whether we're connecting over http or https, we might need to access _sock, which may or may not exist; or we may need to just settimeout on socket itself, which also may or may not have set...
[ "def", "_disable_socket_timeout", "(", "self", ",", "socket", ")", ":", "sockets", "=", "[", "socket", ",", "getattr", "(", "socket", ",", "'_sock'", ",", "None", ")", "]", "for", "s", "in", "sockets", ":", "if", "not", "hasattr", "(", "s", ",", "'se...
Depending on the combination of python version and whether we're connecting over http or https, we might need to access _sock, which may or may not exist; or we may need to just settimeout on socket itself, which also may or may not have settimeout on it. To avoid missing the correct one...
[ "Depending", "on", "the", "combination", "of", "python", "version", "and", "whether", "we", "re", "connecting", "over", "http", "or", "https", "we", "might", "need", "to", "access", "_sock", "which", "may", "or", "may", "not", "exist", ";", "or", "we", "...
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/api/client.py#L417-L443
train
Disables the socket timeout.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
docker/docker-py
docker/api/client.py
APIClient.reload_config
def reload_config(self, dockercfg_path=None): """ Force a reload of the auth configuration Args: dockercfg_path (str): Use a custom path for the Docker config file (default ``$HOME/.docker/config.json`` if present, otherwise``$HOME/.dockercfg``) ...
python
def reload_config(self, dockercfg_path=None): """ Force a reload of the auth configuration Args: dockercfg_path (str): Use a custom path for the Docker config file (default ``$HOME/.docker/config.json`` if present, otherwise``$HOME/.dockercfg``) ...
[ "def", "reload_config", "(", "self", ",", "dockercfg_path", "=", "None", ")", ":", "self", ".", "_auth_configs", "=", "auth", ".", "load_config", "(", "dockercfg_path", ",", "credstore_env", "=", "self", ".", "credstore_env", ")" ]
Force a reload of the auth configuration Args: dockercfg_path (str): Use a custom path for the Docker config file (default ``$HOME/.docker/config.json`` if present, otherwise``$HOME/.dockercfg``) Returns: None
[ "Force", "a", "reload", "of", "the", "auth", "configuration" ]
613d6aad83acc9931ff2ecfd6a6c7bd8061dc125
https://github.com/docker/docker-py/blob/613d6aad83acc9931ff2ecfd6a6c7bd8061dc125/docker/api/client.py#L486-L500
train
Reloads the auth configuration for the current user
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/lock.py
Lock.acquire
def acquire(self, blocking=None, blocking_timeout=None, token=None): """ Use Redis to hold a shared, distributed lock named ``name``. Returns True once the lock is acquired. If ``blocking`` is False, always return immediately. If the lock was acquired, return True, otherwise ret...
python
def acquire(self, blocking=None, blocking_timeout=None, token=None): """ Use Redis to hold a shared, distributed lock named ``name``. Returns True once the lock is acquired. If ``blocking`` is False, always return immediately. If the lock was acquired, return True, otherwise ret...
[ "def", "acquire", "(", "self", ",", "blocking", "=", "None", ",", "blocking_timeout", "=", "None", ",", "token", "=", "None", ")", ":", "sleep", "=", "self", ".", "sleep", "if", "token", "is", "None", ":", "token", "=", "uuid", ".", "uuid1", "(", "...
Use Redis to hold a shared, distributed lock named ``name``. Returns True once the lock is acquired. If ``blocking`` is False, always return immediately. If the lock was acquired, return True, otherwise return False. ``blocking_timeout`` specifies the maximum number of seconds to ...
[ "Use", "Redis", "to", "hold", "a", "shared", "distributed", "lock", "named", "name", ".", "Returns", "True", "once", "the", "lock", "is", "acquired", "." ]
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/lock.py#L152-L189
train
Acquire a shared distributed lock.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/lock.py
Lock.owned
def owned(self): """ Returns True if this key is locked by this lock, otherwise False. """ stored_token = self.redis.get(self.name) # need to always compare bytes to bytes # TODO: this can be simplified when the context manager is finished if stored_token and not ...
python
def owned(self): """ Returns True if this key is locked by this lock, otherwise False. """ stored_token = self.redis.get(self.name) # need to always compare bytes to bytes # TODO: this can be simplified when the context manager is finished if stored_token and not ...
[ "def", "owned", "(", "self", ")", ":", "stored_token", "=", "self", ".", "redis", ".", "get", "(", "self", ".", "name", ")", "# need to always compare bytes to bytes", "# TODO: this can be simplified when the context manager is finished", "if", "stored_token", "and", "n...
Returns True if this key is locked by this lock, otherwise False.
[ "Returns", "True", "if", "this", "key", "is", "locked", "by", "this", "lock", "otherwise", "False", "." ]
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/lock.py#L207-L218
train
Returns True if this key is owned by this lock otherwise False.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/lock.py
Lock.reacquire
def reacquire(self): """ Resets a TTL of an already acquired lock back to a timeout value. """ if self.local.token is None: raise LockError("Cannot reacquire an unlocked lock") if self.timeout is None: raise LockError("Cannot reacquire a lock with no timeo...
python
def reacquire(self): """ Resets a TTL of an already acquired lock back to a timeout value. """ if self.local.token is None: raise LockError("Cannot reacquire an unlocked lock") if self.timeout is None: raise LockError("Cannot reacquire a lock with no timeo...
[ "def", "reacquire", "(", "self", ")", ":", "if", "self", ".", "local", ".", "token", "is", "None", ":", "raise", "LockError", "(", "\"Cannot reacquire an unlocked lock\"", ")", "if", "self", ".", "timeout", "is", "None", ":", "raise", "LockError", "(", "\"...
Resets a TTL of an already acquired lock back to a timeout value.
[ "Resets", "a", "TTL", "of", "an", "already", "acquired", "lock", "back", "to", "a", "timeout", "value", "." ]
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/lock.py#L257-L265
train
Reacquires a lock.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
timestamp_to_datetime
def timestamp_to_datetime(response): "Converts a unix timestamp to a Python datetime object" if not response: return None try: response = int(response) except ValueError: return None return datetime.datetime.fromtimestamp(response)
python
def timestamp_to_datetime(response): "Converts a unix timestamp to a Python datetime object" if not response: return None try: response = int(response) except ValueError: return None return datetime.datetime.fromtimestamp(response)
[ "def", "timestamp_to_datetime", "(", "response", ")", ":", "if", "not", "response", ":", "return", "None", "try", ":", "response", "=", "int", "(", "response", ")", "except", "ValueError", ":", "return", "None", "return", "datetime", ".", "datetime", ".", ...
Converts a unix timestamp to a Python datetime object
[ "Converts", "a", "unix", "timestamp", "to", "a", "Python", "datetime", "object" ]
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L48-L56
train
Converts a unix timestamp to a Python datetime object
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
pairs_to_dict
def pairs_to_dict(response, decode_keys=False): "Create a dict given a list of key/value pairs" if response is None: return {} if decode_keys: # the iter form is faster, but I don't know how to make that work # with a nativestr() map return dict(izip(imap(nativestr, response[...
python
def pairs_to_dict(response, decode_keys=False): "Create a dict given a list of key/value pairs" if response is None: return {} if decode_keys: # the iter form is faster, but I don't know how to make that work # with a nativestr() map return dict(izip(imap(nativestr, response[...
[ "def", "pairs_to_dict", "(", "response", ",", "decode_keys", "=", "False", ")", ":", "if", "response", "is", "None", ":", "return", "{", "}", "if", "decode_keys", ":", "# the iter form is faster, but I don't know how to make that work", "# with a nativestr() map", "retu...
Create a dict given a list of key/value pairs
[ "Create", "a", "dict", "given", "a", "list", "of", "key", "/", "value", "pairs" ]
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L192-L202
train
Create a dict given a list of key / value pairs
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
zset_score_pairs
def zset_score_pairs(response, **options): """ If ``withscores`` is specified in the options, return the response as a list of (value, score) pairs """ if not response or not options.get('withscores'): return response score_cast_func = options.get('score_cast_func', float) it = iter(...
python
def zset_score_pairs(response, **options): """ If ``withscores`` is specified in the options, return the response as a list of (value, score) pairs """ if not response or not options.get('withscores'): return response score_cast_func = options.get('score_cast_func', float) it = iter(...
[ "def", "zset_score_pairs", "(", "response", ",", "*", "*", "options", ")", ":", "if", "not", "response", "or", "not", "options", ".", "get", "(", "'withscores'", ")", ":", "return", "response", "score_cast_func", "=", "options", ".", "get", "(", "'score_ca...
If ``withscores`` is specified in the options, return the response as a list of (value, score) pairs
[ "If", "withscores", "is", "specified", "in", "the", "options", "return", "the", "response", "as", "a", "list", "of", "(", "value", "score", ")", "pairs" ]
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L220-L229
train
Converts a response to a list of score pairs.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
sort_return_tuples
def sort_return_tuples(response, **options): """ If ``groups`` is specified, return the response as a list of n-element tuples with n being the value found in options['groups'] """ if not response or not options.get('groups'): return response n = options['groups'] return list(izip(*[...
python
def sort_return_tuples(response, **options): """ If ``groups`` is specified, return the response as a list of n-element tuples with n being the value found in options['groups'] """ if not response or not options.get('groups'): return response n = options['groups'] return list(izip(*[...
[ "def", "sort_return_tuples", "(", "response", ",", "*", "*", "options", ")", ":", "if", "not", "response", "or", "not", "options", ".", "get", "(", "'groups'", ")", ":", "return", "response", "n", "=", "options", "[", "'groups'", "]", "return", "list", ...
If ``groups`` is specified, return the response as a list of n-element tuples with n being the value found in options['groups']
[ "If", "groups", "is", "specified", "return", "the", "response", "as", "a", "list", "of", "n", "-", "element", "tuples", "with", "n", "being", "the", "value", "found", "in", "options", "[", "groups", "]" ]
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L232-L240
train
Sort the response as a list of n - element tuples with n being the value found in options. groups.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.from_url
def from_url(cls, url, db=None, **kwargs): """ Return a Redis client object configured from the given URL For example:: redis://[:password]@localhost:6379/0 rediss://[:password]@localhost:6379/0 unix://[:password]@/path/to/socket.sock?db=0 Three URL...
python
def from_url(cls, url, db=None, **kwargs): """ Return a Redis client object configured from the given URL For example:: redis://[:password]@localhost:6379/0 rediss://[:password]@localhost:6379/0 unix://[:password]@/path/to/socket.sock?db=0 Three URL...
[ "def", "from_url", "(", "cls", ",", "url", ",", "db", "=", "None", ",", "*", "*", "kwargs", ")", ":", "connection_pool", "=", "ConnectionPool", ".", "from_url", "(", "url", ",", "db", "=", "db", ",", "*", "*", "kwargs", ")", "return", "cls", "(", ...
Return a Redis client object configured from the given URL For example:: redis://[:password]@localhost:6379/0 rediss://[:password]@localhost:6379/0 unix://[:password]@/path/to/socket.sock?db=0 Three URL schemes are supported: - ```redis://`` <htt...
[ "Return", "a", "Redis", "client", "object", "configured", "from", "the", "given", "URL" ]
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L571-L605
train
Returns a Redis client object configured from the given URL.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.lock
def lock(self, name, timeout=None, sleep=0.1, blocking_timeout=None, lock_class=None, thread_local=True): """ Return a new Lock object using key ``name`` that mimics the behavior of threading.Lock. If specified, ``timeout`` indicates a maximum life for the lock. By ...
python
def lock(self, name, timeout=None, sleep=0.1, blocking_timeout=None, lock_class=None, thread_local=True): """ Return a new Lock object using key ``name`` that mimics the behavior of threading.Lock. If specified, ``timeout`` indicates a maximum life for the lock. By ...
[ "def", "lock", "(", "self", ",", "name", ",", "timeout", "=", "None", ",", "sleep", "=", "0.1", ",", "blocking_timeout", "=", "None", ",", "lock_class", "=", "None", ",", "thread_local", "=", "True", ")", ":", "if", "lock_class", "is", "None", ":", "...
Return a new Lock object using key ``name`` that mimics the behavior of threading.Lock. If specified, ``timeout`` indicates a maximum life for the lock. By default, it will remain locked until release() is called. ``sleep`` indicates the amount of time to sleep per loop iteration ...
[ "Return", "a", "new", "Lock", "object", "using", "key", "name", "that", "mimics", "the", "behavior", "of", "threading", ".", "Lock", "." ]
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L710-L759
train
This method returns a new Lock object with the specified key name and timeout and sleep.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.execute_command
def execute_command(self, *args, **options): "Execute a command and return a parsed response" pool = self.connection_pool command_name = args[0] connection = pool.get_connection(command_name, **options) try: connection.send_command(*args) return self.parse...
python
def execute_command(self, *args, **options): "Execute a command and return a parsed response" pool = self.connection_pool command_name = args[0] connection = pool.get_connection(command_name, **options) try: connection.send_command(*args) return self.parse...
[ "def", "execute_command", "(", "self", ",", "*", "args", ",", "*", "*", "options", ")", ":", "pool", "=", "self", ".", "connection_pool", "command_name", "=", "args", "[", "0", "]", "connection", "=", "pool", ".", "get_connection", "(", "command_name", "...
Execute a command and return a parsed response
[ "Execute", "a", "command", "and", "return", "a", "parsed", "response" ]
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L770-L786
train
Execute a command and return a parsed response
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.parse_response
def parse_response(self, connection, command_name, **options): "Parses a response from the Redis server" try: response = connection.read_response() except ResponseError: if EMPTY_RESPONSE in options: return options[EMPTY_RESPONSE] raise ...
python
def parse_response(self, connection, command_name, **options): "Parses a response from the Redis server" try: response = connection.read_response() except ResponseError: if EMPTY_RESPONSE in options: return options[EMPTY_RESPONSE] raise ...
[ "def", "parse_response", "(", "self", ",", "connection", ",", "command_name", ",", "*", "*", "options", ")", ":", "try", ":", "response", "=", "connection", ".", "read_response", "(", ")", "except", "ResponseError", ":", "if", "EMPTY_RESPONSE", "in", "option...
Parses a response from the Redis server
[ "Parses", "a", "response", "from", "the", "Redis", "server" ]
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L788-L798
train
Parses a response from the Redis server
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.client_kill_filter
def client_kill_filter(self, _id=None, _type=None, addr=None, skipme=None): """ Disconnects client(s) using a variety of filter options :param id: Kills a client by its unique ID field :param type: Kills a client by type where type is one of 'normal', 'master', 'slave' or 'pubsub...
python
def client_kill_filter(self, _id=None, _type=None, addr=None, skipme=None): """ Disconnects client(s) using a variety of filter options :param id: Kills a client by its unique ID field :param type: Kills a client by type where type is one of 'normal', 'master', 'slave' or 'pubsub...
[ "def", "client_kill_filter", "(", "self", ",", "_id", "=", "None", ",", "_type", "=", "None", ",", "addr", "=", "None", ",", "skipme", "=", "None", ")", ":", "args", "=", "[", "]", "if", "_type", "is", "not", "None", ":", "client_types", "=", "(", ...
Disconnects client(s) using a variety of filter options :param id: Kills a client by its unique ID field :param type: Kills a client by type where type is one of 'normal', 'master', 'slave' or 'pubsub' :param addr: Kills a client by its 'address:port' :param skipme: If True, then...
[ "Disconnects", "client", "(", "s", ")", "using", "a", "variety", "of", "filter", "options", ":", "param", "id", ":", "Kills", "a", "client", "by", "its", "unique", "ID", "field", ":", "param", "type", ":", "Kills", "a", "client", "by", "type", "where",...
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L816-L850
train
Kills a client by a variety of filter options.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.client_list
def client_list(self, _type=None): """ Returns a list of currently connected clients. If type of client specified, only that type will be returned. :param _type: optional. one of the client types (normal, master, replica, pubsub) """ "Returns a list of currently ...
python
def client_list(self, _type=None): """ Returns a list of currently connected clients. If type of client specified, only that type will be returned. :param _type: optional. one of the client types (normal, master, replica, pubsub) """ "Returns a list of currently ...
[ "def", "client_list", "(", "self", ",", "_type", "=", "None", ")", ":", "\"Returns a list of currently connected clients\"", "if", "_type", "is", "not", "None", ":", "client_types", "=", "(", "'normal'", ",", "'master'", ",", "'replica'", ",", "'pubsub'", ")", ...
Returns a list of currently connected clients. If type of client specified, only that type will be returned. :param _type: optional. one of the client types (normal, master, replica, pubsub)
[ "Returns", "a", "list", "of", "currently", "connected", "clients", ".", "If", "type", "of", "client", "specified", "only", "that", "type", "will", "be", "returned", ".", ":", "param", "_type", ":", "optional", ".", "one", "of", "the", "client", "types", ...
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L852-L867
train
Returns a list of currently connected clients.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.client_unblock
def client_unblock(self, client_id, error=False): """ Unblocks a connection by its client id. If ``error`` is True, unblocks the client with a special error message. If ``error`` is False (default), the client is unblocked using the regular timeout mechanism. """ ...
python
def client_unblock(self, client_id, error=False): """ Unblocks a connection by its client id. If ``error`` is True, unblocks the client with a special error message. If ``error`` is False (default), the client is unblocked using the regular timeout mechanism. """ ...
[ "def", "client_unblock", "(", "self", ",", "client_id", ",", "error", "=", "False", ")", ":", "args", "=", "[", "'CLIENT UNBLOCK'", ",", "int", "(", "client_id", ")", "]", "if", "error", ":", "args", ".", "append", "(", "Token", ".", "get_token", "(", ...
Unblocks a connection by its client id. If ``error`` is True, unblocks the client with a special error message. If ``error`` is False (default), the client is unblocked using the regular timeout mechanism.
[ "Unblocks", "a", "connection", "by", "its", "client", "id", ".", "If", "error", "is", "True", "unblocks", "the", "client", "with", "a", "special", "error", "message", ".", "If", "error", "is", "False", "(", "default", ")", "the", "client", "is", "unblock...
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L881-L891
train
Unblocks a connection by its client id.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.client_pause
def client_pause(self, timeout): """ Suspend all the Redis clients for the specified amount of time :param timeout: milliseconds to pause clients """ if not isinstance(timeout, (int, long)): raise DataError("CLIENT PAUSE timeout must be an integer") return sel...
python
def client_pause(self, timeout): """ Suspend all the Redis clients for the specified amount of time :param timeout: milliseconds to pause clients """ if not isinstance(timeout, (int, long)): raise DataError("CLIENT PAUSE timeout must be an integer") return sel...
[ "def", "client_pause", "(", "self", ",", "timeout", ")", ":", "if", "not", "isinstance", "(", "timeout", ",", "(", "int", ",", "long", ")", ")", ":", "raise", "DataError", "(", "\"CLIENT PAUSE timeout must be an integer\"", ")", "return", "self", ".", "execu...
Suspend all the Redis clients for the specified amount of time :param timeout: milliseconds to pause clients
[ "Suspend", "all", "the", "Redis", "clients", "for", "the", "specified", "amount", "of", "time", ":", "param", "timeout", ":", "milliseconds", "to", "pause", "clients" ]
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L893-L900
train
Suspend all the Redis clients for the specified amount of time.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.flushall
def flushall(self, asynchronous=False): """ Delete all keys in all databases on the current host. ``asynchronous`` indicates whether the operation is executed asynchronously by the server. """ args = [] if asynchronous: args.append(Token.get_token('AS...
python
def flushall(self, asynchronous=False): """ Delete all keys in all databases on the current host. ``asynchronous`` indicates whether the operation is executed asynchronously by the server. """ args = [] if asynchronous: args.append(Token.get_token('AS...
[ "def", "flushall", "(", "self", ",", "asynchronous", "=", "False", ")", ":", "args", "=", "[", "]", "if", "asynchronous", ":", "args", ".", "append", "(", "Token", ".", "get_token", "(", "'ASYNC'", ")", ")", "return", "self", ".", "execute_command", "(...
Delete all keys in all databases on the current host. ``asynchronous`` indicates whether the operation is executed asynchronously by the server.
[ "Delete", "all", "keys", "in", "all", "databases", "on", "the", "current", "host", "." ]
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L930-L940
train
Delete all keys in all databases on the current host.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.migrate
def migrate(self, host, port, keys, destination_db, timeout, copy=False, replace=False, auth=None): """ Migrate 1 or more keys from the current Redis server to a different server specified by the ``host``, ``port`` and ``destination_db``. The ``timeout``, specified in mi...
python
def migrate(self, host, port, keys, destination_db, timeout, copy=False, replace=False, auth=None): """ Migrate 1 or more keys from the current Redis server to a different server specified by the ``host``, ``port`` and ``destination_db``. The ``timeout``, specified in mi...
[ "def", "migrate", "(", "self", ",", "host", ",", "port", ",", "keys", ",", "destination_db", ",", "timeout", ",", "copy", "=", "False", ",", "replace", "=", "False", ",", "auth", "=", "None", ")", ":", "keys", "=", "list_or_args", "(", "keys", ",", ...
Migrate 1 or more keys from the current Redis server to a different server specified by the ``host``, ``port`` and ``destination_db``. The ``timeout``, specified in milliseconds, indicates the maximum time the connection between the two servers can be idle before the command is interrup...
[ "Migrate", "1", "or", "more", "keys", "from", "the", "current", "Redis", "server", "to", "a", "different", "server", "specified", "by", "the", "host", "port", "and", "destination_db", "." ]
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L980-L1013
train
Migrate one or more keys from the current Redis server to a different Redis server.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.object
def object(self, infotype, key): "Return the encoding, idletime, or refcount about the key" return self.execute_command('OBJECT', infotype, key, infotype=infotype)
python
def object(self, infotype, key): "Return the encoding, idletime, or refcount about the key" return self.execute_command('OBJECT', infotype, key, infotype=infotype)
[ "def", "object", "(", "self", ",", "infotype", ",", "key", ")", ":", "return", "self", ".", "execute_command", "(", "'OBJECT'", ",", "infotype", ",", "key", ",", "infotype", "=", "infotype", ")" ]
Return the encoding, idletime, or refcount about the key
[ "Return", "the", "encoding", "idletime", "or", "refcount", "about", "the", "key" ]
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L1015-L1017
train
Return the encoding idletime or refcount about the key
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.memory_usage
def memory_usage(self, key, samples=None): """ Return the total memory usage for key, its value and associated administrative overheads. For nested data structures, ``samples`` is the number of elements to sample. If left unspecified, the server's default is 5. Use 0 to sample ...
python
def memory_usage(self, key, samples=None): """ Return the total memory usage for key, its value and associated administrative overheads. For nested data structures, ``samples`` is the number of elements to sample. If left unspecified, the server's default is 5. Use 0 to sample ...
[ "def", "memory_usage", "(", "self", ",", "key", ",", "samples", "=", "None", ")", ":", "args", "=", "[", "]", "if", "isinstance", "(", "samples", ",", "int", ")", ":", "args", ".", "extend", "(", "[", "Token", ".", "get_token", "(", "'SAMPLES'", ")...
Return the total memory usage for key, its value and associated administrative overheads. For nested data structures, ``samples`` is the number of elements to sample. If left unspecified, the server's default is 5. Use 0 to sample all elements.
[ "Return", "the", "total", "memory", "usage", "for", "key", "its", "value", "and", "associated", "administrative", "overheads", "." ]
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L1019-L1031
train
Returns the total memory usage for the specified key and its value and associated administrative overheads.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.shutdown
def shutdown(self, save=False, nosave=False): """Shutdown the Redis server. If Redis has persistence configured, data will be flushed before shutdown. If the "save" option is set, a data flush will be attempted even if there is no persistence configured. If the "nosave" option is set,...
python
def shutdown(self, save=False, nosave=False): """Shutdown the Redis server. If Redis has persistence configured, data will be flushed before shutdown. If the "save" option is set, a data flush will be attempted even if there is no persistence configured. If the "nosave" option is set,...
[ "def", "shutdown", "(", "self", ",", "save", "=", "False", ",", "nosave", "=", "False", ")", ":", "if", "save", "and", "nosave", ":", "raise", "DataError", "(", "'SHUTDOWN save and nosave cannot both be set'", ")", "args", "=", "[", "'SHUTDOWN'", "]", "if", ...
Shutdown the Redis server. If Redis has persistence configured, data will be flushed before shutdown. If the "save" option is set, a data flush will be attempted even if there is no persistence configured. If the "nosave" option is set, no data flush will be attempted. The "save" and...
[ "Shutdown", "the", "Redis", "server", ".", "If", "Redis", "has", "persistence", "configured", "data", "will", "be", "flushed", "before", "shutdown", ".", "If", "the", "save", "option", "is", "set", "a", "data", "flush", "will", "be", "attempted", "even", "...
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L1086-L1105
train
Shutdown the Redis server.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.slaveof
def slaveof(self, host=None, port=None): """ Set the server to be a replicated slave of the instance identified by the ``host`` and ``port``. If called without arguments, the instance is promoted to a master instead. """ if host is None and port is None: retur...
python
def slaveof(self, host=None, port=None): """ Set the server to be a replicated slave of the instance identified by the ``host`` and ``port``. If called without arguments, the instance is promoted to a master instead. """ if host is None and port is None: retur...
[ "def", "slaveof", "(", "self", ",", "host", "=", "None", ",", "port", "=", "None", ")", ":", "if", "host", "is", "None", "and", "port", "is", "None", ":", "return", "self", ".", "execute_command", "(", "'SLAVEOF'", ",", "Token", ".", "get_token", "("...
Set the server to be a replicated slave of the instance identified by the ``host`` and ``port``. If called without arguments, the instance is promoted to a master instead.
[ "Set", "the", "server", "to", "be", "a", "replicated", "slave", "of", "the", "instance", "identified", "by", "the", "host", "and", "port", ".", "If", "called", "without", "arguments", "the", "instance", "is", "promoted", "to", "a", "master", "instead", "."...
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L1107-L1116
train
Set the server to be a replicated slave of the instance identified by the host and port.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.bitop
def bitop(self, operation, dest, *keys): """ Perform a bitwise operation using ``operation`` between ``keys`` and store the result in ``dest``. """ return self.execute_command('BITOP', operation, dest, *keys)
python
def bitop(self, operation, dest, *keys): """ Perform a bitwise operation using ``operation`` between ``keys`` and store the result in ``dest``. """ return self.execute_command('BITOP', operation, dest, *keys)
[ "def", "bitop", "(", "self", ",", "operation", ",", "dest", ",", "*", "keys", ")", ":", "return", "self", ".", "execute_command", "(", "'BITOP'", ",", "operation", ",", "dest", ",", "*", "keys", ")" ]
Perform a bitwise operation using ``operation`` between ``keys`` and store the result in ``dest``.
[ "Perform", "a", "bitwise", "operation", "using", "operation", "between", "keys", "and", "store", "the", "result", "in", "dest", "." ]
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L1182-L1187
train
Perform a bitwise operation between keys and store the result in dest.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.bitpos
def bitpos(self, key, bit, start=None, end=None): """ Return the position of the first bit set to 1 or 0 in a string. ``start`` and ``end`` difines search range. The range is interpreted as a range of bytes and not a range of bits, so start=0 and end=2 means to look at the first ...
python
def bitpos(self, key, bit, start=None, end=None): """ Return the position of the first bit set to 1 or 0 in a string. ``start`` and ``end`` difines search range. The range is interpreted as a range of bytes and not a range of bits, so start=0 and end=2 means to look at the first ...
[ "def", "bitpos", "(", "self", ",", "key", ",", "bit", ",", "start", "=", "None", ",", "end", "=", "None", ")", ":", "if", "bit", "not", "in", "(", "0", ",", "1", ")", ":", "raise", "DataError", "(", "'bit must be 0 or 1'", ")", "params", "=", "["...
Return the position of the first bit set to 1 or 0 in a string. ``start`` and ``end`` difines search range. The range is interpreted as a range of bytes and not a range of bits, so start=0 and end=2 means to look at the first three bytes.
[ "Return", "the", "position", "of", "the", "first", "bit", "set", "to", "1", "or", "0", "in", "a", "string", ".", "start", "and", "end", "difines", "search", "range", ".", "The", "range", "is", "interpreted", "as", "a", "range", "of", "bytes", "and", ...
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L1189-L1207
train
Return the position of the first set bit in a string.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.expireat
def expireat(self, name, when): """ Set an expire flag on key ``name``. ``when`` can be represented as an integer indicating unix time or a Python datetime object. """ if isinstance(when, datetime.datetime): when = int(mod_time.mktime(when.timetuple())) return...
python
def expireat(self, name, when): """ Set an expire flag on key ``name``. ``when`` can be represented as an integer indicating unix time or a Python datetime object. """ if isinstance(when, datetime.datetime): when = int(mod_time.mktime(when.timetuple())) return...
[ "def", "expireat", "(", "self", ",", "name", ",", "when", ")", ":", "if", "isinstance", "(", "when", ",", "datetime", ".", "datetime", ")", ":", "when", "=", "int", "(", "mod_time", ".", "mktime", "(", "when", ".", "timetuple", "(", ")", ")", ")", ...
Set an expire flag on key ``name``. ``when`` can be represented as an integer indicating unix time or a Python datetime object.
[ "Set", "an", "expire", "flag", "on", "key", "name", ".", "when", "can", "be", "represented", "as", "an", "integer", "indicating", "unix", "time", "or", "a", "Python", "datetime", "object", "." ]
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L1253-L1260
train
Set an expire flag on key name. When can be represented as an integer indicating unix time. When can be represented as an integer indicating unix time.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.mget
def mget(self, keys, *args): """ Returns a list of values ordered identically to ``keys`` """ args = list_or_args(keys, args) options = {} if not args: options[EMPTY_RESPONSE] = [] return self.execute_command('MGET', *args, **options)
python
def mget(self, keys, *args): """ Returns a list of values ordered identically to ``keys`` """ args = list_or_args(keys, args) options = {} if not args: options[EMPTY_RESPONSE] = [] return self.execute_command('MGET', *args, **options)
[ "def", "mget", "(", "self", ",", "keys", ",", "*", "args", ")", ":", "args", "=", "list_or_args", "(", "keys", ",", "args", ")", "options", "=", "{", "}", "if", "not", "args", ":", "options", "[", "EMPTY_RESPONSE", "]", "=", "[", "]", "return", "...
Returns a list of values ordered identically to ``keys``
[ "Returns", "a", "list", "of", "values", "ordered", "identically", "to", "keys" ]
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L1323-L1331
train
Returns a list of values ordered identically to keys
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.msetnx
def msetnx(self, mapping): """ Sets key/values based on a mapping if none of the keys are already set. Mapping is a dictionary of key/value pairs. Both keys and values should be strings or types that can be cast to a string via str(). Returns a boolean indicating if the operation...
python
def msetnx(self, mapping): """ Sets key/values based on a mapping if none of the keys are already set. Mapping is a dictionary of key/value pairs. Both keys and values should be strings or types that can be cast to a string via str(). Returns a boolean indicating if the operation...
[ "def", "msetnx", "(", "self", ",", "mapping", ")", ":", "items", "=", "[", "]", "for", "pair", "in", "iteritems", "(", "mapping", ")", ":", "items", ".", "extend", "(", "pair", ")", "return", "self", ".", "execute_command", "(", "'MSETNX'", ",", "*",...
Sets key/values based on a mapping if none of the keys are already set. Mapping is a dictionary of key/value pairs. Both keys and values should be strings or types that can be cast to a string via str(). Returns a boolean indicating if the operation was successful.
[ "Sets", "key", "/", "values", "based", "on", "a", "mapping", "if", "none", "of", "the", "keys", "are", "already", "set", ".", "Mapping", "is", "a", "dictionary", "of", "key", "/", "value", "pairs", ".", "Both", "keys", "and", "values", "should", "be", ...
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L1344-L1354
train
Sets the key - value pairs for the specified key - value pairs.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.pexpire
def pexpire(self, name, time): """ Set an expire flag on key ``name`` for ``time`` milliseconds. ``time`` can be represented by an integer or a Python timedelta object. """ if isinstance(time, datetime.timedelta): time = int(time.total_seconds() * 1000) ...
python
def pexpire(self, name, time): """ Set an expire flag on key ``name`` for ``time`` milliseconds. ``time`` can be represented by an integer or a Python timedelta object. """ if isinstance(time, datetime.timedelta): time = int(time.total_seconds() * 1000) ...
[ "def", "pexpire", "(", "self", ",", "name", ",", "time", ")", ":", "if", "isinstance", "(", "time", ",", "datetime", ".", "timedelta", ")", ":", "time", "=", "int", "(", "time", ".", "total_seconds", "(", ")", "*", "1000", ")", "return", "self", "....
Set an expire flag on key ``name`` for ``time`` milliseconds. ``time`` can be represented by an integer or a Python timedelta object.
[ "Set", "an", "expire", "flag", "on", "key", "name", "for", "time", "milliseconds", ".", "time", "can", "be", "represented", "by", "an", "integer", "or", "a", "Python", "timedelta", "object", "." ]
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L1364-L1372
train
Set an expire flag on key name for time milliseconds.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.pexpireat
def pexpireat(self, name, when): """ Set an expire flag on key ``name``. ``when`` can be represented as an integer representing unix time in milliseconds (unix time * 1000) or a Python datetime object. """ if isinstance(when, datetime.datetime): ms = int(when....
python
def pexpireat(self, name, when): """ Set an expire flag on key ``name``. ``when`` can be represented as an integer representing unix time in milliseconds (unix time * 1000) or a Python datetime object. """ if isinstance(when, datetime.datetime): ms = int(when....
[ "def", "pexpireat", "(", "self", ",", "name", ",", "when", ")", ":", "if", "isinstance", "(", "when", ",", "datetime", ".", "datetime", ")", ":", "ms", "=", "int", "(", "when", ".", "microsecond", "/", "1000", ")", "when", "=", "int", "(", "mod_tim...
Set an expire flag on key ``name``. ``when`` can be represented as an integer representing unix time in milliseconds (unix time * 1000) or a Python datetime object.
[ "Set", "an", "expire", "flag", "on", "key", "name", ".", "when", "can", "be", "represented", "as", "an", "integer", "representing", "unix", "time", "in", "milliseconds", "(", "unix", "time", "*", "1000", ")", "or", "a", "Python", "datetime", "object", "....
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L1374-L1383
train
Set an expire flag on key name when time. When can be represented as an integer representing unix time in milliseconds.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.psetex
def psetex(self, name, time_ms, value): """ Set the value of key ``name`` to ``value`` that expires in ``time_ms`` milliseconds. ``time_ms`` can be represented by an integer or a Python timedelta object """ if isinstance(time_ms, datetime.timedelta): time_ms =...
python
def psetex(self, name, time_ms, value): """ Set the value of key ``name`` to ``value`` that expires in ``time_ms`` milliseconds. ``time_ms`` can be represented by an integer or a Python timedelta object """ if isinstance(time_ms, datetime.timedelta): time_ms =...
[ "def", "psetex", "(", "self", ",", "name", ",", "time_ms", ",", "value", ")", ":", "if", "isinstance", "(", "time_ms", ",", "datetime", ".", "timedelta", ")", ":", "time_ms", "=", "int", "(", "time_ms", ".", "total_seconds", "(", ")", "*", "1000", ")...
Set the value of key ``name`` to ``value`` that expires in ``time_ms`` milliseconds. ``time_ms`` can be represented by an integer or a Python timedelta object
[ "Set", "the", "value", "of", "key", "name", "to", "value", "that", "expires", "in", "time_ms", "milliseconds", ".", "time_ms", "can", "be", "represented", "by", "an", "integer", "or", "a", "Python", "timedelta", "object" ]
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L1385-L1393
train
Set the value of key name to value that expires in time_ms milliseconds.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.restore
def restore(self, name, ttl, value, replace=False): """ Create a key using the provided serialized value, previously obtained using DUMP. """ params = [name, ttl, value] if replace: params.append('REPLACE') return self.execute_command('RESTORE', *param...
python
def restore(self, name, ttl, value, replace=False): """ Create a key using the provided serialized value, previously obtained using DUMP. """ params = [name, ttl, value] if replace: params.append('REPLACE') return self.execute_command('RESTORE', *param...
[ "def", "restore", "(", "self", ",", "name", ",", "ttl", ",", "value", ",", "replace", "=", "False", ")", ":", "params", "=", "[", "name", ",", "ttl", ",", "value", "]", "if", "replace", ":", "params", ".", "append", "(", "'REPLACE'", ")", "return",...
Create a key using the provided serialized value, previously obtained using DUMP.
[ "Create", "a", "key", "using", "the", "provided", "serialized", "value", "previously", "obtained", "using", "DUMP", "." ]
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L1413-L1421
train
Restores a key from the given serialized value.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.set
def set(self, name, value, ex=None, px=None, nx=False, xx=False): """ Set the value at key ``name`` to ``value`` ``ex`` sets an expire flag on key ``name`` for ``ex`` seconds. ``px`` sets an expire flag on key ``name`` for ``px`` milliseconds. ``nx`` if set to True, set the va...
python
def set(self, name, value, ex=None, px=None, nx=False, xx=False): """ Set the value at key ``name`` to ``value`` ``ex`` sets an expire flag on key ``name`` for ``ex`` seconds. ``px`` sets an expire flag on key ``name`` for ``px`` milliseconds. ``nx`` if set to True, set the va...
[ "def", "set", "(", "self", ",", "name", ",", "value", ",", "ex", "=", "None", ",", "px", "=", "None", ",", "nx", "=", "False", ",", "xx", "=", "False", ")", ":", "pieces", "=", "[", "name", ",", "value", "]", "if", "ex", "is", "not", "None", ...
Set the value at key ``name`` to ``value`` ``ex`` sets an expire flag on key ``name`` for ``ex`` seconds. ``px`` sets an expire flag on key ``name`` for ``px`` milliseconds. ``nx`` if set to True, set the value at key ``name`` to ``value`` only if it does not exist. ``xx`...
[ "Set", "the", "value", "at", "key", "name", "to", "value" ]
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L1423-L1453
train
Set the value at key name to value.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.setbit
def setbit(self, name, offset, value): """ Flag the ``offset`` in ``name`` as ``value``. Returns a boolean indicating the previous value of ``offset``. """ value = value and 1 or 0 return self.execute_command('SETBIT', name, offset, value)
python
def setbit(self, name, offset, value): """ Flag the ``offset`` in ``name`` as ``value``. Returns a boolean indicating the previous value of ``offset``. """ value = value and 1 or 0 return self.execute_command('SETBIT', name, offset, value)
[ "def", "setbit", "(", "self", ",", "name", ",", "offset", ",", "value", ")", ":", "value", "=", "value", "and", "1", "or", "0", "return", "self", ".", "execute_command", "(", "'SETBIT'", ",", "name", ",", "offset", ",", "value", ")" ]
Flag the ``offset`` in ``name`` as ``value``. Returns a boolean indicating the previous value of ``offset``.
[ "Flag", "the", "offset", "in", "name", "as", "value", ".", "Returns", "a", "boolean", "indicating", "the", "previous", "value", "of", "offset", "." ]
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L1458-L1464
train
Set the value of the bit at offset in name to value.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.setex
def setex(self, name, time, value): """ Set the value of key ``name`` to ``value`` that expires in ``time`` seconds. ``time`` can be represented by an integer or a Python timedelta object. """ if isinstance(time, datetime.timedelta): time = int(time.total_seco...
python
def setex(self, name, time, value): """ Set the value of key ``name`` to ``value`` that expires in ``time`` seconds. ``time`` can be represented by an integer or a Python timedelta object. """ if isinstance(time, datetime.timedelta): time = int(time.total_seco...
[ "def", "setex", "(", "self", ",", "name", ",", "time", ",", "value", ")", ":", "if", "isinstance", "(", "time", ",", "datetime", ".", "timedelta", ")", ":", "time", "=", "int", "(", "time", ".", "total_seconds", "(", ")", ")", "return", "self", "."...
Set the value of key ``name`` to ``value`` that expires in ``time`` seconds. ``time`` can be represented by an integer or a Python timedelta object.
[ "Set", "the", "value", "of", "key", "name", "to", "value", "that", "expires", "in", "time", "seconds", ".", "time", "can", "be", "represented", "by", "an", "integer", "or", "a", "Python", "timedelta", "object", "." ]
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L1466-L1474
train
Set the value of key name to value that expires in time.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.setrange
def setrange(self, name, offset, value): """ Overwrite bytes in the value of ``name`` starting at ``offset`` with ``value``. If ``offset`` plus the length of ``value`` exceeds the length of the original value, the new value will be larger than before. If ``offset`` exceeds the le...
python
def setrange(self, name, offset, value): """ Overwrite bytes in the value of ``name`` starting at ``offset`` with ``value``. If ``offset`` plus the length of ``value`` exceeds the length of the original value, the new value will be larger than before. If ``offset`` exceeds the le...
[ "def", "setrange", "(", "self", ",", "name", ",", "offset", ",", "value", ")", ":", "return", "self", ".", "execute_command", "(", "'SETRANGE'", ",", "name", ",", "offset", ",", "value", ")" ]
Overwrite bytes in the value of ``name`` starting at ``offset`` with ``value``. If ``offset`` plus the length of ``value`` exceeds the length of the original value, the new value will be larger than before. If ``offset`` exceeds the length of the original value, null bytes will be used t...
[ "Overwrite", "bytes", "in", "the", "value", "of", "name", "starting", "at", "offset", "with", "value", ".", "If", "offset", "plus", "the", "length", "of", "value", "exceeds", "the", "length", "of", "the", "original", "value", "the", "new", "value", "will",...
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L1480-L1491
train
Set the value of the key name to value starting at offset.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.blpop
def blpop(self, keys, timeout=0): """ LPOP a value off of the first non-empty list named in the ``keys`` list. If none of the lists in ``keys`` has a value to LPOP, then block for ``timeout`` seconds, or until a value gets pushed on to one of the lists. If timeo...
python
def blpop(self, keys, timeout=0): """ LPOP a value off of the first non-empty list named in the ``keys`` list. If none of the lists in ``keys`` has a value to LPOP, then block for ``timeout`` seconds, or until a value gets pushed on to one of the lists. If timeo...
[ "def", "blpop", "(", "self", ",", "keys", ",", "timeout", "=", "0", ")", ":", "if", "timeout", "is", "None", ":", "timeout", "=", "0", "keys", "=", "list_or_args", "(", "keys", ",", "None", ")", "keys", ".", "append", "(", "timeout", ")", "return",...
LPOP a value off of the first non-empty list named in the ``keys`` list. If none of the lists in ``keys`` has a value to LPOP, then block for ``timeout`` seconds, or until a value gets pushed on to one of the lists. If timeout is 0, then block indefinitely.
[ "LPOP", "a", "value", "off", "of", "the", "first", "non", "-", "empty", "list", "named", "in", "the", "keys", "list", "." ]
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L1537-L1552
train
Pops and returns the first element of the list named in keys. If timeout is not specified then block indefinitely for timeout seconds.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.brpop
def brpop(self, keys, timeout=0): """ RPOP a value off of the first non-empty list named in the ``keys`` list. If none of the lists in ``keys`` has a value to RPOP, then block for ``timeout`` seconds, or until a value gets pushed on to one of the lists. If timeo...
python
def brpop(self, keys, timeout=0): """ RPOP a value off of the first non-empty list named in the ``keys`` list. If none of the lists in ``keys`` has a value to RPOP, then block for ``timeout`` seconds, or until a value gets pushed on to one of the lists. If timeo...
[ "def", "brpop", "(", "self", ",", "keys", ",", "timeout", "=", "0", ")", ":", "if", "timeout", "is", "None", ":", "timeout", "=", "0", "keys", "=", "list_or_args", "(", "keys", ",", "None", ")", "keys", ".", "append", "(", "timeout", ")", "return",...
RPOP a value off of the first non-empty list named in the ``keys`` list. If none of the lists in ``keys`` has a value to RPOP, then block for ``timeout`` seconds, or until a value gets pushed on to one of the lists. If timeout is 0, then block indefinitely.
[ "RPOP", "a", "value", "off", "of", "the", "first", "non", "-", "empty", "list", "named", "in", "the", "keys", "list", "." ]
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L1554-L1569
train
Pops and returns the first element of the list named in keys. If timeout is not specified then block indefinitely for timeout seconds.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.lrange
def lrange(self, name, start, end): """ Return a slice of the list ``name`` between position ``start`` and ``end`` ``start`` and ``end`` can be negative numbers just like Python slicing notation """ return self.execute_command('LRANGE', name, start, end)
python
def lrange(self, name, start, end): """ Return a slice of the list ``name`` between position ``start`` and ``end`` ``start`` and ``end`` can be negative numbers just like Python slicing notation """ return self.execute_command('LRANGE', name, start, end)
[ "def", "lrange", "(", "self", ",", "name", ",", "start", ",", "end", ")", ":", "return", "self", ".", "execute_command", "(", "'LRANGE'", ",", "name", ",", "start", ",", "end", ")" ]
Return a slice of the list ``name`` between position ``start`` and ``end`` ``start`` and ``end`` can be negative numbers just like Python slicing notation
[ "Return", "a", "slice", "of", "the", "list", "name", "between", "position", "start", "and", "end" ]
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L1619-L1627
train
Return a slice of the list name between start and end
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.lrem
def lrem(self, name, count, value): """ Remove the first ``count`` occurrences of elements equal to ``value`` from the list stored at ``name``. The count argument influences the operation in the following ways: count > 0: Remove elements equal to value moving from head to ta...
python
def lrem(self, name, count, value): """ Remove the first ``count`` occurrences of elements equal to ``value`` from the list stored at ``name``. The count argument influences the operation in the following ways: count > 0: Remove elements equal to value moving from head to ta...
[ "def", "lrem", "(", "self", ",", "name", ",", "count", ",", "value", ")", ":", "return", "self", ".", "execute_command", "(", "'LREM'", ",", "name", ",", "count", ",", "value", ")" ]
Remove the first ``count`` occurrences of elements equal to ``value`` from the list stored at ``name``. The count argument influences the operation in the following ways: count > 0: Remove elements equal to value moving from head to tail. count < 0: Remove elements equal to valu...
[ "Remove", "the", "first", "count", "occurrences", "of", "elements", "equal", "to", "value", "from", "the", "list", "stored", "at", "name", "." ]
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L1629-L1639
train
Remove the first count occurrences of elements equal to value from the list stored at name.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.lset
def lset(self, name, index, value): "Set ``position`` of list ``name`` to ``value``" return self.execute_command('LSET', name, index, value)
python
def lset(self, name, index, value): "Set ``position`` of list ``name`` to ``value``" return self.execute_command('LSET', name, index, value)
[ "def", "lset", "(", "self", ",", "name", ",", "index", ",", "value", ")", ":", "return", "self", ".", "execute_command", "(", "'LSET'", ",", "name", ",", "index", ",", "value", ")" ]
Set ``position`` of list ``name`` to ``value``
[ "Set", "position", "of", "list", "name", "to", "value" ]
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L1641-L1643
train
Set position of list name to value
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.sort
def sort(self, name, start=None, num=None, by=None, get=None, desc=False, alpha=False, store=None, groups=False): """ Sort and return the list, set or sorted set at ``name``. ``start`` and ``num`` allow for paging through the sorted data ``by`` allows using an external key...
python
def sort(self, name, start=None, num=None, by=None, get=None, desc=False, alpha=False, store=None, groups=False): """ Sort and return the list, set or sorted set at ``name``. ``start`` and ``num`` allow for paging through the sorted data ``by`` allows using an external key...
[ "def", "sort", "(", "self", ",", "name", ",", "start", "=", "None", ",", "num", "=", "None", ",", "by", "=", "None", ",", "get", "=", "None", ",", "desc", "=", "False", ",", "alpha", "=", "False", ",", "store", "=", "None", ",", "groups", "=", ...
Sort and return the list, set or sorted set at ``name``. ``start`` and ``num`` allow for paging through the sorted data ``by`` allows using an external key to weight and sort the items. Use an "*" to indicate where in the key the item value is located ``get`` allows for returning ...
[ "Sort", "and", "return", "the", "list", "set", "or", "sorted", "set", "at", "name", "." ]
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L1674-L1739
train
Sort and return the list set or sorted set at name.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.scan
def scan(self, cursor=0, match=None, count=None): """ Incrementally return lists of key names. Also return a cursor indicating the scan position. ``match`` allows for filtering the keys by pattern ``count`` allows for hint the minimum number of returns """ piece...
python
def scan(self, cursor=0, match=None, count=None): """ Incrementally return lists of key names. Also return a cursor indicating the scan position. ``match`` allows for filtering the keys by pattern ``count`` allows for hint the minimum number of returns """ piece...
[ "def", "scan", "(", "self", ",", "cursor", "=", "0", ",", "match", "=", "None", ",", "count", "=", "None", ")", ":", "pieces", "=", "[", "cursor", "]", "if", "match", "is", "not", "None", ":", "pieces", ".", "extend", "(", "[", "Token", ".", "g...
Incrementally return lists of key names. Also return a cursor indicating the scan position. ``match`` allows for filtering the keys by pattern ``count`` allows for hint the minimum number of returns
[ "Incrementally", "return", "lists", "of", "key", "names", ".", "Also", "return", "a", "cursor", "indicating", "the", "scan", "position", "." ]
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L1742-L1756
train
Incrementally return lists of key names. Also return a cursor indicating the scan position.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.scan_iter
def scan_iter(self, match=None, count=None): """ Make an iterator using the SCAN command so that the client doesn't need to remember the cursor position. ``match`` allows for filtering the keys by pattern ``count`` allows for hint the minimum number of returns """ ...
python
def scan_iter(self, match=None, count=None): """ Make an iterator using the SCAN command so that the client doesn't need to remember the cursor position. ``match`` allows for filtering the keys by pattern ``count`` allows for hint the minimum number of returns """ ...
[ "def", "scan_iter", "(", "self", ",", "match", "=", "None", ",", "count", "=", "None", ")", ":", "cursor", "=", "'0'", "while", "cursor", "!=", "0", ":", "cursor", ",", "data", "=", "self", ".", "scan", "(", "cursor", "=", "cursor", ",", "match", ...
Make an iterator using the SCAN command so that the client doesn't need to remember the cursor position. ``match`` allows for filtering the keys by pattern ``count`` allows for hint the minimum number of returns
[ "Make", "an", "iterator", "using", "the", "SCAN", "command", "so", "that", "the", "client", "doesn", "t", "need", "to", "remember", "the", "cursor", "position", "." ]
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L1758-L1771
train
Return an iterator over the items in the cache for the specified pattern and number of returns.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.sscan
def sscan(self, name, cursor=0, match=None, count=None): """ Incrementally return lists of elements in a set. Also return a cursor indicating the scan position. ``match`` allows for filtering the keys by pattern ``count`` allows for hint the minimum number of returns ""...
python
def sscan(self, name, cursor=0, match=None, count=None): """ Incrementally return lists of elements in a set. Also return a cursor indicating the scan position. ``match`` allows for filtering the keys by pattern ``count`` allows for hint the minimum number of returns ""...
[ "def", "sscan", "(", "self", ",", "name", ",", "cursor", "=", "0", ",", "match", "=", "None", ",", "count", "=", "None", ")", ":", "pieces", "=", "[", "name", ",", "cursor", "]", "if", "match", "is", "not", "None", ":", "pieces", ".", "extend", ...
Incrementally return lists of elements in a set. Also return a cursor indicating the scan position. ``match`` allows for filtering the keys by pattern ``count`` allows for hint the minimum number of returns
[ "Incrementally", "return", "lists", "of", "elements", "in", "a", "set", ".", "Also", "return", "a", "cursor", "indicating", "the", "scan", "position", "." ]
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L1773-L1787
train
Incrementally return lists of elements in a set. Also return a cursor indicating the scan position.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.zscan
def zscan(self, name, cursor=0, match=None, count=None, score_cast_func=float): """ Incrementally return lists of elements in a sorted set. Also return a cursor indicating the scan position. ``match`` allows for filtering the keys by pattern ``count`` allows for h...
python
def zscan(self, name, cursor=0, match=None, count=None, score_cast_func=float): """ Incrementally return lists of elements in a sorted set. Also return a cursor indicating the scan position. ``match`` allows for filtering the keys by pattern ``count`` allows for h...
[ "def", "zscan", "(", "self", ",", "name", ",", "cursor", "=", "0", ",", "match", "=", "None", ",", "count", "=", "None", ",", "score_cast_func", "=", "float", ")", ":", "pieces", "=", "[", "name", ",", "cursor", "]", "if", "match", "is", "not", "...
Incrementally return lists of elements in a sorted set. Also return a cursor indicating the scan position. ``match`` allows for filtering the keys by pattern ``count`` allows for hint the minimum number of returns ``score_cast_func`` a callable used to cast the score return value
[ "Incrementally", "return", "lists", "of", "elements", "in", "a", "sorted", "set", ".", "Also", "return", "a", "cursor", "indicating", "the", "scan", "position", "." ]
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L1837-L1855
train
Incrementally return lists of elements in a sorted set. Also return a cursor indicating the scan position.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.smove
def smove(self, src, dst, value): "Move ``value`` from set ``src`` to set ``dst`` atomically" return self.execute_command('SMOVE', src, dst, value)
python
def smove(self, src, dst, value): "Move ``value`` from set ``src`` to set ``dst`` atomically" return self.execute_command('SMOVE', src, dst, value)
[ "def", "smove", "(", "self", ",", "src", ",", "dst", ",", "value", ")", ":", "return", "self", ".", "execute_command", "(", "'SMOVE'", ",", "src", ",", "dst", ",", "value", ")" ]
Move ``value`` from set ``src`` to set ``dst`` atomically
[ "Move", "value", "from", "set", "src", "to", "set", "dst", "atomically" ]
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L1920-L1922
train
Move value from set src to set dst atomically
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.spop
def spop(self, name, count=None): "Remove and return a random member of set ``name``" args = (count is not None) and [count] or [] return self.execute_command('SPOP', name, *args)
python
def spop(self, name, count=None): "Remove and return a random member of set ``name``" args = (count is not None) and [count] or [] return self.execute_command('SPOP', name, *args)
[ "def", "spop", "(", "self", ",", "name", ",", "count", "=", "None", ")", ":", "args", "=", "(", "count", "is", "not", "None", ")", "and", "[", "count", "]", "or", "[", "]", "return", "self", ".", "execute_command", "(", "'SPOP'", ",", "name", ","...
Remove and return a random member of set ``name``
[ "Remove", "and", "return", "a", "random", "member", "of", "set", "name" ]
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L1924-L1927
train
Remove and return a random member of set name
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.xack
def xack(self, name, groupname, *ids): """ Acknowledges the successful processing of one or more messages. name: name of the stream. groupname: name of the consumer group. *ids: message ids to acknowlege. """ return self.execute_command('XACK', name, groupname, *i...
python
def xack(self, name, groupname, *ids): """ Acknowledges the successful processing of one or more messages. name: name of the stream. groupname: name of the consumer group. *ids: message ids to acknowlege. """ return self.execute_command('XACK', name, groupname, *i...
[ "def", "xack", "(", "self", ",", "name", ",", "groupname", ",", "*", "ids", ")", ":", "return", "self", ".", "execute_command", "(", "'XACK'", ",", "name", ",", "groupname", ",", "*", "ids", ")" ]
Acknowledges the successful processing of one or more messages. name: name of the stream. groupname: name of the consumer group. *ids: message ids to acknowlege.
[ "Acknowledges", "the", "successful", "processing", "of", "one", "or", "more", "messages", ".", "name", ":", "name", "of", "the", "stream", ".", "groupname", ":", "name", "of", "the", "consumer", "group", ".", "*", "ids", ":", "message", "ids", "to", "ack...
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L1958-L1965
train
Acknowledges the successful processing of one or more messages.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.xadd
def xadd(self, name, fields, id='*', maxlen=None, approximate=True): """ Add to a stream. name: name of the stream fields: dict of field/value pairs to insert into the stream id: Location to insert this record. By default it is appended. maxlen: truncate old stream member...
python
def xadd(self, name, fields, id='*', maxlen=None, approximate=True): """ Add to a stream. name: name of the stream fields: dict of field/value pairs to insert into the stream id: Location to insert this record. By default it is appended. maxlen: truncate old stream member...
[ "def", "xadd", "(", "self", ",", "name", ",", "fields", ",", "id", "=", "'*'", ",", "maxlen", "=", "None", ",", "approximate", "=", "True", ")", ":", "pieces", "=", "[", "]", "if", "maxlen", "is", "not", "None", ":", "if", "not", "isinstance", "(...
Add to a stream. name: name of the stream fields: dict of field/value pairs to insert into the stream id: Location to insert this record. By default it is appended. maxlen: truncate old stream members beyond this size approximate: actual stream length may be slightly more than ma...
[ "Add", "to", "a", "stream", ".", "name", ":", "name", "of", "the", "stream", "fields", ":", "dict", "of", "field", "/", "value", "pairs", "to", "insert", "into", "the", "stream", "id", ":", "Location", "to", "insert", "this", "record", ".", "By", "de...
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L1967-L1990
train
Add a new entry to a stream.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.xclaim
def xclaim(self, name, groupname, consumername, min_idle_time, message_ids, idle=None, time=None, retrycount=None, force=False, justid=False): """ Changes the ownership of a pending message. name: name of the stream. groupname: name of the consumer group. ...
python
def xclaim(self, name, groupname, consumername, min_idle_time, message_ids, idle=None, time=None, retrycount=None, force=False, justid=False): """ Changes the ownership of a pending message. name: name of the stream. groupname: name of the consumer group. ...
[ "def", "xclaim", "(", "self", ",", "name", ",", "groupname", ",", "consumername", ",", "min_idle_time", ",", "message_ids", ",", "idle", "=", "None", ",", "time", "=", "None", ",", "retrycount", "=", "None", ",", "force", "=", "False", ",", "justid", "...
Changes the ownership of a pending message. name: name of the stream. groupname: name of the consumer group. consumername: name of a consumer that claims the message. min_idle_time: filter messages that were idle less than this amount of milliseconds message_ids: non-empt...
[ "Changes", "the", "ownership", "of", "a", "pending", "message", ".", "name", ":", "name", "of", "the", "stream", ".", "groupname", ":", "name", "of", "the", "consumer", "group", ".", "consumername", ":", "name", "of", "a", "consumer", "that", "claims", "...
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L1992-L2050
train
This method is used to claim a pending message in a consumer group.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.xgroup_create
def xgroup_create(self, name, groupname, id='$', mkstream=False): """ Create a new consumer group associated with a stream. name: name of the stream. groupname: name of the consumer group. id: ID of the last item in the stream to consider already delivered. """ pi...
python
def xgroup_create(self, name, groupname, id='$', mkstream=False): """ Create a new consumer group associated with a stream. name: name of the stream. groupname: name of the consumer group. id: ID of the last item in the stream to consider already delivered. """ pi...
[ "def", "xgroup_create", "(", "self", ",", "name", ",", "groupname", ",", "id", "=", "'$'", ",", "mkstream", "=", "False", ")", ":", "pieces", "=", "[", "'XGROUP CREATE'", ",", "name", ",", "groupname", ",", "id", "]", "if", "mkstream", ":", "pieces", ...
Create a new consumer group associated with a stream. name: name of the stream. groupname: name of the consumer group. id: ID of the last item in the stream to consider already delivered.
[ "Create", "a", "new", "consumer", "group", "associated", "with", "a", "stream", ".", "name", ":", "name", "of", "the", "stream", ".", "groupname", ":", "name", "of", "the", "consumer", "group", ".", "id", ":", "ID", "of", "the", "last", "item", "in", ...
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L2060-L2070
train
Create a new consumer group associated with a stream.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.xgroup_delconsumer
def xgroup_delconsumer(self, name, groupname, consumername): """ Remove a specific consumer from a consumer group. Returns the number of pending messages that the consumer had before it was deleted. name: name of the stream. groupname: name of the consumer group. ...
python
def xgroup_delconsumer(self, name, groupname, consumername): """ Remove a specific consumer from a consumer group. Returns the number of pending messages that the consumer had before it was deleted. name: name of the stream. groupname: name of the consumer group. ...
[ "def", "xgroup_delconsumer", "(", "self", ",", "name", ",", "groupname", ",", "consumername", ")", ":", "return", "self", ".", "execute_command", "(", "'XGROUP DELCONSUMER'", ",", "name", ",", "groupname", ",", "consumername", ")" ]
Remove a specific consumer from a consumer group. Returns the number of pending messages that the consumer had before it was deleted. name: name of the stream. groupname: name of the consumer group. consumername: name of consumer to delete
[ "Remove", "a", "specific", "consumer", "from", "a", "consumer", "group", ".", "Returns", "the", "number", "of", "pending", "messages", "that", "the", "consumer", "had", "before", "it", "was", "deleted", ".", "name", ":", "name", "of", "the", "stream", ".",...
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L2072-L2082
train
Remove a specific consumer from a consumer group.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.xgroup_setid
def xgroup_setid(self, name, groupname, id): """ Set the consumer group last delivered ID to something else. name: name of the stream. groupname: name of the consumer group. id: ID of the last item in the stream to consider already delivered. """ return self.execu...
python
def xgroup_setid(self, name, groupname, id): """ Set the consumer group last delivered ID to something else. name: name of the stream. groupname: name of the consumer group. id: ID of the last item in the stream to consider already delivered. """ return self.execu...
[ "def", "xgroup_setid", "(", "self", ",", "name", ",", "groupname", ",", "id", ")", ":", "return", "self", ".", "execute_command", "(", "'XGROUP SETID'", ",", "name", ",", "groupname", ",", "id", ")" ]
Set the consumer group last delivered ID to something else. name: name of the stream. groupname: name of the consumer group. id: ID of the last item in the stream to consider already delivered.
[ "Set", "the", "consumer", "group", "last", "delivered", "ID", "to", "something", "else", ".", "name", ":", "name", "of", "the", "stream", ".", "groupname", ":", "name", "of", "the", "consumer", "group", ".", "id", ":", "ID", "of", "the", "last", "item"...
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L2092-L2099
train
Set the last item in the consumer group to something else.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
andymccurdy/redis-py
redis/client.py
Redis.xpending_range
def xpending_range(self, name, groupname, min, max, count, consumername=None): """ Returns information about pending messages, in a range. name: name of the stream. groupname: name of the consumer group. min: minimum stream ID. max: maximum stream I...
python
def xpending_range(self, name, groupname, min, max, count, consumername=None): """ Returns information about pending messages, in a range. name: name of the stream. groupname: name of the consumer group. min: minimum stream ID. max: maximum stream I...
[ "def", "xpending_range", "(", "self", ",", "name", ",", "groupname", ",", "min", ",", "max", ",", "count", ",", "consumername", "=", "None", ")", ":", "pieces", "=", "[", "name", ",", "groupname", "]", "if", "min", "is", "not", "None", "or", "max", ...
Returns information about pending messages, in a range. name: name of the stream. groupname: name of the consumer group. min: minimum stream ID. max: maximum stream ID. count: number of messages to return consumername: name of a consumer to filter by (optional).
[ "Returns", "information", "about", "pending", "messages", "in", "a", "range", ".", "name", ":", "name", "of", "the", "stream", ".", "groupname", ":", "name", "of", "the", "consumer", "group", ".", "min", ":", "minimum", "stream", "ID", ".", "max", ":", ...
cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db
https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/client.py#L2137-L2162
train
Returns information about pending messages in a range.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...