partition
stringclasses
3 values
func_name
stringlengths
1
134
docstring
stringlengths
1
46.9k
path
stringlengths
4
223
original_string
stringlengths
75
104k
code
stringlengths
75
104k
docstring_tokens
listlengths
1
1.97k
repo
stringlengths
7
55
language
stringclasses
1 value
url
stringlengths
87
315
code_tokens
listlengths
19
28.4k
sha
stringlengths
40
40
test
ContainerRegistryManagementClient.replications
Instance depends on the API version: * 2017-10-01: :class:`ReplicationsOperations<azure.mgmt.containerregistry.v2017_10_01.operations.ReplicationsOperations>` * 2018-02-01-preview: :class:`ReplicationsOperations<azure.mgmt.containerregistry.v2018_02_01_preview.operations.ReplicationsOperations>` ...
azure-mgmt-containerregistry/azure/mgmt/containerregistry/container_registry_management_client.py
def replications(self): """Instance depends on the API version: * 2017-10-01: :class:`ReplicationsOperations<azure.mgmt.containerregistry.v2017_10_01.operations.ReplicationsOperations>` * 2018-02-01-preview: :class:`ReplicationsOperations<azure.mgmt.containerregistry.v2018_02_01_preview.o...
def replications(self): """Instance depends on the API version: * 2017-10-01: :class:`ReplicationsOperations<azure.mgmt.containerregistry.v2017_10_01.operations.ReplicationsOperations>` * 2018-02-01-preview: :class:`ReplicationsOperations<azure.mgmt.containerregistry.v2018_02_01_preview.o...
[ "Instance", "depends", "on", "the", "API", "version", ":" ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-mgmt-containerregistry/azure/mgmt/containerregistry/container_registry_management_client.py#L201-L217
[ "def", "replications", "(", "self", ")", ":", "api_version", "=", "self", ".", "_get_api_version", "(", "'replications'", ")", "if", "api_version", "==", "'2017-10-01'", ":", "from", ".", "v2017_10_01", ".", "operations", "import", "ReplicationsOperations", "as", ...
d7306fde32f60a293a7567678692bdad31e4b667
test
ContainerRegistryManagementClient.runs
Instance depends on the API version: * 2018-09-01: :class:`RunsOperations<azure.mgmt.containerregistry.v2018_09_01.operations.RunsOperations>`
azure-mgmt-containerregistry/azure/mgmt/containerregistry/container_registry_management_client.py
def runs(self): """Instance depends on the API version: * 2018-09-01: :class:`RunsOperations<azure.mgmt.containerregistry.v2018_09_01.operations.RunsOperations>` """ api_version = self._get_api_version('runs') if api_version == '2018-09-01': from .v2018_09_01.oper...
def runs(self): """Instance depends on the API version: * 2018-09-01: :class:`RunsOperations<azure.mgmt.containerregistry.v2018_09_01.operations.RunsOperations>` """ api_version = self._get_api_version('runs') if api_version == '2018-09-01': from .v2018_09_01.oper...
[ "Instance", "depends", "on", "the", "API", "version", ":" ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-mgmt-containerregistry/azure/mgmt/containerregistry/container_registry_management_client.py#L220-L230
[ "def", "runs", "(", "self", ")", ":", "api_version", "=", "self", ".", "_get_api_version", "(", "'runs'", ")", "if", "api_version", "==", "'2018-09-01'", ":", "from", ".", "v2018_09_01", ".", "operations", "import", "RunsOperations", "as", "OperationClass", "e...
d7306fde32f60a293a7567678692bdad31e4b667
test
ContainerRegistryManagementClient.tasks
Instance depends on the API version: * 2018-09-01: :class:`TasksOperations<azure.mgmt.containerregistry.v2018_09_01.operations.TasksOperations>`
azure-mgmt-containerregistry/azure/mgmt/containerregistry/container_registry_management_client.py
def tasks(self): """Instance depends on the API version: * 2018-09-01: :class:`TasksOperations<azure.mgmt.containerregistry.v2018_09_01.operations.TasksOperations>` """ api_version = self._get_api_version('tasks') if api_version == '2018-09-01': from .v2018_09_01....
def tasks(self): """Instance depends on the API version: * 2018-09-01: :class:`TasksOperations<azure.mgmt.containerregistry.v2018_09_01.operations.TasksOperations>` """ api_version = self._get_api_version('tasks') if api_version == '2018-09-01': from .v2018_09_01....
[ "Instance", "depends", "on", "the", "API", "version", ":" ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-mgmt-containerregistry/azure/mgmt/containerregistry/container_registry_management_client.py#L233-L243
[ "def", "tasks", "(", "self", ")", ":", "api_version", "=", "self", ".", "_get_api_version", "(", "'tasks'", ")", "if", "api_version", "==", "'2018-09-01'", ":", "from", ".", "v2018_09_01", ".", "operations", "import", "TasksOperations", "as", "OperationClass", ...
d7306fde32f60a293a7567678692bdad31e4b667
test
ContainerRegistryManagementClient.webhooks
Instance depends on the API version: * 2017-10-01: :class:`WebhooksOperations<azure.mgmt.containerregistry.v2017_10_01.operations.WebhooksOperations>` * 2018-02-01-preview: :class:`WebhooksOperations<azure.mgmt.containerregistry.v2018_02_01_preview.operations.WebhooksOperations>` * 201...
azure-mgmt-containerregistry/azure/mgmt/containerregistry/container_registry_management_client.py
def webhooks(self): """Instance depends on the API version: * 2017-10-01: :class:`WebhooksOperations<azure.mgmt.containerregistry.v2017_10_01.operations.WebhooksOperations>` * 2018-02-01-preview: :class:`WebhooksOperations<azure.mgmt.containerregistry.v2018_02_01_preview.operations.Webhoo...
def webhooks(self): """Instance depends on the API version: * 2017-10-01: :class:`WebhooksOperations<azure.mgmt.containerregistry.v2017_10_01.operations.WebhooksOperations>` * 2018-02-01-preview: :class:`WebhooksOperations<azure.mgmt.containerregistry.v2018_02_01_preview.operations.Webhoo...
[ "Instance", "depends", "on", "the", "API", "version", ":" ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-mgmt-containerregistry/azure/mgmt/containerregistry/container_registry_management_client.py#L246-L262
[ "def", "webhooks", "(", "self", ")", ":", "api_version", "=", "self", ".", "_get_api_version", "(", "'webhooks'", ")", "if", "api_version", "==", "'2017-10-01'", ":", "from", ".", "v2017_10_01", ".", "operations", "import", "WebhooksOperations", "as", "Operation...
d7306fde32f60a293a7567678692bdad31e4b667
test
_create_message
Create message from response. response: response from Service Bus cloud server. service_instance: the Service Bus client.
azure-servicebus/azure/servicebus/control_client/_serialization.py
def _create_message(response, service_instance): ''' Create message from response. response: response from Service Bus cloud server. service_instance: the Service Bus client. ''' respbody = response.body custom_properties = {} broker_properties = None message_type = None...
def _create_message(response, service_instance): ''' Create message from response. response: response from Service Bus cloud server. service_instance: the Service Bus client. ''' respbody = response.body custom_properties = {} broker_properties = None message_type = None...
[ "Create", "message", "from", "response", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicebus/azure/servicebus/control_client/_serialization.py#L41-L104
[ "def", "_create_message", "(", "response", ",", "service_instance", ")", ":", "respbody", "=", "response", ".", "body", "custom_properties", "=", "{", "}", "broker_properties", "=", "None", "message_type", "=", "None", "message_location", "=", "None", "# gets all ...
d7306fde32f60a293a7567678692bdad31e4b667
test
_convert_etree_element_to_rule
Converts entry element to rule object. The format of xml for rule: <entry xmlns='http://www.w3.org/2005/Atom'> <content type='application/xml'> <RuleDescription xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/netservices/2010/10/servicebus/connect"> <Filter i:typ...
azure-servicebus/azure/servicebus/control_client/_serialization.py
def _convert_etree_element_to_rule(entry_element): ''' Converts entry element to rule object. The format of xml for rule: <entry xmlns='http://www.w3.org/2005/Atom'> <content type='application/xml'> <RuleDescription xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com...
def _convert_etree_element_to_rule(entry_element): ''' Converts entry element to rule object. The format of xml for rule: <entry xmlns='http://www.w3.org/2005/Atom'> <content type='application/xml'> <RuleDescription xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com...
[ "Converts", "entry", "element", "to", "rule", "object", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicebus/azure/servicebus/control_client/_serialization.py#L121-L166
[ "def", "_convert_etree_element_to_rule", "(", "entry_element", ")", ":", "rule", "=", "Rule", "(", ")", "rule_element", "=", "entry_element", ".", "find", "(", "'./atom:content/sb:RuleDescription'", ",", "_etree_sb_feed_namespaces", ")", "if", "rule_element", "is", "n...
d7306fde32f60a293a7567678692bdad31e4b667
test
_convert_etree_element_to_queue
Converts entry element to queue object. The format of xml response for queue: <QueueDescription xmlns=\"http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\"> <MaxSizeInBytes>10000</MaxSizeInBytes> <DefaultMessageTimeToLive>PT5M</DefaultMessageTimeToLive> <LockDuration>PT2M</LockDur...
azure-servicebus/azure/servicebus/control_client/_serialization.py
def _convert_etree_element_to_queue(entry_element): ''' Converts entry element to queue object. The format of xml response for queue: <QueueDescription xmlns=\"http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\"> <MaxSizeInBytes>10000</MaxSizeInBytes> <DefaultMessageTimeToLive>PT5...
def _convert_etree_element_to_queue(entry_element): ''' Converts entry element to queue object. The format of xml response for queue: <QueueDescription xmlns=\"http://schemas.microsoft.com/netservices/2010/10/servicebus/connect\"> <MaxSizeInBytes>10000</MaxSizeInBytes> <DefaultMessageTimeToLive>PT5...
[ "Converts", "entry", "element", "to", "queue", "object", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicebus/azure/servicebus/control_client/_serialization.py#L196-L245
[ "def", "_convert_etree_element_to_queue", "(", "entry_element", ")", ":", "queue", "=", "Queue", "(", ")", "# get node for each attribute in Queue class, if nothing found then the", "# response is not valid xml for Queue.", "invalid_queue", "=", "True", "queue_element", "=", "ent...
d7306fde32f60a293a7567678692bdad31e4b667
test
_convert_etree_element_to_topic
Converts entry element to topic The xml format for topic: <entry xmlns='http://www.w3.org/2005/Atom'> <content type='application/xml'> <TopicDescription xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/netservices/2010/10/servicebus/connect"> <...
azure-servicebus/azure/servicebus/control_client/_serialization.py
def _convert_etree_element_to_topic(entry_element): '''Converts entry element to topic The xml format for topic: <entry xmlns='http://www.w3.org/2005/Atom'> <content type='application/xml'> <TopicDescription xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.micro...
def _convert_etree_element_to_topic(entry_element): '''Converts entry element to topic The xml format for topic: <entry xmlns='http://www.w3.org/2005/Atom'> <content type='application/xml'> <TopicDescription xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.micro...
[ "Converts", "entry", "element", "to", "topic" ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicebus/azure/servicebus/control_client/_serialization.py#L253-L298
[ "def", "_convert_etree_element_to_topic", "(", "entry_element", ")", ":", "topic", "=", "Topic", "(", ")", "invalid_topic", "=", "True", "topic_element", "=", "entry_element", ".", "find", "(", "'./atom:content/sb:TopicDescription'", ",", "_etree_sb_feed_namespaces", ")...
d7306fde32f60a293a7567678692bdad31e4b667
test
_convert_etree_element_to_subscription
Converts entry element to subscription The xml format for subscription: <entry xmlns='http://www.w3.org/2005/Atom'> <content type='application/xml'> <SubscriptionDescription xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/netservices/2010/10/servicebu...
azure-servicebus/azure/servicebus/control_client/_serialization.py
def _convert_etree_element_to_subscription(entry_element): '''Converts entry element to subscription The xml format for subscription: <entry xmlns='http://www.w3.org/2005/Atom'> <content type='application/xml'> <SubscriptionDescription xmlns:i="http://www.w3.org/2001/XMLSchema-instance" ...
def _convert_etree_element_to_subscription(entry_element): '''Converts entry element to subscription The xml format for subscription: <entry xmlns='http://www.w3.org/2005/Atom'> <content type='application/xml'> <SubscriptionDescription xmlns:i="http://www.w3.org/2001/XMLSchema-instance" ...
[ "Converts", "entry", "element", "to", "subscription" ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicebus/azure/servicebus/control_client/_serialization.py#L306-L346
[ "def", "_convert_etree_element_to_subscription", "(", "entry_element", ")", ":", "subscription", "=", "Subscription", "(", ")", "subscription_element", "=", "entry_element", ".", "find", "(", "'./atom:content/sb:SubscriptionDescription'", ",", "_etree_sb_feed_namespaces", ")"...
d7306fde32f60a293a7567678692bdad31e4b667
test
CertificateOperations.create
Creates a new certificate inside the specified account. :param resource_group_name: The name of the resource group that contains the Batch account. :type resource_group_name: str :param account_name: The name of the Batch account. :type account_name: str :param certific...
azure-mgmt-batch/azure/mgmt/batch/operations/certificate_operations.py
def create( self, resource_group_name, account_name, certificate_name, parameters, if_match=None, if_none_match=None, custom_headers=None, raw=False, **operation_config): """Creates a new certificate inside the specified account. :param resource_group_name: The name of the resource group th...
def create( self, resource_group_name, account_name, certificate_name, parameters, if_match=None, if_none_match=None, custom_headers=None, raw=False, **operation_config): """Creates a new certificate inside the specified account. :param resource_group_name: The name of the resource group th...
[ "Creates", "a", "new", "certificate", "inside", "the", "specified", "account", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-mgmt-batch/azure/mgmt/batch/operations/certificate_operations.py#L194-L281
[ "def", "create", "(", "self", ",", "resource_group_name", ",", "account_name", ",", "certificate_name", ",", "parameters", ",", "if_match", "=", "None", ",", "if_none_match", "=", "None", ",", "custom_headers", "=", "None", ",", "raw", "=", "False", ",", "*"...
d7306fde32f60a293a7567678692bdad31e4b667
test
CertificateOperations.delete
Deletes the specified certificate. :param resource_group_name: The name of the resource group that contains the Batch account. :type resource_group_name: str :param account_name: The name of the Batch account. :type account_name: str :param certificate_name: The identif...
azure-mgmt-batch/azure/mgmt/batch/operations/certificate_operations.py
def delete( self, resource_group_name, account_name, certificate_name, custom_headers=None, raw=False, **operation_config): """Deletes the specified certificate. :param resource_group_name: The name of the resource group that contains the Batch account. :type resource_group...
def delete( self, resource_group_name, account_name, certificate_name, custom_headers=None, raw=False, **operation_config): """Deletes the specified certificate. :param resource_group_name: The name of the resource group that contains the Batch account. :type resource_group...
[ "Deletes", "the", "specified", "certificate", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-mgmt-batch/azure/mgmt/batch/operations/certificate_operations.py#L415-L482
[ "def", "delete", "(", "self", ",", "resource_group_name", ",", "account_name", ",", "certificate_name", ",", "custom_headers", "=", "None", ",", "raw", "=", "False", ",", "*", "*", "operation_config", ")", ":", "raw_result", "=", "self", ".", "_delete_initial"...
d7306fde32f60a293a7567678692bdad31e4b667
test
update_pr_main
Main method
azure-sdk-tools/packaging_tools/update_pr.py
def update_pr_main(): """Main method""" parser = argparse.ArgumentParser( description='Build package.', formatter_class=argparse.RawTextHelpFormatter) parser.add_argument('--pr-number', '-p', dest='pr_number', type=int, required=True, help='PR...
def update_pr_main(): """Main method""" parser = argparse.ArgumentParser( description='Build package.', formatter_class=argparse.RawTextHelpFormatter) parser.add_argument('--pr-number', '-p', dest='pr_number', type=int, required=True, help='PR...
[ "Main", "method" ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-sdk-tools/packaging_tools/update_pr.py#L60-L89
[ "def", "update_pr_main", "(", ")", ":", "parser", "=", "argparse", ".", "ArgumentParser", "(", "description", "=", "'Build package.'", ",", "formatter_class", "=", "argparse", ".", "RawTextHelpFormatter", ")", "parser", ".", "add_argument", "(", "'--pr-number'", "...
d7306fde32f60a293a7567678692bdad31e4b667
test
_instantiate_client
Instantiate a client from kwargs, removing the subscription_id/tenant_id argument if unsupported.
azure-common/azure/common/client_factory.py
def _instantiate_client(client_class, **kwargs): """Instantiate a client from kwargs, removing the subscription_id/tenant_id argument if unsupported. """ args = get_arg_spec(client_class.__init__).args for key in ['subscription_id', 'tenant_id']: if key not in kwargs: continue ...
def _instantiate_client(client_class, **kwargs): """Instantiate a client from kwargs, removing the subscription_id/tenant_id argument if unsupported. """ args = get_arg_spec(client_class.__init__).args for key in ['subscription_id', 'tenant_id']: if key not in kwargs: continue ...
[ "Instantiate", "a", "client", "from", "kwargs", "removing", "the", "subscription_id", "/", "tenant_id", "argument", "if", "unsupported", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-common/azure/common/client_factory.py#L24-L35
[ "def", "_instantiate_client", "(", "client_class", ",", "*", "*", "kwargs", ")", ":", "args", "=", "get_arg_spec", "(", "client_class", ".", "__init__", ")", ".", "args", "for", "key", "in", "[", "'subscription_id'", ",", "'tenant_id'", "]", ":", "if", "ke...
d7306fde32f60a293a7567678692bdad31e4b667
test
_client_resource
Return a tuple of the resource (used to get the right access token), and the base URL for the client. Either or both can be None to signify that the default value should be used.
azure-common/azure/common/client_factory.py
def _client_resource(client_class, cloud): """Return a tuple of the resource (used to get the right access token), and the base URL for the client. Either or both can be None to signify that the default value should be used. """ if client_class.__name__ == 'GraphRbacManagementClient': return clo...
def _client_resource(client_class, cloud): """Return a tuple of the resource (used to get the right access token), and the base URL for the client. Either or both can be None to signify that the default value should be used. """ if client_class.__name__ == 'GraphRbacManagementClient': return clo...
[ "Return", "a", "tuple", "of", "the", "resource", "(", "used", "to", "get", "the", "right", "access", "token", ")", "and", "the", "base", "URL", "for", "the", "client", ".", "Either", "or", "both", "can", "be", "None", "to", "signify", "that", "the", ...
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-common/azure/common/client_factory.py#L38-L48
[ "def", "_client_resource", "(", "client_class", ",", "cloud", ")", ":", "if", "client_class", ".", "__name__", "==", "'GraphRbacManagementClient'", ":", "return", "cloud", ".", "endpoints", ".", "active_directory_graph_resource_id", ",", "cloud", ".", "endpoints", "...
d7306fde32f60a293a7567678692bdad31e4b667
test
get_client_from_cli_profile
Return a SDK client initialized with current CLI credentials, CLI default subscription and CLI default cloud. This method will fill automatically the following client parameters: - credentials - subscription_id - base_url Parameters provided in kwargs will override CLI parameters and be passed dir...
azure-common/azure/common/client_factory.py
def get_client_from_cli_profile(client_class, **kwargs): """Return a SDK client initialized with current CLI credentials, CLI default subscription and CLI default cloud. This method will fill automatically the following client parameters: - credentials - subscription_id - base_url Parameters p...
def get_client_from_cli_profile(client_class, **kwargs): """Return a SDK client initialized with current CLI credentials, CLI default subscription and CLI default cloud. This method will fill automatically the following client parameters: - credentials - subscription_id - base_url Parameters p...
[ "Return", "a", "SDK", "client", "initialized", "with", "current", "CLI", "credentials", "CLI", "default", "subscription", "and", "CLI", "default", "cloud", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-common/azure/common/client_factory.py#L51-L100
[ "def", "get_client_from_cli_profile", "(", "client_class", ",", "*", "*", "kwargs", ")", ":", "cloud", "=", "get_cli_active_cloud", "(", ")", "parameters", "=", "{", "}", "if", "'credentials'", "not", "in", "kwargs", "or", "'subscription_id'", "not", "in", "kw...
d7306fde32f60a293a7567678692bdad31e4b667
test
get_client_from_json_dict
Return a SDK client initialized with a JSON auth dict. The easiest way to obtain this content is to call the following CLI commands: .. code:: bash az ad sp create-for-rbac --sdk-auth This method will fill automatically the following client parameters: - credentials - subscription_id ...
azure-common/azure/common/client_factory.py
def get_client_from_json_dict(client_class, config_dict, **kwargs): """Return a SDK client initialized with a JSON auth dict. The easiest way to obtain this content is to call the following CLI commands: .. code:: bash az ad sp create-for-rbac --sdk-auth This method will fill automatically t...
def get_client_from_json_dict(client_class, config_dict, **kwargs): """Return a SDK client initialized with a JSON auth dict. The easiest way to obtain this content is to call the following CLI commands: .. code:: bash az ad sp create-for-rbac --sdk-auth This method will fill automatically t...
[ "Return", "a", "SDK", "client", "initialized", "with", "a", "JSON", "auth", "dict", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-common/azure/common/client_factory.py#L103-L184
[ "def", "get_client_from_json_dict", "(", "client_class", ",", "config_dict", ",", "*", "*", "kwargs", ")", ":", "is_graphrbac", "=", "client_class", ".", "__name__", "==", "'GraphRbacManagementClient'", "parameters", "=", "{", "'subscription_id'", ":", "config_dict", ...
d7306fde32f60a293a7567678692bdad31e4b667
test
get_client_from_auth_file
Return a SDK client initialized with auth file. The easiest way to obtain this file is to call the following CLI commands: .. code:: bash az ad sp create-for-rbac --sdk-auth You can specific the file path directly, or fill the environment variable AZURE_AUTH_LOCATION. File must be UTF-8. ...
azure-common/azure/common/client_factory.py
def get_client_from_auth_file(client_class, auth_path=None, **kwargs): """Return a SDK client initialized with auth file. The easiest way to obtain this file is to call the following CLI commands: .. code:: bash az ad sp create-for-rbac --sdk-auth You can specific the file path directly, or ...
def get_client_from_auth_file(client_class, auth_path=None, **kwargs): """Return a SDK client initialized with auth file. The easiest way to obtain this file is to call the following CLI commands: .. code:: bash az ad sp create-for-rbac --sdk-auth You can specific the file path directly, or ...
[ "Return", "a", "SDK", "client", "initialized", "with", "auth", "file", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-common/azure/common/client_factory.py#L186-L244
[ "def", "get_client_from_auth_file", "(", "client_class", ",", "auth_path", "=", "None", ",", "*", "*", "kwargs", ")", ":", "auth_path", "=", "auth_path", "or", "os", ".", "environ", "[", "'AZURE_AUTH_LOCATION'", "]", "with", "io", ".", "open", "(", "auth_pat...
d7306fde32f60a293a7567678692bdad31e4b667
test
_ETreeXmlToObject.parse_response
Parse the HTTPResponse's body and fill all the data into a class of return_type.
azure-servicebus/azure/servicebus/control_client/_common_serialization.py
def parse_response(response, return_type): ''' Parse the HTTPResponse's body and fill all the data into a class of return_type. ''' root = ETree.fromstring(response.body) xml_name = getattr(return_type, '_xml_name', return_type.__name__) if root.tag == xml_name: ...
def parse_response(response, return_type): ''' Parse the HTTPResponse's body and fill all the data into a class of return_type. ''' root = ETree.fromstring(response.body) xml_name = getattr(return_type, '_xml_name', return_type.__name__) if root.tag == xml_name: ...
[ "Parse", "the", "HTTPResponse", "s", "body", "and", "fill", "all", "the", "data", "into", "a", "class", "of", "return_type", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicebus/azure/servicebus/control_client/_common_serialization.py#L156-L166
[ "def", "parse_response", "(", "response", ",", "return_type", ")", ":", "root", "=", "ETree", ".", "fromstring", "(", "response", ".", "body", ")", "xml_name", "=", "getattr", "(", "return_type", ",", "'_xml_name'", ",", "return_type", ".", "__name__", ")", ...
d7306fde32f60a293a7567678692bdad31e4b667
test
_ETreeXmlToObject.parse_enum_results_list
resp_body is the XML we received resp_type is a string, such as Containers, return_type is the type we're constructing, such as ContainerEnumResults item_type is the type object of the item to be created, such as Container This function then returns a ContainerEnumResults object with th...
azure-servicebus/azure/servicebus/control_client/_common_serialization.py
def parse_enum_results_list(response, return_type, resp_type, item_type): """resp_body is the XML we received resp_type is a string, such as Containers, return_type is the type we're constructing, such as ContainerEnumResults item_type is the type object of the item to be created, such a...
def parse_enum_results_list(response, return_type, resp_type, item_type): """resp_body is the XML we received resp_type is a string, such as Containers, return_type is the type we're constructing, such as ContainerEnumResults item_type is the type object of the item to be created, such a...
[ "resp_body", "is", "the", "XML", "we", "received", "resp_type", "is", "a", "string", "such", "as", "Containers", "return_type", "is", "the", "type", "we", "re", "constructing", "such", "as", "ContainerEnumResults", "item_type", "is", "the", "type", "object", "...
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicebus/azure/servicebus/control_client/_common_serialization.py#L170-L209
[ "def", "parse_enum_results_list", "(", "response", ",", "return_type", ",", "resp_type", ",", "item_type", ")", ":", "# parsing something like:", "# <EnumerationResults ... >", "# <Queues>", "# <Queue>", "# <Something />", "# <SomethingElse />", "# ...
d7306fde32f60a293a7567678692bdad31e4b667
test
_ETreeXmlToObject.get_entry_properties_from_element
get properties from element tree element
azure-servicebus/azure/servicebus/control_client/_common_serialization.py
def get_entry_properties_from_element(element, include_id, id_prefix_to_skip=None, use_title_as_id=False): ''' get properties from element tree element ''' properties = {} etag = element.attrib.get(_make_etree_ns_attr_name(_etree_entity_feed_namespaces['m'], 'etag'), None) if etag is no...
def get_entry_properties_from_element(element, include_id, id_prefix_to_skip=None, use_title_as_id=False): ''' get properties from element tree element ''' properties = {} etag = element.attrib.get(_make_etree_ns_attr_name(_etree_entity_feed_namespaces['m'], 'etag'), None) if etag is no...
[ "get", "properties", "from", "element", "tree", "element" ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicebus/azure/servicebus/control_client/_common_serialization.py#L254-L280
[ "def", "get_entry_properties_from_element", "(", "element", ",", "include_id", ",", "id_prefix_to_skip", "=", "None", ",", "use_title_as_id", "=", "False", ")", ":", "properties", "=", "{", "}", "etag", "=", "element", ".", "attrib", ".", "get", "(", "_make_et...
d7306fde32f60a293a7567678692bdad31e4b667
test
_ETreeXmlToObject._parse_response_body_from_xml_node
parse the xml and fill all the data into a class of return_type
azure-servicebus/azure/servicebus/control_client/_common_serialization.py
def _parse_response_body_from_xml_node(node, return_type): ''' parse the xml and fill all the data into a class of return_type ''' return_obj = return_type() _ETreeXmlToObject._fill_data_to_return_object(node, return_obj) return return_obj
def _parse_response_body_from_xml_node(node, return_type): ''' parse the xml and fill all the data into a class of return_type ''' return_obj = return_type() _ETreeXmlToObject._fill_data_to_return_object(node, return_obj) return return_obj
[ "parse", "the", "xml", "and", "fill", "all", "the", "data", "into", "a", "class", "of", "return_type" ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicebus/azure/servicebus/control_client/_common_serialization.py#L307-L314
[ "def", "_parse_response_body_from_xml_node", "(", "node", ",", "return_type", ")", ":", "return_obj", "=", "return_type", "(", ")", "_ETreeXmlToObject", ".", "_fill_data_to_return_object", "(", "node", ",", "return_obj", ")", "return", "return_obj" ]
d7306fde32f60a293a7567678692bdad31e4b667
test
_ETreeXmlToObject._fill_instance_child
Converts a child of the current dom element to the specified type.
azure-servicebus/azure/servicebus/control_client/_common_serialization.py
def _fill_instance_child(xmldoc, element_name, return_type): '''Converts a child of the current dom element to the specified type. ''' element = xmldoc.find(_get_serialization_name(element_name)) if element is None: return None return_obj = return_type() _ETr...
def _fill_instance_child(xmldoc, element_name, return_type): '''Converts a child of the current dom element to the specified type. ''' element = xmldoc.find(_get_serialization_name(element_name)) if element is None: return None return_obj = return_type() _ETr...
[ "Converts", "a", "child", "of", "the", "current", "dom", "element", "to", "the", "specified", "type", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicebus/azure/servicebus/control_client/_common_serialization.py#L318-L328
[ "def", "_fill_instance_child", "(", "xmldoc", ",", "element_name", ",", "return_type", ")", ":", "element", "=", "xmldoc", ".", "find", "(", "_get_serialization_name", "(", "element_name", ")", ")", "if", "element", "is", "None", ":", "return", "None", "return...
d7306fde32f60a293a7567678692bdad31e4b667
test
NetworkManagementClient.check_dns_name_availability
Checks whether a domain name in the cloudapp.azure.com zone is available for use. :param location: The location of the domain name. :type location: str :param domain_name_label: The domain name to be verified. It must conform to the following regular expression: ^[a-z]...
azure-mgmt-network/azure/mgmt/network/network_management_client.py
def check_dns_name_availability( self, location, domain_name_label, custom_headers=None, raw=False, **operation_config): """Checks whether a domain name in the cloudapp.azure.com zone is available for use. :param location: The location of the domain name. :type location: str...
def check_dns_name_availability( self, location, domain_name_label, custom_headers=None, raw=False, **operation_config): """Checks whether a domain name in the cloudapp.azure.com zone is available for use. :param location: The location of the domain name. :type location: str...
[ "Checks", "whether", "a", "domain", "name", "in", "the", "cloudapp", ".", "azure", ".", "com", "zone", "is", "available", "for", "use", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-mgmt-network/azure/mgmt/network/network_management_client.py#L100-L169
[ "def", "check_dns_name_availability", "(", "self", ",", "location", ",", "domain_name_label", ",", "custom_headers", "=", "None", ",", "raw", "=", "False", ",", "*", "*", "operation_config", ")", ":", "api_version", "=", "self", ".", "_get_api_version", "(", "...
d7306fde32f60a293a7567678692bdad31e4b667
test
NetworkManagementClient.ddos_custom_policies
Instance depends on the API version: * 2018-11-01: :class:`DdosCustomPoliciesOperations<azure.mgmt.network.v2018_11_01.operations.DdosCustomPoliciesOperations>` * 2018-12-01: :class:`DdosCustomPoliciesOperations<azure.mgmt.network.v2018_12_01.operations.DdosCustomPoliciesOperations>` *...
azure-mgmt-network/azure/mgmt/network/network_management_client.py
def ddos_custom_policies(self): """Instance depends on the API version: * 2018-11-01: :class:`DdosCustomPoliciesOperations<azure.mgmt.network.v2018_11_01.operations.DdosCustomPoliciesOperations>` * 2018-12-01: :class:`DdosCustomPoliciesOperations<azure.mgmt.network.v2018_12_01.operations....
def ddos_custom_policies(self): """Instance depends on the API version: * 2018-11-01: :class:`DdosCustomPoliciesOperations<azure.mgmt.network.v2018_11_01.operations.DdosCustomPoliciesOperations>` * 2018-12-01: :class:`DdosCustomPoliciesOperations<azure.mgmt.network.v2018_12_01.operations....
[ "Instance", "depends", "on", "the", "API", "version", ":" ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-mgmt-network/azure/mgmt/network/network_management_client.py#L648-L664
[ "def", "ddos_custom_policies", "(", "self", ")", ":", "api_version", "=", "self", ".", "_get_api_version", "(", "'ddos_custom_policies'", ")", "if", "api_version", "==", "'2018-11-01'", ":", "from", ".", "v2018_11_01", ".", "operations", "import", "DdosCustomPolicie...
d7306fde32f60a293a7567678692bdad31e4b667
test
NetworkManagementClient.express_route_connections
Instance depends on the API version: * 2018-08-01: :class:`ExpressRouteConnectionsOperations<azure.mgmt.network.v2018_08_01.operations.ExpressRouteConnectionsOperations>` * 2018-10-01: :class:`ExpressRouteConnectionsOperations<azure.mgmt.network.v2018_10_01.operations.ExpressRouteConnectionsOpera...
azure-mgmt-network/azure/mgmt/network/network_management_client.py
def express_route_connections(self): """Instance depends on the API version: * 2018-08-01: :class:`ExpressRouteConnectionsOperations<azure.mgmt.network.v2018_08_01.operations.ExpressRouteConnectionsOperations>` * 2018-10-01: :class:`ExpressRouteConnectionsOperations<azure.mgmt.network.v20...
def express_route_connections(self): """Instance depends on the API version: * 2018-08-01: :class:`ExpressRouteConnectionsOperations<azure.mgmt.network.v2018_08_01.operations.ExpressRouteConnectionsOperations>` * 2018-10-01: :class:`ExpressRouteConnectionsOperations<azure.mgmt.network.v20...
[ "Instance", "depends", "on", "the", "API", "version", ":" ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-mgmt-network/azure/mgmt/network/network_management_client.py#L997-L1019
[ "def", "express_route_connections", "(", "self", ")", ":", "api_version", "=", "self", ".", "_get_api_version", "(", "'express_route_connections'", ")", "if", "api_version", "==", "'2018-08-01'", ":", "from", ".", "v2018_08_01", ".", "operations", "import", "Express...
d7306fde32f60a293a7567678692bdad31e4b667
test
NetworkManagementClient.express_route_cross_connection_peerings
Instance depends on the API version: * 2018-02-01: :class:`ExpressRouteCrossConnectionPeeringsOperations<azure.mgmt.network.v2018_02_01.operations.ExpressRouteCrossConnectionPeeringsOperations>` * 2018-04-01: :class:`ExpressRouteCrossConnectionPeeringsOperations<azure.mgmt.network.v2018_04_01.ope...
azure-mgmt-network/azure/mgmt/network/network_management_client.py
def express_route_cross_connection_peerings(self): """Instance depends on the API version: * 2018-02-01: :class:`ExpressRouteCrossConnectionPeeringsOperations<azure.mgmt.network.v2018_02_01.operations.ExpressRouteCrossConnectionPeeringsOperations>` * 2018-04-01: :class:`ExpressRouteCrossC...
def express_route_cross_connection_peerings(self): """Instance depends on the API version: * 2018-02-01: :class:`ExpressRouteCrossConnectionPeeringsOperations<azure.mgmt.network.v2018_02_01.operations.ExpressRouteCrossConnectionPeeringsOperations>` * 2018-04-01: :class:`ExpressRouteCrossC...
[ "Instance", "depends", "on", "the", "API", "version", ":" ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-mgmt-network/azure/mgmt/network/network_management_client.py#L1022-L1056
[ "def", "express_route_cross_connection_peerings", "(", "self", ")", ":", "api_version", "=", "self", ".", "_get_api_version", "(", "'express_route_cross_connection_peerings'", ")", "if", "api_version", "==", "'2018-02-01'", ":", "from", ".", "v2018_02_01", ".", "operati...
d7306fde32f60a293a7567678692bdad31e4b667
test
NetworkManagementClient.hub_virtual_network_connections
Instance depends on the API version: * 2018-04-01: :class:`HubVirtualNetworkConnectionsOperations<azure.mgmt.network.v2018_04_01.operations.HubVirtualNetworkConnectionsOperations>` * 2018-06-01: :class:`HubVirtualNetworkConnectionsOperations<azure.mgmt.network.v2018_06_01.operations.HubVirtualNet...
azure-mgmt-network/azure/mgmt/network/network_management_client.py
def hub_virtual_network_connections(self): """Instance depends on the API version: * 2018-04-01: :class:`HubVirtualNetworkConnectionsOperations<azure.mgmt.network.v2018_04_01.operations.HubVirtualNetworkConnectionsOperations>` * 2018-06-01: :class:`HubVirtualNetworkConnectionsOperations<a...
def hub_virtual_network_connections(self): """Instance depends on the API version: * 2018-04-01: :class:`HubVirtualNetworkConnectionsOperations<azure.mgmt.network.v2018_04_01.operations.HubVirtualNetworkConnectionsOperations>` * 2018-06-01: :class:`HubVirtualNetworkConnectionsOperations<a...
[ "Instance", "depends", "on", "the", "API", "version", ":" ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-mgmt-network/azure/mgmt/network/network_management_client.py#L1263-L1294
[ "def", "hub_virtual_network_connections", "(", "self", ")", ":", "api_version", "=", "self", ".", "_get_api_version", "(", "'hub_virtual_network_connections'", ")", "if", "api_version", "==", "'2018-04-01'", ":", "from", ".", "v2018_04_01", ".", "operations", "import"...
d7306fde32f60a293a7567678692bdad31e4b667
test
NetworkManagementClient.nat_gateways
Instance depends on the API version: * 2019-02-01: :class:`NatGatewaysOperations<azure.mgmt.network.v2019_02_01.operations.NatGatewaysOperations>`
azure-mgmt-network/azure/mgmt/network/network_management_client.py
def nat_gateways(self): """Instance depends on the API version: * 2019-02-01: :class:`NatGatewaysOperations<azure.mgmt.network.v2019_02_01.operations.NatGatewaysOperations>` """ api_version = self._get_api_version('nat_gateways') if api_version == '2019-02-01': fr...
def nat_gateways(self): """Instance depends on the API version: * 2019-02-01: :class:`NatGatewaysOperations<azure.mgmt.network.v2019_02_01.operations.NatGatewaysOperations>` """ api_version = self._get_api_version('nat_gateways') if api_version == '2019-02-01': fr...
[ "Instance", "depends", "on", "the", "API", "version", ":" ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-mgmt-network/azure/mgmt/network/network_management_client.py#L1811-L1821
[ "def", "nat_gateways", "(", "self", ")", ":", "api_version", "=", "self", ".", "_get_api_version", "(", "'nat_gateways'", ")", "if", "api_version", "==", "'2019-02-01'", ":", "from", ".", "v2019_02_01", ".", "operations", "import", "NatGatewaysOperations", "as", ...
d7306fde32f60a293a7567678692bdad31e4b667
test
NetworkManagementClient.network_watchers
Instance depends on the API version: * 2016-09-01: :class:`NetworkWatchersOperations<azure.mgmt.network.v2016_09_01.operations.NetworkWatchersOperations>` * 2016-12-01: :class:`NetworkWatchersOperations<azure.mgmt.network.v2016_12_01.operations.NetworkWatchersOperations>` * 2017-03-01:...
azure-mgmt-network/azure/mgmt/network/network_management_client.py
def network_watchers(self): """Instance depends on the API version: * 2016-09-01: :class:`NetworkWatchersOperations<azure.mgmt.network.v2016_09_01.operations.NetworkWatchersOperations>` * 2016-12-01: :class:`NetworkWatchersOperations<azure.mgmt.network.v2016_12_01.operations.NetworkWatche...
def network_watchers(self): """Instance depends on the API version: * 2016-09-01: :class:`NetworkWatchersOperations<azure.mgmt.network.v2016_09_01.operations.NetworkWatchersOperations>` * 2016-12-01: :class:`NetworkWatchersOperations<azure.mgmt.network.v2016_12_01.operations.NetworkWatche...
[ "Instance", "depends", "on", "the", "API", "version", ":" ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-mgmt-network/azure/mgmt/network/network_management_client.py#L2118-L2179
[ "def", "network_watchers", "(", "self", ")", ":", "api_version", "=", "self", ".", "_get_api_version", "(", "'network_watchers'", ")", "if", "api_version", "==", "'2016-09-01'", ":", "from", ".", "v2016_09_01", ".", "operations", "import", "NetworkWatchersOperations...
d7306fde32f60a293a7567678692bdad31e4b667
test
NetworkManagementClient.peer_express_route_circuit_connections
Instance depends on the API version: * 2018-12-01: :class:`PeerExpressRouteCircuitConnectionsOperations<azure.mgmt.network.v2018_12_01.operations.PeerExpressRouteCircuitConnectionsOperations>` * 2019-02-01: :class:`PeerExpressRouteCircuitConnectionsOperations<azure.mgmt.network.v2019_02_01.operat...
azure-mgmt-network/azure/mgmt/network/network_management_client.py
def peer_express_route_circuit_connections(self): """Instance depends on the API version: * 2018-12-01: :class:`PeerExpressRouteCircuitConnectionsOperations<azure.mgmt.network.v2018_12_01.operations.PeerExpressRouteCircuitConnectionsOperations>` * 2019-02-01: :class:`PeerExpressRouteCircu...
def peer_express_route_circuit_connections(self): """Instance depends on the API version: * 2018-12-01: :class:`PeerExpressRouteCircuitConnectionsOperations<azure.mgmt.network.v2018_12_01.operations.PeerExpressRouteCircuitConnectionsOperations>` * 2019-02-01: :class:`PeerExpressRouteCircu...
[ "Instance", "depends", "on", "the", "API", "version", ":" ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-mgmt-network/azure/mgmt/network/network_management_client.py#L2295-L2308
[ "def", "peer_express_route_circuit_connections", "(", "self", ")", ":", "api_version", "=", "self", ".", "_get_api_version", "(", "'peer_express_route_circuit_connections'", ")", "if", "api_version", "==", "'2018-12-01'", ":", "from", ".", "v2018_12_01", ".", "operation...
d7306fde32f60a293a7567678692bdad31e4b667
test
NetworkManagementClient.service_endpoint_policies
Instance depends on the API version: * 2018-07-01: :class:`ServiceEndpointPoliciesOperations<azure.mgmt.network.v2018_07_01.operations.ServiceEndpointPoliciesOperations>` * 2018-08-01: :class:`ServiceEndpointPoliciesOperations<azure.mgmt.network.v2018_08_01.operations.ServiceEndpointPoliciesOpera...
azure-mgmt-network/azure/mgmt/network/network_management_client.py
def service_endpoint_policies(self): """Instance depends on the API version: * 2018-07-01: :class:`ServiceEndpointPoliciesOperations<azure.mgmt.network.v2018_07_01.operations.ServiceEndpointPoliciesOperations>` * 2018-08-01: :class:`ServiceEndpointPoliciesOperations<azure.mgmt.network.v20...
def service_endpoint_policies(self): """Instance depends on the API version: * 2018-07-01: :class:`ServiceEndpointPoliciesOperations<azure.mgmt.network.v2018_07_01.operations.ServiceEndpointPoliciesOperations>` * 2018-08-01: :class:`ServiceEndpointPoliciesOperations<azure.mgmt.network.v20...
[ "Instance", "depends", "on", "the", "API", "version", ":" ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-mgmt-network/azure/mgmt/network/network_management_client.py#L2729-L2754
[ "def", "service_endpoint_policies", "(", "self", ")", ":", "api_version", "=", "self", ".", "_get_api_version", "(", "'service_endpoint_policies'", ")", "if", "api_version", "==", "'2018-07-01'", ":", "from", ".", "v2018_07_01", ".", "operations", "import", "Service...
d7306fde32f60a293a7567678692bdad31e4b667
test
NetworkManagementClient.web_application_firewall_policies
Instance depends on the API version: * 2018-12-01: :class:`WebApplicationFirewallPoliciesOperations<azure.mgmt.network.v2018_12_01.operations.WebApplicationFirewallPoliciesOperations>` * 2019-02-01: :class:`WebApplicationFirewallPoliciesOperations<azure.mgmt.network.v2019_02_01.operations.WebAppl...
azure-mgmt-network/azure/mgmt/network/network_management_client.py
def web_application_firewall_policies(self): """Instance depends on the API version: * 2018-12-01: :class:`WebApplicationFirewallPoliciesOperations<azure.mgmt.network.v2018_12_01.operations.WebApplicationFirewallPoliciesOperations>` * 2019-02-01: :class:`WebApplicationFirewallPoliciesOper...
def web_application_firewall_policies(self): """Instance depends on the API version: * 2018-12-01: :class:`WebApplicationFirewallPoliciesOperations<azure.mgmt.network.v2018_12_01.operations.WebApplicationFirewallPoliciesOperations>` * 2019-02-01: :class:`WebApplicationFirewallPoliciesOper...
[ "Instance", "depends", "on", "the", "API", "version", ":" ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-mgmt-network/azure/mgmt/network/network_management_client.py#L3423-L3436
[ "def", "web_application_firewall_policies", "(", "self", ")", ":", "api_version", "=", "self", ".", "_get_api_version", "(", "'web_application_firewall_policies'", ")", "if", "api_version", "==", "'2018-12-01'", ":", "from", ".", "v2018_12_01", ".", "operations", "imp...
d7306fde32f60a293a7567678692bdad31e4b667
test
DpsCertificateOperations.delete
Delete the Provisioning Service Certificate. Deletes the specified certificate assosciated with the Provisioning Service. :param resource_group_name: Resource group identifier. :type resource_group_name: str :param if_match: ETag of the certificate :type if_match: str ...
azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/operations/dps_certificate_operations.py
def delete( self, resource_group_name, if_match, provisioning_service_name, certificate_name, certificatename=None, certificateraw_bytes=None, certificateis_verified=None, certificatepurpose=None, certificatecreated=None, certificatelast_updated=None, certificatehas_private_key=None, certificatenonce=None, ...
def delete( self, resource_group_name, if_match, provisioning_service_name, certificate_name, certificatename=None, certificateraw_bytes=None, certificateis_verified=None, certificatepurpose=None, certificatecreated=None, certificatelast_updated=None, certificatehas_private_key=None, certificatenonce=None, ...
[ "Delete", "the", "Provisioning", "Service", "Certificate", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/operations/dps_certificate_operations.py#L192-L292
[ "def", "delete", "(", "self", ",", "resource_group_name", ",", "if_match", ",", "provisioning_service_name", ",", "certificate_name", ",", "certificatename", "=", "None", ",", "certificateraw_bytes", "=", "None", ",", "certificateis_verified", "=", "None", ",", "cer...
d7306fde32f60a293a7567678692bdad31e4b667
test
EntitiesOperations.list
List all entities (Management Groups, Subscriptions, etc.) for the authenticated user. :param skiptoken: Page continuation token is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will i...
azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/entities_operations.py
def list( self, skiptoken=None, skip=None, top=None, select=None, search=None, filter=None, view=None, group_name=None, cache_control="no-cache", custom_headers=None, raw=False, **operation_config): """List all entities (Management Groups, Subscriptions, etc.) for the authenticated user. ...
def list( self, skiptoken=None, skip=None, top=None, select=None, search=None, filter=None, view=None, group_name=None, cache_control="no-cache", custom_headers=None, raw=False, **operation_config): """List all entities (Management Groups, Subscriptions, etc.) for the authenticated user. ...
[ "List", "all", "entities", "(", "Management", "Groups", "Subscriptions", "etc", ".", ")", "for", "the", "authenticated", "user", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-mgmt-managementgroups/azure/mgmt/managementgroups/operations/entities_operations.py#L39-L164
[ "def", "list", "(", "self", ",", "skiptoken", "=", "None", ",", "skip", "=", "None", ",", "top", "=", "None", ",", "select", "=", "None", ",", "search", "=", "None", ",", "filter", "=", "None", ",", "view", "=", "None", ",", "group_name", "=", "N...
d7306fde32f60a293a7567678692bdad31e4b667
test
ReviewsOperations.create_job
A job Id will be returned for the content posted on this endpoint. Once the content is evaluated against the Workflow provided the review will be created or ignored based on the workflow expression. <h3>CallBack Schemas </h3> <p> <h4>Job Completion CallBack Sample</h4><br/> ...
azure-cognitiveservices-vision-contentmoderator/azure/cognitiveservices/vision/contentmoderator/operations/reviews_operations.py
def create_job( self, team_name, content_type, content_id, workflow_name, job_content_type, content_value, call_back_endpoint=None, custom_headers=None, raw=False, **operation_config): """A job Id will be returned for the content posted on this endpoint. Once the content is evaluated against...
def create_job( self, team_name, content_type, content_id, workflow_name, job_content_type, content_value, call_back_endpoint=None, custom_headers=None, raw=False, **operation_config): """A job Id will be returned for the content posted on this endpoint. Once the content is evaluated against...
[ "A", "job", "Id", "will", "be", "returned", "for", "the", "content", "posted", "on", "this", "endpoint", ".", "Once", "the", "content", "is", "evaluated", "against", "the", "Workflow", "provided", "the", "review", "will", "be", "created", "or", "ignored", ...
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-cognitiveservices-vision-contentmoderator/azure/cognitiveservices/vision/contentmoderator/operations/reviews_operations.py#L240-L360
[ "def", "create_job", "(", "self", ",", "team_name", ",", "content_type", ",", "content_id", ",", "workflow_name", ",", "job_content_type", ",", "content_value", ",", "call_back_endpoint", "=", "None", ",", "custom_headers", "=", "None", ",", "raw", "=", "False",...
d7306fde32f60a293a7567678692bdad31e4b667
test
ServiceBusClient.get_queue
Get a client for a queue entity. :param queue_name: The name of the queue. :type queue_name: str :rtype: ~azure.servicebus.servicebus_client.QueueClient :raises: ~azure.servicebus.common.errors.ServiceBusConnectionError if the namespace is not found. :raises: ~azure.servicebus.c...
azure-servicebus/azure/servicebus/servicebus_client.py
def get_queue(self, queue_name): """Get a client for a queue entity. :param queue_name: The name of the queue. :type queue_name: str :rtype: ~azure.servicebus.servicebus_client.QueueClient :raises: ~azure.servicebus.common.errors.ServiceBusConnectionError if the namespace is not...
def get_queue(self, queue_name): """Get a client for a queue entity. :param queue_name: The name of the queue. :type queue_name: str :rtype: ~azure.servicebus.servicebus_client.QueueClient :raises: ~azure.servicebus.common.errors.ServiceBusConnectionError if the namespace is not...
[ "Get", "a", "client", "for", "a", "queue", "entity", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicebus/azure/servicebus/servicebus_client.py#L104-L133
[ "def", "get_queue", "(", "self", ",", "queue_name", ")", ":", "try", ":", "queue", "=", "self", ".", "mgmt_client", ".", "get_queue", "(", "queue_name", ")", "except", "requests", ".", "exceptions", ".", "ConnectionError", "as", "e", ":", "raise", "Service...
d7306fde32f60a293a7567678692bdad31e4b667
test
ServiceBusClient.list_queues
Get clients for all queue entities in the namespace. :rtype: list[~azure.servicebus.servicebus_client.QueueClient] :raises: ~azure.servicebus.common.errors.ServiceBusConnectionError if the namespace is not found. Example: .. literalinclude:: ../examples/test_examples.py ...
azure-servicebus/azure/servicebus/servicebus_client.py
def list_queues(self): """Get clients for all queue entities in the namespace. :rtype: list[~azure.servicebus.servicebus_client.QueueClient] :raises: ~azure.servicebus.common.errors.ServiceBusConnectionError if the namespace is not found. Example: .. literalinclude:: ../exa...
def list_queues(self): """Get clients for all queue entities in the namespace. :rtype: list[~azure.servicebus.servicebus_client.QueueClient] :raises: ~azure.servicebus.common.errors.ServiceBusConnectionError if the namespace is not found. Example: .. literalinclude:: ../exa...
[ "Get", "clients", "for", "all", "queue", "entities", "in", "the", "namespace", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicebus/azure/servicebus/servicebus_client.py#L135-L162
[ "def", "list_queues", "(", "self", ")", ":", "try", ":", "queues", "=", "self", ".", "mgmt_client", ".", "list_queues", "(", ")", "except", "requests", ".", "exceptions", ".", "ConnectionError", "as", "e", ":", "raise", "ServiceBusConnectionError", "(", "\"N...
d7306fde32f60a293a7567678692bdad31e4b667
test
ServiceBusClient.get_topic
Get a client for a topic entity. :param topic_name: The name of the topic. :type topic_name: str :rtype: ~azure.servicebus.servicebus_client.TopicClient :raises: ~azure.servicebus.common.errors.ServiceBusConnectionError if the namespace is not found. :raises: ~azure.servicebus.c...
azure-servicebus/azure/servicebus/servicebus_client.py
def get_topic(self, topic_name): """Get a client for a topic entity. :param topic_name: The name of the topic. :type topic_name: str :rtype: ~azure.servicebus.servicebus_client.TopicClient :raises: ~azure.servicebus.common.errors.ServiceBusConnectionError if the namespace is not...
def get_topic(self, topic_name): """Get a client for a topic entity. :param topic_name: The name of the topic. :type topic_name: str :rtype: ~azure.servicebus.servicebus_client.TopicClient :raises: ~azure.servicebus.common.errors.ServiceBusConnectionError if the namespace is not...
[ "Get", "a", "client", "for", "a", "topic", "entity", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicebus/azure/servicebus/servicebus_client.py#L164-L192
[ "def", "get_topic", "(", "self", ",", "topic_name", ")", ":", "try", ":", "topic", "=", "self", ".", "mgmt_client", ".", "get_topic", "(", "topic_name", ")", "except", "requests", ".", "exceptions", ".", "ConnectionError", "as", "e", ":", "raise", "Service...
d7306fde32f60a293a7567678692bdad31e4b667
test
ServiceBusClient.list_topics
Get a client for all topic entities in the namespace. :rtype: list[~azure.servicebus.servicebus_client.TopicClient] :raises: ~azure.servicebus.common.errors.ServiceBusConnectionError if the namespace is not found. Example: .. literalinclude:: ../examples/test_examples.py ...
azure-servicebus/azure/servicebus/servicebus_client.py
def list_topics(self): """Get a client for all topic entities in the namespace. :rtype: list[~azure.servicebus.servicebus_client.TopicClient] :raises: ~azure.servicebus.common.errors.ServiceBusConnectionError if the namespace is not found. Example: .. literalinclude:: ../ex...
def list_topics(self): """Get a client for all topic entities in the namespace. :rtype: list[~azure.servicebus.servicebus_client.TopicClient] :raises: ~azure.servicebus.common.errors.ServiceBusConnectionError if the namespace is not found. Example: .. literalinclude:: ../ex...
[ "Get", "a", "client", "for", "all", "topic", "entities", "in", "the", "namespace", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicebus/azure/servicebus/servicebus_client.py#L194-L220
[ "def", "list_topics", "(", "self", ")", ":", "try", ":", "topics", "=", "self", ".", "mgmt_client", ".", "list_topics", "(", ")", "except", "requests", ".", "exceptions", ".", "ConnectionError", "as", "e", ":", "raise", "ServiceBusConnectionError", "(", "\"N...
d7306fde32f60a293a7567678692bdad31e4b667
test
ReceiveClientMixin.peek
Browse messages currently pending in the queue. Peeked messages are not removed from queue, nor are they locked. They cannot be completed, deferred or dead-lettered. :param count: The maximum number of messages to try and peek. The default value is 1. :type count: int ...
azure-servicebus/azure/servicebus/servicebus_client.py
def peek(self, count=1, start_from=0, session=None, **kwargs): """Browse messages currently pending in the queue. Peeked messages are not removed from queue, nor are they locked. They cannot be completed, deferred or dead-lettered. :param count: The maximum number of messages to try an...
def peek(self, count=1, start_from=0, session=None, **kwargs): """Browse messages currently pending in the queue. Peeked messages are not removed from queue, nor are they locked. They cannot be completed, deferred or dead-lettered. :param count: The maximum number of messages to try an...
[ "Browse", "messages", "currently", "pending", "in", "the", "queue", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicebus/azure/servicebus/servicebus_client.py#L395-L431
[ "def", "peek", "(", "self", ",", "count", "=", "1", ",", "start_from", "=", "0", ",", "session", "=", "None", ",", "*", "*", "kwargs", ")", ":", "message", "=", "{", "'from-sequence-number'", ":", "types", ".", "AMQPLong", "(", "start_from", ")", ","...
d7306fde32f60a293a7567678692bdad31e4b667
test
ReceiveClientMixin.list_sessions
List session IDs. List the Session IDs with pending messages in the queue where the state of the session has been updated since the timestamp provided. If no timestamp is provided, all will be returned. If the state of a session has never been set, it will not be returned regardless of whether ...
azure-servicebus/azure/servicebus/servicebus_client.py
def list_sessions(self, updated_since=None, max_results=100, skip=0, **kwargs): """List session IDs. List the Session IDs with pending messages in the queue where the state of the session has been updated since the timestamp provided. If no timestamp is provided, all will be returned. I...
def list_sessions(self, updated_since=None, max_results=100, skip=0, **kwargs): """List session IDs. List the Session IDs with pending messages in the queue where the state of the session has been updated since the timestamp provided. If no timestamp is provided, all will be returned. I...
[ "List", "session", "IDs", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicebus/azure/servicebus/servicebus_client.py#L433-L469
[ "def", "list_sessions", "(", "self", ",", "updated_since", "=", "None", ",", "max_results", "=", "100", ",", "skip", "=", "0", ",", "*", "*", "kwargs", ")", ":", "if", "self", ".", "entity", "and", "not", "self", ".", "requires_session", ":", "raise", ...
d7306fde32f60a293a7567678692bdad31e4b667
test
ReceiveClientMixin.receive_deferred_messages
Receive messages by sequence number that have been previously deferred. When receiving deferred messages from a partitioned entity, all of the supplied sequence numbers must be messages from the same partition. :param sequence_numbers: A list of the sequence numbers of messages that have been ...
azure-servicebus/azure/servicebus/servicebus_client.py
def receive_deferred_messages(self, sequence_numbers, mode=ReceiveSettleMode.PeekLock, **kwargs): """Receive messages by sequence number that have been previously deferred. When receiving deferred messages from a partitioned entity, all of the supplied sequence numbers must be messages from the...
def receive_deferred_messages(self, sequence_numbers, mode=ReceiveSettleMode.PeekLock, **kwargs): """Receive messages by sequence number that have been previously deferred. When receiving deferred messages from a partitioned entity, all of the supplied sequence numbers must be messages from the...
[ "Receive", "messages", "by", "sequence", "number", "that", "have", "been", "previously", "deferred", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicebus/azure/servicebus/servicebus_client.py#L471-L513
[ "def", "receive_deferred_messages", "(", "self", ",", "sequence_numbers", ",", "mode", "=", "ReceiveSettleMode", ".", "PeekLock", ",", "*", "*", "kwargs", ")", ":", "if", "(", "self", ".", "entity", "and", "self", ".", "requires_session", ")", "or", "kwargs"...
d7306fde32f60a293a7567678692bdad31e4b667
test
ReceiveClientMixin.settle_deferred_messages
Settle messages that have been previously deferred. :param settlement: How the messages are to be settled. This must be a string of one of the following values: 'completed', 'suspended', 'abandoned'. :type settlement: str :param messages: A list of deferred messages to be settled. ...
azure-servicebus/azure/servicebus/servicebus_client.py
def settle_deferred_messages(self, settlement, messages, **kwargs): """Settle messages that have been previously deferred. :param settlement: How the messages are to be settled. This must be a string of one of the following values: 'completed', 'suspended', 'abandoned'. :type settlemen...
def settle_deferred_messages(self, settlement, messages, **kwargs): """Settle messages that have been previously deferred. :param settlement: How the messages are to be settled. This must be a string of one of the following values: 'completed', 'suspended', 'abandoned'. :type settlemen...
[ "Settle", "messages", "that", "have", "been", "previously", "deferred", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicebus/azure/servicebus/servicebus_client.py#L515-L547
[ "def", "settle_deferred_messages", "(", "self", ",", "settlement", ",", "messages", ",", "*", "*", "kwargs", ")", ":", "if", "(", "self", ".", "entity", "and", "self", ".", "requires_session", ")", "or", "kwargs", ".", "get", "(", "'session'", ")", ":", ...
d7306fde32f60a293a7567678692bdad31e4b667
test
WebsiteManagementService.get_site
List the web sites defined on this webspace. webspace_name: The name of the webspace. website_name: The name of the website.
azure-servicemanagement-legacy/azure/servicemanagement/websitemanagementservice.py
def get_site(self, webspace_name, website_name): ''' List the web sites defined on this webspace. webspace_name: The name of the webspace. website_name: The name of the website. ''' return self._perform_get(self._get_sites_details_path(webspace_na...
def get_site(self, webspace_name, website_name): ''' List the web sites defined on this webspace. webspace_name: The name of the webspace. website_name: The name of the website. ''' return self._perform_get(self._get_sites_details_path(webspace_na...
[ "List", "the", "web", "sites", "defined", "on", "this", "webspace", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicemanagement-legacy/azure/servicemanagement/websitemanagementservice.py#L103-L114
[ "def", "get_site", "(", "self", ",", "webspace_name", ",", "website_name", ")", ":", "return", "self", ".", "_perform_get", "(", "self", ".", "_get_sites_details_path", "(", "webspace_name", ",", "website_name", ")", ",", "Site", ")" ]
d7306fde32f60a293a7567678692bdad31e4b667
test
WebsiteManagementService.create_site
Create a website. webspace_name: The name of the webspace. website_name: The name of the website. geo_region: The geographical region of the webspace that will be created. host_names: An array of fully qualified domain names for website. O...
azure-servicemanagement-legacy/azure/servicemanagement/websitemanagementservice.py
def create_site(self, webspace_name, website_name, geo_region, host_names, plan='VirtualDedicatedPlan', compute_mode='Shared', server_farm=None, site_mode=None): ''' Create a website. webspace_name: The name of the webspace. website_na...
def create_site(self, webspace_name, website_name, geo_region, host_names, plan='VirtualDedicatedPlan', compute_mode='Shared', server_farm=None, site_mode=None): ''' Create a website. webspace_name: The name of the webspace. website_na...
[ "Create", "a", "website", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicemanagement-legacy/azure/servicemanagement/websitemanagementservice.py#L116-L153
[ "def", "create_site", "(", "self", ",", "webspace_name", ",", "website_name", ",", "geo_region", ",", "host_names", ",", "plan", "=", "'VirtualDedicatedPlan'", ",", "compute_mode", "=", "'Shared'", ",", "server_farm", "=", "None", ",", "site_mode", "=", "None", ...
d7306fde32f60a293a7567678692bdad31e4b667
test
WebsiteManagementService.delete_site
Delete a website. webspace_name: The name of the webspace. website_name: The name of the website. delete_empty_server_farm: If the site being deleted is the last web site in a server farm, you can delete the server farm by setting this to True. ...
azure-servicemanagement-legacy/azure/servicemanagement/websitemanagementservice.py
def delete_site(self, webspace_name, website_name, delete_empty_server_farm=False, delete_metrics=False): ''' Delete a website. webspace_name: The name of the webspace. website_name: The name of the website. delete_empty_server_farm: ...
def delete_site(self, webspace_name, website_name, delete_empty_server_farm=False, delete_metrics=False): ''' Delete a website. webspace_name: The name of the webspace. website_name: The name of the website. delete_empty_server_farm: ...
[ "Delete", "a", "website", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicemanagement-legacy/azure/servicemanagement/websitemanagementservice.py#L155-L179
[ "def", "delete_site", "(", "self", ",", "webspace_name", ",", "website_name", ",", "delete_empty_server_farm", "=", "False", ",", "delete_metrics", "=", "False", ")", ":", "path", "=", "self", ".", "_get_sites_details_path", "(", "webspace_name", ",", "website_nam...
d7306fde32f60a293a7567678692bdad31e4b667
test
WebsiteManagementService.update_site
Update a web site. webspace_name: The name of the webspace. website_name: The name of the website. state: The wanted state ('Running' or 'Stopped' accepted)
azure-servicemanagement-legacy/azure/servicemanagement/websitemanagementservice.py
def update_site(self, webspace_name, website_name, state=None): ''' Update a web site. webspace_name: The name of the webspace. website_name: The name of the website. state: The wanted state ('Running' or 'Stopped' accepted) ''' ...
def update_site(self, webspace_name, website_name, state=None): ''' Update a web site. webspace_name: The name of the webspace. website_name: The name of the website. state: The wanted state ('Running' or 'Stopped' accepted) ''' ...
[ "Update", "a", "web", "site", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicemanagement-legacy/azure/servicemanagement/websitemanagementservice.py#L181-L195
[ "def", "update_site", "(", "self", ",", "webspace_name", ",", "website_name", ",", "state", "=", "None", ")", ":", "xml", "=", "_XmlSerializer", ".", "update_website_to_xml", "(", "state", ")", "return", "self", ".", "_perform_put", "(", "self", ".", "_get_s...
d7306fde32f60a293a7567678692bdad31e4b667
test
WebsiteManagementService.restart_site
Restart a web site. webspace_name: The name of the webspace. website_name: The name of the website.
azure-servicemanagement-legacy/azure/servicemanagement/websitemanagementservice.py
def restart_site(self, webspace_name, website_name): ''' Restart a web site. webspace_name: The name of the webspace. website_name: The name of the website. ''' return self._perform_post( self._get_restart_path(webspace_name, website_n...
def restart_site(self, webspace_name, website_name): ''' Restart a web site. webspace_name: The name of the webspace. website_name: The name of the website. ''' return self._perform_post( self._get_restart_path(webspace_name, website_n...
[ "Restart", "a", "web", "site", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicemanagement-legacy/azure/servicemanagement/websitemanagementservice.py#L197-L208
[ "def", "restart_site", "(", "self", ",", "webspace_name", ",", "website_name", ")", ":", "return", "self", ".", "_perform_post", "(", "self", ".", "_get_restart_path", "(", "webspace_name", ",", "website_name", ")", ",", "None", ",", "as_async", "=", "True", ...
d7306fde32f60a293a7567678692bdad31e4b667
test
WebsiteManagementService.get_historical_usage_metrics
Get historical usage metrics. webspace_name: The name of the webspace. website_name: The name of the website. metrics: Optional. List of metrics name. Otherwise, all metrics returned. start_time: Optional. An ISO8601 date. Otherwise, curre...
azure-servicemanagement-legacy/azure/servicemanagement/websitemanagementservice.py
def get_historical_usage_metrics(self, webspace_name, website_name, metrics = None, start_time=None, end_time=None, time_grain=None): ''' Get historical usage metrics. webspace_name: The name of the webspace. website_name: The...
def get_historical_usage_metrics(self, webspace_name, website_name, metrics = None, start_time=None, end_time=None, time_grain=None): ''' Get historical usage metrics. webspace_name: The name of the webspace. website_name: The...
[ "Get", "historical", "usage", "metrics", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicemanagement-legacy/azure/servicemanagement/websitemanagementservice.py#L210-L237
[ "def", "get_historical_usage_metrics", "(", "self", ",", "webspace_name", ",", "website_name", ",", "metrics", "=", "None", ",", "start_time", "=", "None", ",", "end_time", "=", "None", ",", "time_grain", "=", "None", ")", ":", "metrics", "=", "(", "'names='...
d7306fde32f60a293a7567678692bdad31e4b667
test
WebsiteManagementService.get_metric_definitions
Get metric definitions of metrics available of this web site. webspace_name: The name of the webspace. website_name: The name of the website.
azure-servicemanagement-legacy/azure/servicemanagement/websitemanagementservice.py
def get_metric_definitions(self, webspace_name, website_name): ''' Get metric definitions of metrics available of this web site. webspace_name: The name of the webspace. website_name: The name of the website. ''' return self._perform_get(self._get...
def get_metric_definitions(self, webspace_name, website_name): ''' Get metric definitions of metrics available of this web site. webspace_name: The name of the webspace. website_name: The name of the website. ''' return self._perform_get(self._get...
[ "Get", "metric", "definitions", "of", "metrics", "available", "of", "this", "web", "site", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicemanagement-legacy/azure/servicemanagement/websitemanagementservice.py#L239-L249
[ "def", "get_metric_definitions", "(", "self", ",", "webspace_name", ",", "website_name", ")", ":", "return", "self", ".", "_perform_get", "(", "self", ".", "_get_metric_definitions_path", "(", "webspace_name", ",", "website_name", ")", ",", "MetricDefinitions", ")" ...
d7306fde32f60a293a7567678692bdad31e4b667
test
WebsiteManagementService.get_publish_profile_xml
Get a site's publish profile as a string webspace_name: The name of the webspace. website_name: The name of the website.
azure-servicemanagement-legacy/azure/servicemanagement/websitemanagementservice.py
def get_publish_profile_xml(self, webspace_name, website_name): ''' Get a site's publish profile as a string webspace_name: The name of the webspace. website_name: The name of the website. ''' return self._perform_get(self._get_publishxml_path(web...
def get_publish_profile_xml(self, webspace_name, website_name): ''' Get a site's publish profile as a string webspace_name: The name of the webspace. website_name: The name of the website. ''' return self._perform_get(self._get_publishxml_path(web...
[ "Get", "a", "site", "s", "publish", "profile", "as", "a", "string" ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicemanagement-legacy/azure/servicemanagement/websitemanagementservice.py#L251-L261
[ "def", "get_publish_profile_xml", "(", "self", ",", "webspace_name", ",", "website_name", ")", ":", "return", "self", ".", "_perform_get", "(", "self", ".", "_get_publishxml_path", "(", "webspace_name", ",", "website_name", ")", ",", "None", ")", ".", "body", ...
d7306fde32f60a293a7567678692bdad31e4b667
test
WebsiteManagementService.get_publish_profile
Get a site's publish profile as an object webspace_name: The name of the webspace. website_name: The name of the website.
azure-servicemanagement-legacy/azure/servicemanagement/websitemanagementservice.py
def get_publish_profile(self, webspace_name, website_name): ''' Get a site's publish profile as an object webspace_name: The name of the webspace. website_name: The name of the website. ''' return self._perform_get(self._get_publishxml_path(webspa...
def get_publish_profile(self, webspace_name, website_name): ''' Get a site's publish profile as an object webspace_name: The name of the webspace. website_name: The name of the website. ''' return self._perform_get(self._get_publishxml_path(webspa...
[ "Get", "a", "site", "s", "publish", "profile", "as", "an", "object" ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicemanagement-legacy/azure/servicemanagement/websitemanagementservice.py#L263-L273
[ "def", "get_publish_profile", "(", "self", ",", "webspace_name", ",", "website_name", ")", ":", "return", "self", ".", "_perform_get", "(", "self", ".", "_get_publishxml_path", "(", "webspace_name", ",", "website_name", ")", ",", "PublishData", ")" ]
d7306fde32f60a293a7567678692bdad31e4b667
test
HttpMessageSecurity.protect_request
Adds authorization header, and encrypts and signs the request if supported on the specific request. :param request: unprotected request to apply security protocol :return: protected request with appropriate security protocal applied
azure-keyvault/azure/keyvault/http_message_security.py
def protect_request(self, request): """ Adds authorization header, and encrypts and signs the request if supported on the specific request. :param request: unprotected request to apply security protocol :return: protected request with appropriate security protocal applied """ ...
def protect_request(self, request): """ Adds authorization header, and encrypts and signs the request if supported on the specific request. :param request: unprotected request to apply security protocol :return: protected request with appropriate security protocal applied """ ...
[ "Adds", "authorization", "header", "and", "encrypts", "and", "signs", "the", "request", "if", "supported", "on", "the", "specific", "request", ".", ":", "param", "request", ":", "unprotected", "request", "to", "apply", "security", "protocol", ":", "return", ":...
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-keyvault/azure/keyvault/http_message_security.py#L39-L86
[ "def", "protect_request", "(", "self", ",", "request", ")", ":", "# Setup the auth header on the request", "# Due to limitations in the service we hard code the auth scheme to 'Bearer' as the service will fail with any", "# other scheme or a different casing such as 'bearer', once this is fixed ...
d7306fde32f60a293a7567678692bdad31e4b667
test
HttpMessageSecurity.unprotect_response
Removes protection from the specified response :param request: response from the key vault service :return: unprotected response with any security protocal encryption removed
azure-keyvault/azure/keyvault/http_message_security.py
def unprotect_response(self, response, **kwargs): """ Removes protection from the specified response :param request: response from the key vault service :return: unprotected response with any security protocal encryption removed """ body = response.content # if th...
def unprotect_response(self, response, **kwargs): """ Removes protection from the specified response :param request: response from the key vault service :return: unprotected response with any security protocal encryption removed """ body = response.content # if th...
[ "Removes", "protection", "from", "the", "specified", "response", ":", "param", "request", ":", "response", "from", "the", "key", "vault", "service", ":", "return", ":", "unprotected", "response", "with", "any", "security", "protocal", "encryption", "removed" ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-keyvault/azure/keyvault/http_message_security.py#L88-L127
[ "def", "unprotect_response", "(", "self", ",", "response", ",", "*", "*", "kwargs", ")", ":", "body", "=", "response", ".", "content", "# if the current message security doesn't support message protection, the body is empty, or the request failed", "# skip protection and return t...
d7306fde32f60a293a7567678692bdad31e4b667
test
HttpMessageSecurity.supports_protection
Determines if the the current HttpMessageSecurity object supports the message protection protocol. :return: True if the current object supports protection, otherwise False
azure-keyvault/azure/keyvault/http_message_security.py
def supports_protection(self): """ Determines if the the current HttpMessageSecurity object supports the message protection protocol. :return: True if the current object supports protection, otherwise False """ return self.client_signature_key \ and self.client_enc...
def supports_protection(self): """ Determines if the the current HttpMessageSecurity object supports the message protection protocol. :return: True if the current object supports protection, otherwise False """ return self.client_signature_key \ and self.client_enc...
[ "Determines", "if", "the", "the", "current", "HttpMessageSecurity", "object", "supports", "the", "message", "protection", "protocol", ".", ":", "return", ":", "True", "if", "the", "current", "object", "supports", "protection", "otherwise", "False" ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-keyvault/azure/keyvault/http_message_security.py#L129-L137
[ "def", "supports_protection", "(", "self", ")", ":", "return", "self", ".", "client_signature_key", "and", "self", ".", "client_encryption_key", "and", "self", ".", "server_signature_key", "and", "self", ".", "server_encryption_key" ]
d7306fde32f60a293a7567678692bdad31e4b667
test
RegistriesOperations.update_policies
Updates the policies for the specified container registry. :param resource_group_name: The name of the resource group to which the container registry belongs. :type resource_group_name: str :param registry_name: The name of the container registry. :type registry_name: str ...
azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/registries_operations.py
def update_policies( self, resource_group_name, registry_name, quarantine_policy=None, trust_policy=None, custom_headers=None, raw=False, polling=True, **operation_config): """Updates the policies for the specified container registry. :param resource_group_name: The name of the resource gro...
def update_policies( self, resource_group_name, registry_name, quarantine_policy=None, trust_policy=None, custom_headers=None, raw=False, polling=True, **operation_config): """Updates the policies for the specified container registry. :param resource_group_name: The name of the resource gro...
[ "Updates", "the", "policies", "for", "the", "specified", "container", "registry", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/registries_operations.py#L1030-L1085
[ "def", "update_policies", "(", "self", ",", "resource_group_name", ",", "registry_name", ",", "quarantine_policy", "=", "None", ",", "trust_policy", "=", "None", ",", "custom_headers", "=", "None", ",", "raw", "=", "False", ",", "polling", "=", "True", ",", ...
d7306fde32f60a293a7567678692bdad31e4b667
test
SchedulerManagementService.create_cloud_service
The Create Cloud Service request creates a new cloud service. When job collections are created, they are hosted within a cloud service. A cloud service groups job collections together in a given region. Once a cloud service has been created, job collections can then be created and contai...
azure-servicemanagement-legacy/azure/servicemanagement/schedulermanagementservice.py
def create_cloud_service(self, cloud_service_id, label, description, geo_region): ''' The Create Cloud Service request creates a new cloud service. When job collections are created, they are hosted within a cloud service. A cloud service groups job collections together in a given region....
def create_cloud_service(self, cloud_service_id, label, description, geo_region): ''' The Create Cloud Service request creates a new cloud service. When job collections are created, they are hosted within a cloud service. A cloud service groups job collections together in a given region....
[ "The", "Create", "Cloud", "Service", "request", "creates", "a", "new", "cloud", "service", ".", "When", "job", "collections", "are", "created", "they", "are", "hosted", "within", "a", "cloud", "service", ".", "A", "cloud", "service", "groups", "job", "collec...
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicemanagement-legacy/azure/servicemanagement/schedulermanagementservice.py#L87-L113
[ "def", "create_cloud_service", "(", "self", ",", "cloud_service_id", ",", "label", ",", "description", ",", "geo_region", ")", ":", "_validate_not_none", "(", "'cloud_service_id'", ",", "cloud_service_id", ")", "_validate_not_none", "(", "'label'", ",", "label", ")"...
d7306fde32f60a293a7567678692bdad31e4b667
test
SchedulerManagementService.get_cloud_service
The Get Cloud Service operation gets all the resources (job collections) in the cloud service. cloud_service_id: The cloud service id
azure-servicemanagement-legacy/azure/servicemanagement/schedulermanagementservice.py
def get_cloud_service(self, cloud_service_id): ''' The Get Cloud Service operation gets all the resources (job collections) in the cloud service. cloud_service_id: The cloud service id ''' _validate_not_none('cloud_service_id', cloud_service_id) path ...
def get_cloud_service(self, cloud_service_id): ''' The Get Cloud Service operation gets all the resources (job collections) in the cloud service. cloud_service_id: The cloud service id ''' _validate_not_none('cloud_service_id', cloud_service_id) path ...
[ "The", "Get", "Cloud", "Service", "operation", "gets", "all", "the", "resources", "(", "job", "collections", ")", "in", "the", "cloud", "service", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicemanagement-legacy/azure/servicemanagement/schedulermanagementservice.py#L115-L125
[ "def", "get_cloud_service", "(", "self", ",", "cloud_service_id", ")", ":", "_validate_not_none", "(", "'cloud_service_id'", ",", "cloud_service_id", ")", "path", "=", "self", ".", "_get_cloud_services_path", "(", "cloud_service_id", ")", "return", "self", ".", "_pe...
d7306fde32f60a293a7567678692bdad31e4b667
test
SchedulerManagementService.delete_cloud_service
The Get Cloud Service operation gets all the resources (job collections) in the cloud service. cloud_service_id: The cloud service id
azure-servicemanagement-legacy/azure/servicemanagement/schedulermanagementservice.py
def delete_cloud_service(self, cloud_service_id): ''' The Get Cloud Service operation gets all the resources (job collections) in the cloud service. cloud_service_id: The cloud service id ''' _validate_not_none('cloud_service_id', cloud_service_id) pa...
def delete_cloud_service(self, cloud_service_id): ''' The Get Cloud Service operation gets all the resources (job collections) in the cloud service. cloud_service_id: The cloud service id ''' _validate_not_none('cloud_service_id', cloud_service_id) pa...
[ "The", "Get", "Cloud", "Service", "operation", "gets", "all", "the", "resources", "(", "job", "collections", ")", "in", "the", "cloud", "service", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicemanagement-legacy/azure/servicemanagement/schedulermanagementservice.py#L127-L137
[ "def", "delete_cloud_service", "(", "self", ",", "cloud_service_id", ")", ":", "_validate_not_none", "(", "'cloud_service_id'", ",", "cloud_service_id", ")", "path", "=", "self", ".", "_get_cloud_services_path", "(", "cloud_service_id", ")", "return", "self", ".", "...
d7306fde32f60a293a7567678692bdad31e4b667
test
SchedulerManagementService.check_job_collection_name
The Check Name Availability operation checks if a new job collection with the given name may be created, or if it is unavailable. The result of the operation is a Boolean true or false. cloud_service_id: The cloud service id job_collection_id: The name of the job...
azure-servicemanagement-legacy/azure/servicemanagement/schedulermanagementservice.py
def check_job_collection_name(self, cloud_service_id, job_collection_id): ''' The Check Name Availability operation checks if a new job collection with the given name may be created, or if it is unavailable. The result of the operation is a Boolean true or false. cloud_service_i...
def check_job_collection_name(self, cloud_service_id, job_collection_id): ''' The Check Name Availability operation checks if a new job collection with the given name may be created, or if it is unavailable. The result of the operation is a Boolean true or false. cloud_service_i...
[ "The", "Check", "Name", "Availability", "operation", "checks", "if", "a", "new", "job", "collection", "with", "the", "given", "name", "may", "be", "created", "or", "if", "it", "is", "unavailable", ".", "The", "result", "of", "the", "operation", "is", "a", ...
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicemanagement-legacy/azure/servicemanagement/schedulermanagementservice.py#L139-L156
[ "def", "check_job_collection_name", "(", "self", ",", "cloud_service_id", ",", "job_collection_id", ")", ":", "_validate_not_none", "(", "'cloud_service_id'", ",", "cloud_service_id", ")", "_validate_not_none", "(", "'job_collection_id'", ",", "job_collection_id", ")", "p...
d7306fde32f60a293a7567678692bdad31e4b667
test
SchedulerManagementService.create_job_collection
The Create Job Collection request is specified as follows. Replace <subscription-id> with your subscription ID, <cloud-service-id> with your cloud service ID, and <job-collection-id> with the ID of the job collection you\'d like to create. There are no "default" pre-existing job collections ever...
azure-servicemanagement-legacy/azure/servicemanagement/schedulermanagementservice.py
def create_job_collection(self, cloud_service_id, job_collection_id, plan="Standard"): ''' The Create Job Collection request is specified as follows. Replace <subscription-id> with your subscription ID, <cloud-service-id> with your cloud service ID, and <job-collection-id> with the ID of...
def create_job_collection(self, cloud_service_id, job_collection_id, plan="Standard"): ''' The Create Job Collection request is specified as follows. Replace <subscription-id> with your subscription ID, <cloud-service-id> with your cloud service ID, and <job-collection-id> with the ID of...
[ "The", "Create", "Job", "Collection", "request", "is", "specified", "as", "follows", ".", "Replace", "<subscription", "-", "id", ">", "with", "your", "subscription", "ID", "<cloud", "-", "service", "-", "id", ">", "with", "your", "cloud", "service", "ID", ...
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicemanagement-legacy/azure/servicemanagement/schedulermanagementservice.py#L158-L181
[ "def", "create_job_collection", "(", "self", ",", "cloud_service_id", ",", "job_collection_id", ",", "plan", "=", "\"Standard\"", ")", ":", "_validate_not_none", "(", "'cloud_service_id'", ",", "cloud_service_id", ")", "_validate_not_none", "(", "'job_collection_id'", "...
d7306fde32f60a293a7567678692bdad31e4b667
test
SchedulerManagementService.delete_job_collection
The Delete Job Collection request is specified as follows. Replace <subscription-id> with your subscription ID, <cloud-service-id> with your cloud service ID, and <job-collection-id> with the ID of the job collection you\'d like to delete. cloud_service_id: The cloud service id ...
azure-servicemanagement-legacy/azure/servicemanagement/schedulermanagementservice.py
def delete_job_collection(self, cloud_service_id, job_collection_id): ''' The Delete Job Collection request is specified as follows. Replace <subscription-id> with your subscription ID, <cloud-service-id> with your cloud service ID, and <job-collection-id> with the ID of the job collecti...
def delete_job_collection(self, cloud_service_id, job_collection_id): ''' The Delete Job Collection request is specified as follows. Replace <subscription-id> with your subscription ID, <cloud-service-id> with your cloud service ID, and <job-collection-id> with the ID of the job collecti...
[ "The", "Delete", "Job", "Collection", "request", "is", "specified", "as", "follows", ".", "Replace", "<subscription", "-", "id", ">", "with", "your", "subscription", "ID", "<cloud", "-", "service", "-", "id", ">", "with", "your", "cloud", "service", "ID", ...
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicemanagement-legacy/azure/servicemanagement/schedulermanagementservice.py#L183-L202
[ "def", "delete_job_collection", "(", "self", ",", "cloud_service_id", ",", "job_collection_id", ")", ":", "_validate_not_none", "(", "'cloud_service_id'", ",", "cloud_service_id", ")", "_validate_not_none", "(", "'job_collection_id'", ",", "job_collection_id", ")", "path"...
d7306fde32f60a293a7567678692bdad31e4b667
test
SchedulerManagementService.get_job_collection
The Get Job Collection operation gets the details of a job collection cloud_service_id: The cloud service id job_collection_id: Name of the hosted service.
azure-servicemanagement-legacy/azure/servicemanagement/schedulermanagementservice.py
def get_job_collection(self, cloud_service_id, job_collection_id): ''' The Get Job Collection operation gets the details of a job collection cloud_service_id: The cloud service id job_collection_id: Name of the hosted service. ''' _validate_not_no...
def get_job_collection(self, cloud_service_id, job_collection_id): ''' The Get Job Collection operation gets the details of a job collection cloud_service_id: The cloud service id job_collection_id: Name of the hosted service. ''' _validate_not_no...
[ "The", "Get", "Job", "Collection", "operation", "gets", "the", "details", "of", "a", "job", "collection" ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicemanagement-legacy/azure/servicemanagement/schedulermanagementservice.py#L204-L219
[ "def", "get_job_collection", "(", "self", ",", "cloud_service_id", ",", "job_collection_id", ")", ":", "_validate_not_none", "(", "'cloud_service_id'", ",", "cloud_service_id", ")", "_validate_not_none", "(", "'job_collection_id'", ",", "job_collection_id", ")", "path", ...
d7306fde32f60a293a7567678692bdad31e4b667
test
SchedulerManagementService.create_job
The Create Job request creates a new job. cloud_service_id: The cloud service id job_collection_id: Name of the hosted service. job_id: The job id you wish to create. job: A dictionary of the payload
azure-servicemanagement-legacy/azure/servicemanagement/schedulermanagementservice.py
def create_job(self, cloud_service_id, job_collection_id, job_id, job): ''' The Create Job request creates a new job. cloud_service_id: The cloud service id job_collection_id: Name of the hosted service. job_id: The job id you wish to create. ...
def create_job(self, cloud_service_id, job_collection_id, job_id, job): ''' The Create Job request creates a new job. cloud_service_id: The cloud service id job_collection_id: Name of the hosted service. job_id: The job id you wish to create. ...
[ "The", "Create", "Job", "request", "creates", "a", "new", "job", ".", "cloud_service_id", ":", "The", "cloud", "service", "id", "job_collection_id", ":", "Name", "of", "the", "hosted", "service", ".", "job_id", ":", "The", "job", "id", "you", "wish", "to",...
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicemanagement-legacy/azure/servicemanagement/schedulermanagementservice.py#L221-L242
[ "def", "create_job", "(", "self", ",", "cloud_service_id", ",", "job_collection_id", ",", "job_id", ",", "job", ")", ":", "_validate_not_none", "(", "'cloud_service_id'", ",", "cloud_service_id", ")", "_validate_not_none", "(", "'job_collection_id'", ",", "job_collect...
d7306fde32f60a293a7567678692bdad31e4b667
test
SchedulerManagementService.delete_job
The Delete Job request creates a new job. cloud_service_id: The cloud service id job_collection_id: Name of the hosted service. job_id: The job id you wish to create.
azure-servicemanagement-legacy/azure/servicemanagement/schedulermanagementservice.py
def delete_job(self, cloud_service_id, job_collection_id, job_id): ''' The Delete Job request creates a new job. cloud_service_id: The cloud service id job_collection_id: Name of the hosted service. job_id: The job id you wish to create. ...
def delete_job(self, cloud_service_id, job_collection_id, job_id): ''' The Delete Job request creates a new job. cloud_service_id: The cloud service id job_collection_id: Name of the hosted service. job_id: The job id you wish to create. ...
[ "The", "Delete", "Job", "request", "creates", "a", "new", "job", ".", "cloud_service_id", ":", "The", "cloud", "service", "id", "job_collection_id", ":", "Name", "of", "the", "hosted", "service", ".", "job_id", ":", "The", "job", "id", "you", "wish", "to",...
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicemanagement-legacy/azure/servicemanagement/schedulermanagementservice.py#L244-L260
[ "def", "delete_job", "(", "self", ",", "cloud_service_id", ",", "job_collection_id", ",", "job_id", ")", ":", "_validate_not_none", "(", "'cloud_service_id'", ",", "cloud_service_id", ")", "_validate_not_none", "(", "'job_collection_id'", ",", "job_collection_id", ")", ...
d7306fde32f60a293a7567678692bdad31e4b667
test
SchedulerManagementService.get_job
The Get Job operation gets the details (including the current job status) of the specified job from the specified job collection. The return type is cloud_service_id: The cloud service id job_collection_id: Name of the hosted service. job_id: ...
azure-servicemanagement-legacy/azure/servicemanagement/schedulermanagementservice.py
def get_job(self, cloud_service_id, job_collection_id, job_id): ''' The Get Job operation gets the details (including the current job status) of the specified job from the specified job collection. The return type is cloud_service_id: The cloud service id jo...
def get_job(self, cloud_service_id, job_collection_id, job_id): ''' The Get Job operation gets the details (including the current job status) of the specified job from the specified job collection. The return type is cloud_service_id: The cloud service id jo...
[ "The", "Get", "Job", "operation", "gets", "the", "details", "(", "including", "the", "current", "job", "status", ")", "of", "the", "specified", "job", "from", "the", "specified", "job", "collection", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicemanagement-legacy/azure/servicemanagement/schedulermanagementservice.py#L262-L285
[ "def", "get_job", "(", "self", ",", "cloud_service_id", ",", "job_collection_id", ",", "job_id", ")", ":", "_validate_not_none", "(", "'cloud_service_id'", ",", "cloud_service_id", ")", "_validate_not_none", "(", "'job_collection_id'", ",", "job_collection_id", ")", "...
d7306fde32f60a293a7567678692bdad31e4b667
test
ManagedDatabasesOperations.complete_restore
Completes the restore operation on a managed database. :param location_name: The name of the region where the resource is located. :type location_name: str :param operation_id: Management operation id that this request tries to complete. :type operation_id: str ...
azure-mgmt-sql/azure/mgmt/sql/operations/managed_databases_operations.py
def complete_restore( self, location_name, operation_id, last_backup_name, custom_headers=None, raw=False, polling=True, **operation_config): """Completes the restore operation on a managed database. :param location_name: The name of the region where the resource is located. ...
def complete_restore( self, location_name, operation_id, last_backup_name, custom_headers=None, raw=False, polling=True, **operation_config): """Completes the restore operation on a managed database. :param location_name: The name of the region where the resource is located. ...
[ "Completes", "the", "restore", "operation", "on", "a", "managed", "database", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-mgmt-sql/azure/mgmt/sql/operations/managed_databases_operations.py#L86-L129
[ "def", "complete_restore", "(", "self", ",", "location_name", ",", "operation_id", ",", "last_backup_name", ",", "custom_headers", "=", "None", ",", "raw", "=", "False", ",", "polling", "=", "True", ",", "*", "*", "operation_config", ")", ":", "raw_result", ...
d7306fde32f60a293a7567678692bdad31e4b667
test
KeyVaultClient.models
Module depends on the API version: * 2016-10-01: :mod:`v2016_10_01.models<azure.keyvault.v2016_10_01.models>` * 7.0: :mod:`v7_0.models<azure.keyvault.v7_0.models>`
azure-keyvault/azure/keyvault/key_vault_client.py
def models(self): """Module depends on the API version: * 2016-10-01: :mod:`v2016_10_01.models<azure.keyvault.v2016_10_01.models>` * 7.0: :mod:`v7_0.models<azure.keyvault.v7_0.models>` """ api_version = self._get_api_version(None) if api_version == v7_0_VERSION:...
def models(self): """Module depends on the API version: * 2016-10-01: :mod:`v2016_10_01.models<azure.keyvault.v2016_10_01.models>` * 7.0: :mod:`v7_0.models<azure.keyvault.v7_0.models>` """ api_version = self._get_api_version(None) if api_version == v7_0_VERSION:...
[ "Module", "depends", "on", "the", "API", "version", ":", "*", "2016", "-", "10", "-", "01", ":", ":", "mod", ":", "v2016_10_01", ".", "models<azure", ".", "keyvault", ".", "v2016_10_01", ".", "models", ">", "*", "7", ".", "0", ":", ":", "mod", ":",...
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-keyvault/azure/keyvault/key_vault_client.py#L100-L113
[ "def", "models", "(", "self", ")", ":", "api_version", "=", "self", ".", "_get_api_version", "(", "None", ")", "if", "api_version", "==", "v7_0_VERSION", ":", "from", "azure", ".", "keyvault", ".", "v7_0", "import", "models", "as", "implModels", "elif", "a...
d7306fde32f60a293a7567678692bdad31e4b667
test
KeyVaultClient._get_client_impl
Get the versioned client implementation corresponding to the current profile. :return: The versioned client implementation.
azure-keyvault/azure/keyvault/key_vault_client.py
def _get_client_impl(self): """ Get the versioned client implementation corresponding to the current profile. :return: The versioned client implementation. """ api_version = self._get_api_version(None) if api_version not in self._client_impls: self._create_cl...
def _get_client_impl(self): """ Get the versioned client implementation corresponding to the current profile. :return: The versioned client implementation. """ api_version = self._get_api_version(None) if api_version not in self._client_impls: self._create_cl...
[ "Get", "the", "versioned", "client", "implementation", "corresponding", "to", "the", "current", "profile", ".", ":", "return", ":", "The", "versioned", "client", "implementation", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-keyvault/azure/keyvault/key_vault_client.py#L115-L123
[ "def", "_get_client_impl", "(", "self", ")", ":", "api_version", "=", "self", ".", "_get_api_version", "(", "None", ")", "if", "api_version", "not", "in", "self", ".", "_client_impls", ":", "self", ".", "_create_client_impl", "(", "api_version", ")", "return",...
d7306fde32f60a293a7567678692bdad31e4b667
test
KeyVaultClient._create_client_impl
Creates the client implementation corresponding to the specifeid api_version. :param api_version: :return:
azure-keyvault/azure/keyvault/key_vault_client.py
def _create_client_impl(self, api_version): """ Creates the client implementation corresponding to the specifeid api_version. :param api_version: :return: """ if api_version == v7_0_VERSION: from azure.keyvault.v7_0 import KeyVaultClient as ImplClient ...
def _create_client_impl(self, api_version): """ Creates the client implementation corresponding to the specifeid api_version. :param api_version: :return: """ if api_version == v7_0_VERSION: from azure.keyvault.v7_0 import KeyVaultClient as ImplClient ...
[ "Creates", "the", "client", "implementation", "corresponding", "to", "the", "specifeid", "api_version", ".", ":", "param", "api_version", ":", ":", "return", ":" ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-keyvault/azure/keyvault/key_vault_client.py#L125-L146
[ "def", "_create_client_impl", "(", "self", ",", "api_version", ")", ":", "if", "api_version", "==", "v7_0_VERSION", ":", "from", "azure", ".", "keyvault", ".", "v7_0", "import", "KeyVaultClient", "as", "ImplClient", "elif", "api_version", "==", "v2016_10_01_VERSIO...
d7306fde32f60a293a7567678692bdad31e4b667
test
Sender.schedule
Send one or more messages to be enqueued at a specific time. Returns a list of the sequence numbers of the enqueued messages. :param schedule_time: The date and time to enqueue the messages. :type schedule_time: ~datetime.datetime :param messages: The messages to schedule. :typ...
azure-servicebus/azure/servicebus/aio/async_send_handler.py
async def schedule(self, schedule_time, *messages): """Send one or more messages to be enqueued at a specific time. Returns a list of the sequence numbers of the enqueued messages. :param schedule_time: The date and time to enqueue the messages. :type schedule_time: ~datetime.datetime ...
async def schedule(self, schedule_time, *messages): """Send one or more messages to be enqueued at a specific time. Returns a list of the sequence numbers of the enqueued messages. :param schedule_time: The date and time to enqueue the messages. :type schedule_time: ~datetime.datetime ...
[ "Send", "one", "or", "more", "messages", "to", "be", "enqueued", "at", "a", "specific", "time", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicebus/azure/servicebus/aio/async_send_handler.py#L99-L125
[ "async", "def", "schedule", "(", "self", ",", "schedule_time", ",", "*", "messages", ")", ":", "if", "not", "self", ".", "running", ":", "await", "self", ".", "open", "(", ")", "request_body", "=", "self", ".", "_build_schedule_request", "(", "schedule_tim...
d7306fde32f60a293a7567678692bdad31e4b667
test
Sender.cancel_scheduled_messages
Cancel one or more messages that have previsouly been scheduled and are still pending. :param sequence_numbers: The seqeuence numbers of the scheduled messages. :type sequence_numbers: int Example: .. literalinclude:: ../examples/async_examples/test_examples_async.py ...
azure-servicebus/azure/servicebus/aio/async_send_handler.py
async def cancel_scheduled_messages(self, *sequence_numbers): """Cancel one or more messages that have previsouly been scheduled and are still pending. :param sequence_numbers: The seqeuence numbers of the scheduled messages. :type sequence_numbers: int Example: .. literali...
async def cancel_scheduled_messages(self, *sequence_numbers): """Cancel one or more messages that have previsouly been scheduled and are still pending. :param sequence_numbers: The seqeuence numbers of the scheduled messages. :type sequence_numbers: int Example: .. literali...
[ "Cancel", "one", "or", "more", "messages", "that", "have", "previsouly", "been", "scheduled", "and", "are", "still", "pending", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicebus/azure/servicebus/aio/async_send_handler.py#L127-L149
[ "async", "def", "cancel_scheduled_messages", "(", "self", ",", "*", "sequence_numbers", ")", ":", "if", "not", "self", ".", "running", ":", "await", "self", ".", "open", "(", ")", "numbers", "=", "[", "types", ".", "AMQPLong", "(", "s", ")", "for", "s"...
d7306fde32f60a293a7567678692bdad31e4b667
test
Sender.send_pending_messages
Wait until all pending messages have been sent. :returns: A list of the send results of all the pending messages. Each send result is a tuple with two values. The first is a boolean, indicating `True` if the message sent, or `False` if it failed. The second is an error if the message ...
azure-servicebus/azure/servicebus/aio/async_send_handler.py
async def send_pending_messages(self): """Wait until all pending messages have been sent. :returns: A list of the send results of all the pending messages. Each send result is a tuple with two values. The first is a boolean, indicating `True` if the message sent, or `False` if it fail...
async def send_pending_messages(self): """Wait until all pending messages have been sent. :returns: A list of the send results of all the pending messages. Each send result is a tuple with two values. The first is a boolean, indicating `True` if the message sent, or `False` if it fail...
[ "Wait", "until", "all", "pending", "messages", "have", "been", "sent", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicebus/azure/servicebus/aio/async_send_handler.py#L151-L182
[ "async", "def", "send_pending_messages", "(", "self", ")", ":", "if", "not", "self", ".", "running", ":", "await", "self", ".", "open", "(", ")", "try", ":", "pending", "=", "self", ".", "_handler", ".", "_pending_messages", "[", ":", "]", "# pylint: dis...
d7306fde32f60a293a7567678692bdad31e4b667
test
Sender.reconnect
Reconnect the handler. If the handler was disconnected from the service with a retryable error - attempt to reconnect. This method will be called automatically for most retryable errors. Also attempts to re-queue any messages that were pending before the reconnect.
azure-servicebus/azure/servicebus/aio/async_send_handler.py
async def reconnect(self): """Reconnect the handler. If the handler was disconnected from the service with a retryable error - attempt to reconnect. This method will be called automatically for most retryable errors. Also attempts to re-queue any messages that were pending befor...
async def reconnect(self): """Reconnect the handler. If the handler was disconnected from the service with a retryable error - attempt to reconnect. This method will be called automatically for most retryable errors. Also attempts to re-queue any messages that were pending befor...
[ "Reconnect", "the", "handler", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicebus/azure/servicebus/aio/async_send_handler.py#L184-L198
[ "async", "def", "reconnect", "(", "self", ")", ":", "unsent_events", "=", "self", ".", "_handler", ".", "pending_messages", "await", "super", "(", "Sender", ",", "self", ")", ".", "reconnect", "(", ")", "try", ":", "self", ".", "_handler", ".", "queue_me...
d7306fde32f60a293a7567678692bdad31e4b667
test
SessionSender.send
Send a message and blocks until acknowledgement is received or the operation fails. If neither the Sender nor the message has a session ID, a `ValueError` will be raised. :param message: The message to be sent. :type message: ~azure.servicebus.aio.async_message.Message :raises: ~azure....
azure-servicebus/azure/servicebus/aio/async_send_handler.py
async def send(self, message): """Send a message and blocks until acknowledgement is received or the operation fails. If neither the Sender nor the message has a session ID, a `ValueError` will be raised. :param message: The message to be sent. :type message: ~azure.servicebus.aio.asyn...
async def send(self, message): """Send a message and blocks until acknowledgement is received or the operation fails. If neither the Sender nor the message has a session ID, a `ValueError` will be raised. :param message: The message to be sent. :type message: ~azure.servicebus.aio.asyn...
[ "Send", "a", "message", "and", "blocks", "until", "acknowledgement", "is", "received", "or", "the", "operation", "fails", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicebus/azure/servicebus/aio/async_send_handler.py#L233-L256
[ "async", "def", "send", "(", "self", ",", "message", ")", ":", "if", "not", "isinstance", "(", "message", ",", "Message", ")", ":", "raise", "TypeError", "(", "\"Value of message must be of type 'Message'.\"", ")", "if", "not", "self", ".", "session_id", "and"...
d7306fde32f60a293a7567678692bdad31e4b667
test
get_certificate_from_publish_settings
Writes a certificate file to the specified location. This can then be used to instantiate ServiceManagementService. Returns the subscription ID. publish_settings_path: Path to subscription file downloaded from http://go.microsoft.com/fwlink/?LinkID=301775 path_to_write_certificate: ...
azure-servicemanagement-legacy/azure/servicemanagement/publishsettings.py
def get_certificate_from_publish_settings(publish_settings_path, path_to_write_certificate, subscription_id=None): ''' Writes a certificate file to the specified location. This can then be used to instantiate ServiceManagementService. Returns the subscription ID. publish_settings_path: Path...
def get_certificate_from_publish_settings(publish_settings_path, path_to_write_certificate, subscription_id=None): ''' Writes a certificate file to the specified location. This can then be used to instantiate ServiceManagementService. Returns the subscription ID. publish_settings_path: Path...
[ "Writes", "a", "certificate", "file", "to", "the", "specified", "location", ".", "This", "can", "then", "be", "used", "to", "instantiate", "ServiceManagementService", ".", "Returns", "the", "subscription", "ID", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-servicemanagement-legacy/azure/servicemanagement/publishsettings.py#L23-L77
[ "def", "get_certificate_from_publish_settings", "(", "publish_settings_path", ",", "path_to_write_certificate", ",", "subscription_id", "=", "None", ")", ":", "import", "base64", "try", ":", "from", "xml", ".", "etree", "import", "cElementTree", "as", "ET", "except", ...
d7306fde32f60a293a7567678692bdad31e4b667
test
WebOperations.search
The Web Search API lets you send a search query to Bing and get back search results that include links to webpages, images, and more. :param query: The user's search query term. The term may not be empty. The term may contain Bing Advanced Operators. For example, to limit results to a...
azure-cognitiveservices-search-websearch/azure/cognitiveservices/search/websearch/operations/web_operations.py
def search( self, query, accept_language=None, pragma=None, user_agent=None, client_id=None, client_ip=None, location=None, answer_count=None, country_code=None, count=None, freshness=None, market="en-us", offset=None, promote=None, response_filter=None, safe_search=None, set_lang=None, text_decorations=Non...
def search( self, query, accept_language=None, pragma=None, user_agent=None, client_id=None, client_ip=None, location=None, answer_count=None, country_code=None, count=None, freshness=None, market="en-us", offset=None, promote=None, response_filter=None, safe_search=None, set_lang=None, text_decorations=Non...
[ "The", "Web", "Search", "API", "lets", "you", "send", "a", "search", "query", "to", "Bing", "and", "get", "back", "search", "results", "that", "include", "links", "to", "webpages", "images", "and", "more", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-cognitiveservices-search-websearch/azure/cognitiveservices/search/websearch/operations/web_operations.py#L38-L376
[ "def", "search", "(", "self", ",", "query", ",", "accept_language", "=", "None", ",", "pragma", "=", "None", ",", "user_agent", "=", "None", ",", "client_id", "=", "None", ",", "client_ip", "=", "None", ",", "location", "=", "None", ",", "answer_count", ...
d7306fde32f60a293a7567678692bdad31e4b667
test
CustomInstanceOperations.image_search
The Custom Image Search API lets you send an image search query to Bing and get image results found in your custom view of the web. :param custom_config: The identifier for the custom search configuration :type custom_config: long :param query: The user's search query term. The...
azure-cognitiveservices-search-customimagesearch/azure/cognitiveservices/search/customimagesearch/operations/custom_instance_operations.py
def image_search( self, custom_config, query, accept_language=None, user_agent=None, client_id=None, client_ip=None, location=None, aspect=None, color=None, country_code=None, count=None, freshness=None, height=None, id=None, image_content=None, image_type=None, license=None, market=None, max_file_size=None...
def image_search( self, custom_config, query, accept_language=None, user_agent=None, client_id=None, client_ip=None, location=None, aspect=None, color=None, country_code=None, count=None, freshness=None, height=None, id=None, image_content=None, image_type=None, license=None, market=None, max_file_size=None...
[ "The", "Custom", "Image", "Search", "API", "lets", "you", "send", "an", "image", "search", "query", "to", "Bing", "and", "get", "image", "results", "found", "in", "your", "custom", "view", "of", "the", "web", "." ]
Azure/azure-sdk-for-python
python
https://github.com/Azure/azure-sdk-for-python/blob/d7306fde32f60a293a7567678692bdad31e4b667/azure-cognitiveservices-search-customimagesearch/azure/cognitiveservices/search/customimagesearch/operations/custom_instance_operations.py#L38-L497
[ "def", "image_search", "(", "self", ",", "custom_config", ",", "query", ",", "accept_language", "=", "None", ",", "user_agent", "=", "None", ",", "client_id", "=", "None", ",", "client_ip", "=", "None", ",", "location", "=", "None", ",", "aspect", "=", "...
d7306fde32f60a293a7567678692bdad31e4b667
test
Plugin.streams
Attempts to extract available streams. Returns a :class:`dict` containing the streams, where the key is the name of the stream, most commonly the quality and the value is a :class:`Stream` object. The result can contain the synonyms **best** and **worst** which points to the st...
src/streamlink/plugin/plugin.py
def streams(self, stream_types=None, sorting_excludes=None): """Attempts to extract available streams. Returns a :class:`dict` containing the streams, where the key is the name of the stream, most commonly the quality and the value is a :class:`Stream` object. The result can co...
def streams(self, stream_types=None, sorting_excludes=None): """Attempts to extract available streams. Returns a :class:`dict` containing the streams, where the key is the name of the stream, most commonly the quality and the value is a :class:`Stream` object. The result can co...
[ "Attempts", "to", "extract", "available", "streams", "." ]
streamlink/streamlink
python
https://github.com/streamlink/streamlink/blob/c8ed1daff14ac03195870238b9b900c1109dd5c1/src/streamlink/plugin/plugin.py#L280-L412
[ "def", "streams", "(", "self", ",", "stream_types", "=", "None", ",", "sorting_excludes", "=", "None", ")", ":", "try", ":", "ostreams", "=", "self", ".", "_get_streams", "(", ")", "if", "isinstance", "(", "ostreams", ",", "dict", ")", ":", "ostreams", ...
c8ed1daff14ac03195870238b9b900c1109dd5c1
test
Plugin.save_cookies
Store the cookies from ``http`` in the plugin cache until they expire. The cookies can be filtered by supplying a filter method. eg. ``lambda c: "auth" in c.name``. If no expiry date is given in the cookie then the ``default_expires`` value will be used. :param cookie_filter: a function to filt...
src/streamlink/plugin/plugin.py
def save_cookies(self, cookie_filter=None, default_expires=60 * 60 * 24 * 7): """ Store the cookies from ``http`` in the plugin cache until they expire. The cookies can be filtered by supplying a filter method. eg. ``lambda c: "auth" in c.name``. If no expiry date is given in the cookie ...
def save_cookies(self, cookie_filter=None, default_expires=60 * 60 * 24 * 7): """ Store the cookies from ``http`` in the plugin cache until they expire. The cookies can be filtered by supplying a filter method. eg. ``lambda c: "auth" in c.name``. If no expiry date is given in the cookie ...
[ "Store", "the", "cookies", "from", "http", "in", "the", "plugin", "cache", "until", "they", "expire", ".", "The", "cookies", "can", "be", "filtered", "by", "supplying", "a", "filter", "method", ".", "eg", ".", "lambda", "c", ":", "auth", "in", "c", "."...
streamlink/streamlink
python
https://github.com/streamlink/streamlink/blob/c8ed1daff14ac03195870238b9b900c1109dd5c1/src/streamlink/plugin/plugin.py#L426-L463
[ "def", "save_cookies", "(", "self", ",", "cookie_filter", "=", "None", ",", "default_expires", "=", "60", "*", "60", "*", "24", "*", "7", ")", ":", "if", "not", "self", ".", "session", "or", "not", "self", ".", "cache", ":", "raise", "RuntimeError", ...
c8ed1daff14ac03195870238b9b900c1109dd5c1
test
Plugin.load_cookies
Load any stored cookies for the plugin that have not expired. :return: list of the restored cookie names
src/streamlink/plugin/plugin.py
def load_cookies(self): """ Load any stored cookies for the plugin that have not expired. :return: list of the restored cookie names """ if not self.session or not self.cache: raise RuntimeError("Cannot loaded cached cookies in unbound plugin") restored = []...
def load_cookies(self): """ Load any stored cookies for the plugin that have not expired. :return: list of the restored cookie names """ if not self.session or not self.cache: raise RuntimeError("Cannot loaded cached cookies in unbound plugin") restored = []...
[ "Load", "any", "stored", "cookies", "for", "the", "plugin", "that", "have", "not", "expired", "." ]
streamlink/streamlink
python
https://github.com/streamlink/streamlink/blob/c8ed1daff14ac03195870238b9b900c1109dd5c1/src/streamlink/plugin/plugin.py#L465-L484
[ "def", "load_cookies", "(", "self", ")", ":", "if", "not", "self", ".", "session", "or", "not", "self", ".", "cache", ":", "raise", "RuntimeError", "(", "\"Cannot loaded cached cookies in unbound plugin\"", ")", "restored", "=", "[", "]", "for", "key", ",", ...
c8ed1daff14ac03195870238b9b900c1109dd5c1
test
Plugin.clear_cookies
Removes all of the saved cookies for this Plugin. To filter the cookies that are deleted specify the ``cookie_filter`` argument (see :func:`save_cookies`). :param cookie_filter: a function to filter the cookies :type cookie_filter: function :return: list of the removed cookie names
src/streamlink/plugin/plugin.py
def clear_cookies(self, cookie_filter=None): """ Removes all of the saved cookies for this Plugin. To filter the cookies that are deleted specify the ``cookie_filter`` argument (see :func:`save_cookies`). :param cookie_filter: a function to filter the cookies :type cookie_filter...
def clear_cookies(self, cookie_filter=None): """ Removes all of the saved cookies for this Plugin. To filter the cookies that are deleted specify the ``cookie_filter`` argument (see :func:`save_cookies`). :param cookie_filter: a function to filter the cookies :type cookie_filter...
[ "Removes", "all", "of", "the", "saved", "cookies", "for", "this", "Plugin", ".", "To", "filter", "the", "cookies", "that", "are", "deleted", "specify", "the", "cookie_filter", "argument", "(", "see", ":", "func", ":", "save_cookies", ")", "." ]
streamlink/streamlink
python
https://github.com/streamlink/streamlink/blob/c8ed1daff14ac03195870238b9b900c1109dd5c1/src/streamlink/plugin/plugin.py#L486-L509
[ "def", "clear_cookies", "(", "self", ",", "cookie_filter", "=", "None", ")", ":", "if", "not", "self", ".", "session", "or", "not", "self", ".", "cache", ":", "raise", "RuntimeError", "(", "\"Cannot loaded cached cookies in unbound plugin\"", ")", "cookie_filter",...
c8ed1daff14ac03195870238b9b900c1109dd5c1
test
shlex_quote
Return a shell-escaped version of the string *s*. Backported from Python 3.3 standard library module shlex.
src/streamlink_cli/compat.py
def shlex_quote(s): """Return a shell-escaped version of the string *s*. Backported from Python 3.3 standard library module shlex. """ if is_py3: # use the latest version instead of backporting if it's available return quote(s) if not s: return "''" if _find_unsafe(s) is None...
def shlex_quote(s): """Return a shell-escaped version of the string *s*. Backported from Python 3.3 standard library module shlex. """ if is_py3: # use the latest version instead of backporting if it's available return quote(s) if not s: return "''" if _find_unsafe(s) is None...
[ "Return", "a", "shell", "-", "escaped", "version", "of", "the", "string", "*", "s", "*", "." ]
streamlink/streamlink
python
https://github.com/streamlink/streamlink/blob/c8ed1daff14ac03195870238b9b900c1109dd5c1/src/streamlink_cli/compat.py#L27-L43
[ "def", "shlex_quote", "(", "s", ")", ":", "if", "is_py3", ":", "# use the latest version instead of backporting if it's available", "return", "quote", "(", "s", ")", "if", "not", "s", ":", "return", "\"''\"", "if", "_find_unsafe", "(", "s", ")", "is", "None", ...
c8ed1daff14ac03195870238b9b900c1109dd5c1
test
terminal_width
Returns the width of the string it would be when displayed.
src/streamlink_cli/utils/progress.py
def terminal_width(value): """Returns the width of the string it would be when displayed.""" if isinstance(value, bytes): value = value.decode("utf8", "ignore") return sum(map(get_width, map(ord, value)))
def terminal_width(value): """Returns the width of the string it would be when displayed.""" if isinstance(value, bytes): value = value.decode("utf8", "ignore") return sum(map(get_width, map(ord, value)))
[ "Returns", "the", "width", "of", "the", "string", "it", "would", "be", "when", "displayed", "." ]
streamlink/streamlink
python
https://github.com/streamlink/streamlink/blob/c8ed1daff14ac03195870238b9b900c1109dd5c1/src/streamlink_cli/utils/progress.py#L39-L43
[ "def", "terminal_width", "(", "value", ")", ":", "if", "isinstance", "(", "value", ",", "bytes", ")", ":", "value", "=", "value", ".", "decode", "(", "\"utf8\"", ",", "\"ignore\"", ")", "return", "sum", "(", "map", "(", "get_width", ",", "map", "(", ...
c8ed1daff14ac03195870238b9b900c1109dd5c1
test
get_cut_prefix
Drops Characters by unicode not by bytes.
src/streamlink_cli/utils/progress.py
def get_cut_prefix(value, max_len): """Drops Characters by unicode not by bytes.""" should_convert = isinstance(value, bytes) if should_convert: value = value.decode("utf8", "ignore") for i in range(len(value)): if terminal_width(value[i:]) <= max_len: break return value[...
def get_cut_prefix(value, max_len): """Drops Characters by unicode not by bytes.""" should_convert = isinstance(value, bytes) if should_convert: value = value.decode("utf8", "ignore") for i in range(len(value)): if terminal_width(value[i:]) <= max_len: break return value[...
[ "Drops", "Characters", "by", "unicode", "not", "by", "bytes", "." ]
streamlink/streamlink
python
https://github.com/streamlink/streamlink/blob/c8ed1daff14ac03195870238b9b900c1109dd5c1/src/streamlink_cli/utils/progress.py#L46-L54
[ "def", "get_cut_prefix", "(", "value", ",", "max_len", ")", ":", "should_convert", "=", "isinstance", "(", "value", ",", "bytes", ")", "if", "should_convert", ":", "value", "=", "value", ".", "decode", "(", "\"utf8\"", ",", "\"ignore\"", ")", "for", "i", ...
c8ed1daff14ac03195870238b9b900c1109dd5c1
test
print_inplace
Clears out the previous line and prints a new one.
src/streamlink_cli/utils/progress.py
def print_inplace(msg): """Clears out the previous line and prints a new one.""" term_width = get_terminal_size().columns spacing = term_width - terminal_width(msg) # On windows we need one less space or we overflow the line for some reason. if is_win32: spacing -= 1 sys.stderr.write("...
def print_inplace(msg): """Clears out the previous line and prints a new one.""" term_width = get_terminal_size().columns spacing = term_width - terminal_width(msg) # On windows we need one less space or we overflow the line for some reason. if is_win32: spacing -= 1 sys.stderr.write("...
[ "Clears", "out", "the", "previous", "line", "and", "prints", "a", "new", "one", "." ]
streamlink/streamlink
python
https://github.com/streamlink/streamlink/blob/c8ed1daff14ac03195870238b9b900c1109dd5c1/src/streamlink_cli/utils/progress.py#L57-L68
[ "def", "print_inplace", "(", "msg", ")", ":", "term_width", "=", "get_terminal_size", "(", ")", ".", "columns", "spacing", "=", "term_width", "-", "terminal_width", "(", "msg", ")", "# On windows we need one less space or we overflow the line for some reason.", "if", "i...
c8ed1daff14ac03195870238b9b900c1109dd5c1
test
format_filesize
Formats the file size into a human readable format.
src/streamlink_cli/utils/progress.py
def format_filesize(size): """Formats the file size into a human readable format.""" for suffix in ("bytes", "KB", "MB", "GB", "TB"): if size < 1024.0: if suffix in ("GB", "TB"): return "{0:3.2f} {1}".format(size, suffix) else: return "{0:3.1f} {1}...
def format_filesize(size): """Formats the file size into a human readable format.""" for suffix in ("bytes", "KB", "MB", "GB", "TB"): if size < 1024.0: if suffix in ("GB", "TB"): return "{0:3.2f} {1}".format(size, suffix) else: return "{0:3.1f} {1}...
[ "Formats", "the", "file", "size", "into", "a", "human", "readable", "format", "." ]
streamlink/streamlink
python
https://github.com/streamlink/streamlink/blob/c8ed1daff14ac03195870238b9b900c1109dd5c1/src/streamlink_cli/utils/progress.py#L71-L80
[ "def", "format_filesize", "(", "size", ")", ":", "for", "suffix", "in", "(", "\"bytes\"", ",", "\"KB\"", ",", "\"MB\"", ",", "\"GB\"", ",", "\"TB\"", ")", ":", "if", "size", "<", "1024.0", ":", "if", "suffix", "in", "(", "\"GB\"", ",", "\"TB\"", ")",...
c8ed1daff14ac03195870238b9b900c1109dd5c1
test
format_time
Formats elapsed seconds into a human readable format.
src/streamlink_cli/utils/progress.py
def format_time(elapsed): """Formats elapsed seconds into a human readable format.""" hours = int(elapsed / (60 * 60)) minutes = int((elapsed % (60 * 60)) / 60) seconds = int(elapsed % 60) rval = "" if hours: rval += "{0}h".format(hours) if elapsed > 60: rval += "{0}m".form...
def format_time(elapsed): """Formats elapsed seconds into a human readable format.""" hours = int(elapsed / (60 * 60)) minutes = int((elapsed % (60 * 60)) / 60) seconds = int(elapsed % 60) rval = "" if hours: rval += "{0}h".format(hours) if elapsed > 60: rval += "{0}m".form...
[ "Formats", "elapsed", "seconds", "into", "a", "human", "readable", "format", "." ]
streamlink/streamlink
python
https://github.com/streamlink/streamlink/blob/c8ed1daff14ac03195870238b9b900c1109dd5c1/src/streamlink_cli/utils/progress.py#L83-L97
[ "def", "format_time", "(", "elapsed", ")", ":", "hours", "=", "int", "(", "elapsed", "/", "(", "60", "*", "60", ")", ")", "minutes", "=", "int", "(", "(", "elapsed", "%", "(", "60", "*", "60", ")", ")", "/", "60", ")", "seconds", "=", "int", ...
c8ed1daff14ac03195870238b9b900c1109dd5c1
test
create_status_line
Creates a status line with appropriate size.
src/streamlink_cli/utils/progress.py
def create_status_line(**params): """Creates a status line with appropriate size.""" max_size = get_terminal_size().columns - 1 for fmt in PROGRESS_FORMATS: status = fmt.format(**params) if len(status) <= max_size: break return status
def create_status_line(**params): """Creates a status line with appropriate size.""" max_size = get_terminal_size().columns - 1 for fmt in PROGRESS_FORMATS: status = fmt.format(**params) if len(status) <= max_size: break return status
[ "Creates", "a", "status", "line", "with", "appropriate", "size", "." ]
streamlink/streamlink
python
https://github.com/streamlink/streamlink/blob/c8ed1daff14ac03195870238b9b900c1109dd5c1/src/streamlink_cli/utils/progress.py#L100-L110
[ "def", "create_status_line", "(", "*", "*", "params", ")", ":", "max_size", "=", "get_terminal_size", "(", ")", ".", "columns", "-", "1", "for", "fmt", "in", "PROGRESS_FORMATS", ":", "status", "=", "fmt", ".", "format", "(", "*", "*", "params", ")", "i...
c8ed1daff14ac03195870238b9b900c1109dd5c1
test
progress
Progress an iterator and updates a pretty status line to the terminal. The status line contains: - Amount of data read from the iterator - Time elapsed - Average speed, based on the last few seconds.
src/streamlink_cli/utils/progress.py
def progress(iterator, prefix): """Progress an iterator and updates a pretty status line to the terminal. The status line contains: - Amount of data read from the iterator - Time elapsed - Average speed, based on the last few seconds. """ if terminal_width(prefix) > 25: prefix = ...
def progress(iterator, prefix): """Progress an iterator and updates a pretty status line to the terminal. The status line contains: - Amount of data read from the iterator - Time elapsed - Average speed, based on the last few seconds. """ if terminal_width(prefix) > 25: prefix = ...
[ "Progress", "an", "iterator", "and", "updates", "a", "pretty", "status", "line", "to", "the", "terminal", "." ]
streamlink/streamlink
python
https://github.com/streamlink/streamlink/blob/c8ed1daff14ac03195870238b9b900c1109dd5c1/src/streamlink_cli/utils/progress.py#L113-L155
[ "def", "progress", "(", "iterator", ",", "prefix", ")", ":", "if", "terminal_width", "(", "prefix", ")", ">", "25", ":", "prefix", "=", "(", "\"..\"", "+", "get_cut_prefix", "(", "prefix", ",", "23", ")", ")", "speed_updated", "=", "start", "=", "time"...
c8ed1daff14ac03195870238b9b900c1109dd5c1
test
SegmentTemplate.segment_numbers
yield the segment number and when it will be available There are two cases for segment number generation, static and dynamic. In the case of static stream, the segment number starts at the startNumber and counts up to the number of segments that are represented by the periods duration. ...
src/streamlink/stream/dash_manifest.py
def segment_numbers(self): """ yield the segment number and when it will be available There are two cases for segment number generation, static and dynamic. In the case of static stream, the segment number starts at the startNumber and counts up to the number of segments that ar...
def segment_numbers(self): """ yield the segment number and when it will be available There are two cases for segment number generation, static and dynamic. In the case of static stream, the segment number starts at the startNumber and counts up to the number of segments that ar...
[ "yield", "the", "segment", "number", "and", "when", "it", "will", "be", "available", "There", "are", "two", "cases", "for", "segment", "number", "generation", "static", "and", "dynamic", "." ]
streamlink/streamlink
python
https://github.com/streamlink/streamlink/blob/c8ed1daff14ac03195870238b9b900c1109dd5c1/src/streamlink/stream/dash_manifest.py#L463-L508
[ "def", "segment_numbers", "(", "self", ")", ":", "log", ".", "debug", "(", "\"Generating segment numbers for {0} playlist (id={1})\"", ".", "format", "(", "self", ".", "root", ".", "type", ",", "self", ".", "parent", ".", "id", ")", ")", "if", "self", ".", ...
c8ed1daff14ac03195870238b9b900c1109dd5c1
test
Representation.segments
Segments are yielded when they are available Segments appear on a time line, for dynamic content they are only available at a certain time and sometimes for a limited time. For static content they are all available at the same time. :param kwargs: extra args to pass to the segment template ...
src/streamlink/stream/dash_manifest.py
def segments(self, **kwargs): """ Segments are yielded when they are available Segments appear on a time line, for dynamic content they are only available at a certain time and sometimes for a limited time. For static content they are all available at the same time. :param kwar...
def segments(self, **kwargs): """ Segments are yielded when they are available Segments appear on a time line, for dynamic content they are only available at a certain time and sometimes for a limited time. For static content they are all available at the same time. :param kwar...
[ "Segments", "are", "yielded", "when", "they", "are", "available" ]
streamlink/streamlink
python
https://github.com/streamlink/streamlink/blob/c8ed1daff14ac03195870238b9b900c1109dd5c1/src/streamlink/stream/dash_manifest.py#L593-L621
[ "def", "segments", "(", "self", ",", "*", "*", "kwargs", ")", ":", "segmentBase", "=", "self", ".", "segmentBase", "or", "self", ".", "walk_back_get_attr", "(", "\"segmentBase\"", ")", "segmentLists", "=", "self", ".", "segmentList", "or", "self", ".", "wa...
c8ed1daff14ac03195870238b9b900c1109dd5c1
test
OrderedDict.clear
od.clear() -> None. Remove all items from od.
src/streamlink/packages/flashmedia/ordereddict.py
def clear(self): 'od.clear() -> None. Remove all items from od.' try: for node in self.__map.itervalues(): del node[:] root = self.__root root[:] = [root, root, None] self.__map.clear() except AttributeError: pass ...
def clear(self): 'od.clear() -> None. Remove all items from od.' try: for node in self.__map.itervalues(): del node[:] root = self.__root root[:] = [root, root, None] self.__map.clear() except AttributeError: pass ...
[ "od", ".", "clear", "()", "-", ">", "None", ".", "Remove", "all", "items", "from", "od", "." ]
streamlink/streamlink
python
https://github.com/streamlink/streamlink/blob/c8ed1daff14ac03195870238b9b900c1109dd5c1/src/streamlink/packages/flashmedia/ordereddict.py#L80-L90
[ "def", "clear", "(", "self", ")", ":", "try", ":", "for", "node", "in", "self", ".", "__map", ".", "itervalues", "(", ")", ":", "del", "node", "[", ":", "]", "root", "=", "self", ".", "__root", "root", "[", ":", "]", "=", "[", "root", ",", "r...
c8ed1daff14ac03195870238b9b900c1109dd5c1
test
OrderedDict.pop
od.pop(k[,d]) -> v, remove specified key and return the corresponding value. If key is not found, d is returned if given, otherwise KeyError is raised.
src/streamlink/packages/flashmedia/ordereddict.py
def pop(self, key, default=__marker): '''od.pop(k[,d]) -> v, remove specified key and return the corresponding value. If key is not found, d is returned if given, otherwise KeyError is raised. ''' if key in self: result = self[key] del self[key] retur...
def pop(self, key, default=__marker): '''od.pop(k[,d]) -> v, remove specified key and return the corresponding value. If key is not found, d is returned if given, otherwise KeyError is raised. ''' if key in self: result = self[key] del self[key] retur...
[ "od", ".", "pop", "(", "k", "[", "d", "]", ")", "-", ">", "v", "remove", "specified", "key", "and", "return", "the", "corresponding", "value", ".", "If", "key", "is", "not", "found", "d", "is", "returned", "if", "given", "otherwise", "KeyError", "is"...
streamlink/streamlink
python
https://github.com/streamlink/streamlink/blob/c8ed1daff14ac03195870238b9b900c1109dd5c1/src/streamlink/packages/flashmedia/ordereddict.py#L178-L189
[ "def", "pop", "(", "self", ",", "key", ",", "default", "=", "__marker", ")", ":", "if", "key", "in", "self", ":", "result", "=", "self", "[", "key", "]", "del", "self", "[", "key", "]", "return", "result", "if", "default", "is", "self", ".", "__m...
c8ed1daff14ac03195870238b9b900c1109dd5c1
test
OrderedDict.fromkeys
OD.fromkeys(S[, v]) -> New ordered dictionary with keys from S and values equal to v (which defaults to None).
src/streamlink/packages/flashmedia/ordereddict.py
def fromkeys(cls, iterable, value=None): '''OD.fromkeys(S[, v]) -> New ordered dictionary with keys from S and values equal to v (which defaults to None). ''' d = cls() for key in iterable: d[key] = value return d
def fromkeys(cls, iterable, value=None): '''OD.fromkeys(S[, v]) -> New ordered dictionary with keys from S and values equal to v (which defaults to None). ''' d = cls() for key in iterable: d[key] = value return d
[ "OD", ".", "fromkeys", "(", "S", "[", "v", "]", ")", "-", ">", "New", "ordered", "dictionary", "with", "keys", "from", "S", "and", "values", "equal", "to", "v", "(", "which", "defaults", "to", "None", ")", "." ]
streamlink/streamlink
python
https://github.com/streamlink/streamlink/blob/c8ed1daff14ac03195870238b9b900c1109dd5c1/src/streamlink/packages/flashmedia/ordereddict.py#L226-L234
[ "def", "fromkeys", "(", "cls", ",", "iterable", ",", "value", "=", "None", ")", ":", "d", "=", "cls", "(", ")", "for", "key", "in", "iterable", ":", "d", "[", "key", "]", "=", "value", "return", "d" ]
c8ed1daff14ac03195870238b9b900c1109dd5c1
test
Showroom._get_room_id
Locates unique identifier ("room_id") for the room. Returns the room_id as a string, or None if no room_id was found
src/streamlink/plugins/showroom.py
def _get_room_id(self): """ Locates unique identifier ("room_id") for the room. Returns the room_id as a string, or None if no room_id was found """ match_dict = _url_re.match(self.url).groupdict() if match_dict['room_id'] is not None: return match_dict['roo...
def _get_room_id(self): """ Locates unique identifier ("room_id") for the room. Returns the room_id as a string, or None if no room_id was found """ match_dict = _url_re.match(self.url).groupdict() if match_dict['room_id'] is not None: return match_dict['roo...
[ "Locates", "unique", "identifier", "(", "room_id", ")", "for", "the", "room", "." ]
streamlink/streamlink
python
https://github.com/streamlink/streamlink/blob/c8ed1daff14ac03195870238b9b900c1109dd5c1/src/streamlink/plugins/showroom.py#L111-L131
[ "def", "_get_room_id", "(", "self", ")", ":", "match_dict", "=", "_url_re", ".", "match", "(", "self", ".", "url", ")", ".", "groupdict", "(", ")", "if", "match_dict", "[", "'room_id'", "]", "is", "not", "None", ":", "return", "match_dict", "[", "'room...
c8ed1daff14ac03195870238b9b900c1109dd5c1
test
SegmentedStreamWorker.close
Shuts down the thread.
src/streamlink/stream/segmented.py
def close(self): """Shuts down the thread.""" if not self.closed: log.debug("Closing worker thread") self.closed = True if self._wait: self._wait.set()
def close(self): """Shuts down the thread.""" if not self.closed: log.debug("Closing worker thread") self.closed = True if self._wait: self._wait.set()
[ "Shuts", "down", "the", "thread", "." ]
streamlink/streamlink
python
https://github.com/streamlink/streamlink/blob/c8ed1daff14ac03195870238b9b900c1109dd5c1/src/streamlink/stream/segmented.py#L32-L39
[ "def", "close", "(", "self", ")", ":", "if", "not", "self", ".", "closed", ":", "log", ".", "debug", "(", "\"Closing worker thread\"", ")", "self", ".", "closed", "=", "True", "if", "self", ".", "_wait", ":", "self", ".", "_wait", ".", "set", "(", ...
c8ed1daff14ac03195870238b9b900c1109dd5c1
test
SegmentedStreamWorker.wait
Pauses the thread for a specified time. Returns False if interrupted by another thread and True if the time runs out normally.
src/streamlink/stream/segmented.py
def wait(self, time): """Pauses the thread for a specified time. Returns False if interrupted by another thread and True if the time runs out normally. """ self._wait = Event() return not self._wait.wait(time)
def wait(self, time): """Pauses the thread for a specified time. Returns False if interrupted by another thread and True if the time runs out normally. """ self._wait = Event() return not self._wait.wait(time)
[ "Pauses", "the", "thread", "for", "a", "specified", "time", "." ]
streamlink/streamlink
python
https://github.com/streamlink/streamlink/blob/c8ed1daff14ac03195870238b9b900c1109dd5c1/src/streamlink/stream/segmented.py#L41-L48
[ "def", "wait", "(", "self", ",", "time", ")", ":", "self", ".", "_wait", "=", "Event", "(", ")", "return", "not", "self", ".", "_wait", ".", "wait", "(", "time", ")" ]
c8ed1daff14ac03195870238b9b900c1109dd5c1
test
SegmentedStreamWriter.close
Shuts down the thread.
src/streamlink/stream/segmented.py
def close(self): """Shuts down the thread.""" if not self.closed: log.debug("Closing writer thread") self.closed = True self.reader.buffer.close() self.executor.shutdown(wait=False) if concurrent.futures.thread._threads_queues: concurrent.futures....
def close(self): """Shuts down the thread.""" if not self.closed: log.debug("Closing writer thread") self.closed = True self.reader.buffer.close() self.executor.shutdown(wait=False) if concurrent.futures.thread._threads_queues: concurrent.futures....
[ "Shuts", "down", "the", "thread", "." ]
streamlink/streamlink
python
https://github.com/streamlink/streamlink/blob/c8ed1daff14ac03195870238b9b900c1109dd5c1/src/streamlink/stream/segmented.py#L100-L109
[ "def", "close", "(", "self", ")", ":", "if", "not", "self", ".", "closed", ":", "log", ".", "debug", "(", "\"Closing writer thread\"", ")", "self", ".", "closed", "=", "True", "self", ".", "reader", ".", "buffer", ".", "close", "(", ")", "self", ".",...
c8ed1daff14ac03195870238b9b900c1109dd5c1
test
SegmentedStreamWriter.put
Adds a segment to the download pool and write queue.
src/streamlink/stream/segmented.py
def put(self, segment): """Adds a segment to the download pool and write queue.""" if self.closed: return if segment is not None: future = self.executor.submit(self.fetch, segment, retries=self.retries) else: ...
def put(self, segment): """Adds a segment to the download pool and write queue.""" if self.closed: return if segment is not None: future = self.executor.submit(self.fetch, segment, retries=self.retries) else: ...
[ "Adds", "a", "segment", "to", "the", "download", "pool", "and", "write", "queue", "." ]
streamlink/streamlink
python
https://github.com/streamlink/streamlink/blob/c8ed1daff14ac03195870238b9b900c1109dd5c1/src/streamlink/stream/segmented.py#L111-L122
[ "def", "put", "(", "self", ",", "segment", ")", ":", "if", "self", ".", "closed", ":", "return", "if", "segment", "is", "not", "None", ":", "future", "=", "self", ".", "executor", ".", "submit", "(", "self", ".", "fetch", ",", "segment", ",", "retr...
c8ed1daff14ac03195870238b9b900c1109dd5c1