INSTRUCTION stringlengths 1 8.43k | RESPONSE stringlengths 75 104k |
|---|---|
read the specified CSIDriver This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. read_csi_driver ( name async_req = True ) >>> result = thread. get () | def read_csi_driver(self, name, **kwargs):
"""
read the specified CSIDriver
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.read_csi_driver(name, async_req=True)
>>> result = thread... |
read the specified CSINode This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. read_csi_node ( name async_req = True ) >>> result = thread. get () | def read_csi_node(self, name, **kwargs):
"""
read the specified CSINode
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.read_csi_node(name, async_req=True)
>>> result = thread.get()... |
replace the specified CSIDriver This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. replace_csi_driver ( name body async_req = True ) >>> result = thread. get () | def replace_csi_driver(self, name, body, **kwargs):
"""
replace the specified CSIDriver
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.replace_csi_driver(name, body, async_req=True)
... |
replace the specified CSINode This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. replace_csi_node ( name body async_req = True ) >>> result = thread. get () | def replace_csi_node(self, name, body, **kwargs):
"""
replace the specified CSINode
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.replace_csi_node(name, body, async_req=True)
>>> ... |
Perform an action from a yaml file. Pass True for verbose to print confirmation information. Input: yaml_file: string. Contains the path to yaml file. k8s_client: an ApiClient object initialized with the client args. verbose: If True print confirmation from the create action. Default is False. | def create_from_yaml(
k8s_client,
yaml_file,
verbose=False,
**kwargs):
"""
Perform an action from a yaml file. Pass True for verbose to
print confirmation information.
Input:
yaml_file: string. Contains the path to yaml file.
k8s_client: an ApiClient object, initi... |
create a LocalSubjectAccessReview This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. create_namespaced_local_subject_access_review ( namespace body async_req = True ) >>> result = thread. get () | def create_namespaced_local_subject_access_review(self, namespace, body, **kwargs):
"""
create a LocalSubjectAccessReview
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_namespaced_l... |
create a SelfSubjectRulesReview This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. create_self_subject_rules_review ( body async_req = True ) >>> result = thread. get () | def create_self_subject_rules_review(self, body, **kwargs):
"""
create a SelfSubjectRulesReview
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_self_subject_rules_review(body, async_... |
create a SubjectAccessReview This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. create_subject_access_review ( body async_req = True ) >>> result = thread. get () | def create_subject_access_review(self, body, **kwargs):
"""
create a SubjectAccessReview
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_subject_access_review(body, async_req=True)
... |
create a PriorityClass This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. create_priority_class ( body async_req = True ) >>> result = thread. get () | def create_priority_class(self, body, **kwargs):
"""
create a PriorityClass
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_priority_class(body, async_req=True)
>>> result = ... |
delete collection of PriorityClass This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. delete_collection_priority_class ( async_req = True ) >>> result = thread. get () | def delete_collection_priority_class(self, **kwargs):
"""
delete collection of PriorityClass
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_collection_priority_class(async_req=True)... |
delete a PriorityClass This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. delete_priority_class ( name async_req = True ) >>> result = thread. get () | def delete_priority_class(self, name, **kwargs):
"""
delete a PriorityClass
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_priority_class(name, async_req=True)
>>> result = ... |
list or watch objects of kind PriorityClass This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. list_priority_class ( async_req = True ) >>> result = thread. get () | def list_priority_class(self, **kwargs):
"""
list or watch objects of kind PriorityClass
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_priority_class(async_req=True)
>>> resu... |
partially update the specified PriorityClass This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. patch_priority_class ( name body async_req = True ) >>> result = thread. get () | def patch_priority_class(self, name, body, **kwargs):
"""
partially update the specified PriorityClass
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.patch_priority_class(name, body, async... |
read the specified PriorityClass This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. read_priority_class ( name async_req = True ) >>> result = thread. get () | def read_priority_class(self, name, **kwargs):
"""
read the specified PriorityClass
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.read_priority_class(name, async_req=True)
>>> res... |
delete an APIService This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. delete_api_service ( name async_req = True ) >>> result = thread. get () | def delete_api_service(self, name, **kwargs):
"""
delete an APIService
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_api_service(name, async_req=True)
>>> result = thread.g... |
delete collection of APIService This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. delete_collection_api_service ( async_req = True ) >>> result = thread. get () | def delete_collection_api_service(self, **kwargs):
"""
delete collection of APIService
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_collection_api_service(async_req=True)
... |
partially update status of the specified APIService This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. patch_api_service_status ( name body async_req = True ) >>> result = thread. get () | def patch_api_service_status(self, name, body, **kwargs):
"""
partially update status of the specified APIService
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.patch_api_service_status(na... |
replace status of the specified APIService This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. replace_api_service_status ( name body async_req = True ) >>> result = thread. get () | def replace_api_service_status(self, name, body, **kwargs):
"""
replace status of the specified APIService
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.replace_api_service_status(name, b... |
Sets the request of this V1beta1CertificateSigningRequestSpec. Base64 - encoded PKCS#10 CSR data | def request(self, request):
"""
Sets the request of this V1beta1CertificateSigningRequestSpec.
Base64-encoded PKCS#10 CSR data
:param request: The request of this V1beta1CertificateSigningRequestSpec.
:type: str
"""
if request is None:
raise ValueErro... |
: param method: http request method: param url: http request url: param query_params: query parameters in the url: param headers: http request headers: param body: request json body for application/ json: param post_params: request post parameters application/ x - www - form - urlencoded and multipart/ form - data: par... | def request(self, method, url, query_params=None, headers=None,
body=None, post_params=None, _preload_content=True, _request_timeout=None):
"""
:param method: http request method
:param url: http request url
:param query_params: query parameters in the url
:param ... |
create a MutatingWebhookConfiguration This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. create_mutating_webhook_configuration ( body async_req = True ) >>> result = thread. get () | def create_mutating_webhook_configuration(self, body, **kwargs):
"""
create a MutatingWebhookConfiguration
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_mutating_webhook_configurat... |
create a ValidatingWebhookConfiguration This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. create_validating_webhook_configuration ( body async_req = True ) >>> result = thread. get () | def create_validating_webhook_configuration(self, body, **kwargs):
"""
create a ValidatingWebhookConfiguration
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_validating_webhook_conf... |
delete collection of ValidatingWebhookConfiguration This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. delete_collection_validating_webhook_configuration ( async_req = True ) >>> result = thread. get () | def delete_collection_validating_webhook_configuration(self, **kwargs):
"""
delete collection of ValidatingWebhookConfiguration
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_collec... |
delete a MutatingWebhookConfiguration This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. delete_mutating_webhook_configuration ( name async_req = True ) >>> result = thread. get () | def delete_mutating_webhook_configuration(self, name, **kwargs):
"""
delete a MutatingWebhookConfiguration
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_mutating_webhook_configurat... |
delete a ValidatingWebhookConfiguration This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. delete_validating_webhook_configuration ( name async_req = True ) >>> result = thread. get () | def delete_validating_webhook_configuration(self, name, **kwargs):
"""
delete a ValidatingWebhookConfiguration
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_validating_webhook_conf... |
list or watch objects of kind ValidatingWebhookConfiguration This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. list_validating_webhook_configuration ( async_req = True ) >>> result = thread. get () | def list_validating_webhook_configuration(self, **kwargs):
"""
list or watch objects of kind ValidatingWebhookConfiguration
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_validating_w... |
partially update the specified MutatingWebhookConfiguration This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. patch_mutating_webhook_configuration ( name body async_req = True ) >>> result = thread. get () | def patch_mutating_webhook_configuration(self, name, body, **kwargs):
"""
partially update the specified MutatingWebhookConfiguration
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.patch_m... |
partially update the specified ValidatingWebhookConfiguration This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. patch_validating_webhook_configuration ( name body async_req = True ) >>> result = thread. get () | def patch_validating_webhook_configuration(self, name, body, **kwargs):
"""
partially update the specified ValidatingWebhookConfiguration
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.pat... |
read the specified ValidatingWebhookConfiguration This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. read_validating_webhook_configuration ( name async_req = True ) >>> result = thread. get () | def read_validating_webhook_configuration(self, name, **kwargs):
"""
read the specified ValidatingWebhookConfiguration
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.read_validating_webhoo... |
replace the specified MutatingWebhookConfiguration This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. replace_mutating_webhook_configuration ( name body async_req = True ) >>> result = thread. get () | def replace_mutating_webhook_configuration(self, name, body, **kwargs):
"""
replace the specified MutatingWebhookConfiguration
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.replace_mutati... |
replace the specified ValidatingWebhookConfiguration This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. replace_validating_webhook_configuration ( name body async_req = True ) >>> result = thread. get () | def replace_validating_webhook_configuration(self, name, body, **kwargs):
"""
replace the specified ValidatingWebhookConfiguration
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.replace_va... |
Deletes the specified namespace scoped custom object This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. delete_namespaced_custom_object ( group version namespace plural name body async_req = True ) >>> result = thread. get () | def delete_namespaced_custom_object(self, group, version, namespace, plural, name, body, **kwargs):
"""
Deletes the specified namespace scoped custom object
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>... |
Returns a namespace scoped custom object This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. get_namespaced_custom_object ( group version namespace plural name async_req = True ) >>> result = thread. get () | def get_namespaced_custom_object(self, group, version, namespace, plural, name, **kwargs):
"""
Returns a namespace scoped custom object
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_n... |
list or watch namespace scoped custom objects This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. list_namespaced_custom_object ( group version namespace plural async_req = True ) >>> result = thread. get () | def list_namespaced_custom_object(self, group, version, namespace, plural, **kwargs):
"""
list or watch namespace scoped custom objects
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_... |
patch the specified namespace scoped custom object This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. patch_namespaced_custom_object ( group version namespace plural name body async_req = True ) >>> result = thread. get () | def patch_namespaced_custom_object(self, group, version, namespace, plural, name, body, **kwargs):
"""
patch the specified namespace scoped custom object
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> ... |
replace scale of the specified cluster scoped custom object This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. replace_cluster_custom_object_scale ( group version plural name body async_req = True ) >>> result = thread. get () | def replace_cluster_custom_object_scale(self, group, version, plural, name, body, **kwargs):
"""
replace scale of the specified cluster scoped custom object
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>... |
replace status of the specified namespace scoped custom object This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. replace_namespaced_custom_object_status ( group version namespace plural name body async_req = True ) >>> result = t... | def replace_namespaced_custom_object_status(self, group, version, namespace, plural, name, body, **kwargs):
"""
replace status of the specified namespace scoped custom object
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_... |
create a Job This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. create_namespaced_job ( namespace body async_req = True ) >>> result = thread. get () | def create_namespaced_job(self, namespace, body, **kwargs):
"""
create a Job
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_namespaced_job(namespace, body, async_req=True)
>... |
delete collection of Job This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. delete_collection_namespaced_job ( namespace async_req = True ) >>> result = thread. get () | def delete_collection_namespaced_job(self, namespace, **kwargs):
"""
delete collection of Job
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_collection_namespaced_job(namespace, asy... |
delete a PodDisruptionBudget This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. delete_namespaced_pod_disruption_budget ( name namespace async_req = True ) >>> result = thread. get () | def delete_namespaced_pod_disruption_budget(self, name, namespace, **kwargs):
"""
delete a PodDisruptionBudget
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_namespaced_pod_disrupti... |
list or watch objects of kind PodDisruptionBudget This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. list_pod_disruption_budget_for_all_namespaces ( async_req = True ) >>> result = thread. get () | def list_pod_disruption_budget_for_all_namespaces(self, **kwargs):
"""
list or watch objects of kind PodDisruptionBudget
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_pod_disruption_... |
read the specified PodDisruptionBudget This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. read_namespaced_pod_disruption_budget ( name namespace async_req = True ) >>> result = thread. get () | def read_namespaced_pod_disruption_budget(self, name, namespace, **kwargs):
"""
read the specified PodDisruptionBudget
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.read_namespaced_pod_di... |
read status of the specified PodDisruptionBudget This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. read_namespaced_pod_disruption_budget_status ( name namespace async_req = True ) >>> result = thread. get () | def read_namespaced_pod_disruption_budget_status(self, name, namespace, **kwargs):
"""
read status of the specified PodDisruptionBudget
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.read_... |
create a CertificateSigningRequest This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. create_certificate_signing_request ( body async_req = True ) >>> result = thread. get () | def create_certificate_signing_request(self, body, **kwargs):
"""
create a CertificateSigningRequest
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_certificate_signing_request(body,... |
delete a CertificateSigningRequest This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. delete_certificate_signing_request ( name async_req = True ) >>> result = thread. get () | def delete_certificate_signing_request(self, name, **kwargs):
"""
delete a CertificateSigningRequest
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_certificate_signing_request(name,... |
list or watch objects of kind CertificateSigningRequest This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. list_certificate_signing_request ( async_req = True ) >>> result = thread. get () | def list_certificate_signing_request(self, **kwargs):
"""
list or watch objects of kind CertificateSigningRequest
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_certificate_signing_re... |
partially update the specified CertificateSigningRequest This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. patch_certificate_signing_request ( name body async_req = True ) >>> result = thread. get () | def patch_certificate_signing_request(self, name, body, **kwargs):
"""
partially update the specified CertificateSigningRequest
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.patch_certifi... |
partially update status of the specified CertificateSigningRequest This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. patch_certificate_signing_request_status ( name body async_req = True ) >>> result = thread. get () | def patch_certificate_signing_request_status(self, name, body, **kwargs):
"""
partially update status of the specified CertificateSigningRequest
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = ... |
read status of the specified CertificateSigningRequest This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. read_certificate_signing_request_status ( name async_req = True ) >>> result = thread. get () | def read_certificate_signing_request_status(self, name, **kwargs):
"""
read status of the specified CertificateSigningRequest
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.read_certificat... |
replace the specified CertificateSigningRequest This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. replace_certificate_signing_request ( name body async_req = True ) >>> result = thread. get () | def replace_certificate_signing_request(self, name, body, **kwargs):
"""
replace the specified CertificateSigningRequest
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.replace_certificate_... |
replace approval of the specified CertificateSigningRequest This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request please pass async_req = True >>> thread = api. replace_certificate_signing_request_approval ( name body async_req = True ) >>> result = thread. get () | def replace_certificate_signing_request_approval(self, name, body, **kwargs):
"""
replace approval of the specified CertificateSigningRequest
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api... |
A decorator for mutating methods of property container classes that notifies owners of the property container about mutating changes. | def notify_owner(func):
''' A decorator for mutating methods of property container classes
that notifies owners of the property container about mutating changes.
Args:
func (callable) : the container method to wrap in a notification
Returns:
wrapped method
Examples:
A ``_... |
Internal implementation to handle special - casing stream events on ColumnDataSource columns. | def _stream(self, doc, source, new_data, rollover=None, setter=None):
''' Internal implementation to handle special-casing stream events
on ``ColumnDataSource`` columns.
Normally any changes to the ``.data`` dict attribute on a
``ColumnDataSource`` triggers a notification, causing all o... |
Internal implementation to handle special - casing patch events on ColumnDataSource columns. | def _patch(self, doc, source, patches, setter=None):
''' Internal implementation to handle special-casing patch events
on ``ColumnDataSource`` columns.
Normally any changes to the ``.data`` dict attribute on a
``ColumnDataSource`` triggers a notification, causing all of the data
... |
Print the Bokeh license to the console. | def license():
''' Print the Bokeh license to the console.
Returns:
None
'''
from os.path import join
with open(join(__path__[0], 'LICENSE.txt')) as lic:
print(lic.read()) |
Return a copy of the default or a new value if the default is specified by a function. | def _copy_default(cls, default):
''' Return a copy of the default, or a new value if the default
is specified by a function.
'''
if not isinstance(default, types.FunctionType):
return copy(default)
else:
return default() |
The default transformed by prepare_value () and the theme overrides. | def themed_default(self, cls, name, theme_overrides):
''' The default, transformed by prepare_value() and the theme overrides.
'''
overrides = theme_overrides
if overrides is None or name not in overrides:
overrides = cls._overridden_defaults()
if name in overrides:... |
Whether two parameters match values. | def matches(self, new, old):
''' Whether two parameters match values.
If either ``new`` or ``old`` is a NumPy array or Pandas Series or Index,
then the result of ``np.array_equal`` will determine if the values match.
Otherwise, the result of standard Python equality will be returned.
... |
Whether the value passes validation | def is_valid(self, value):
''' Whether the value passes validation
Args:
value (obj) : the value to validate against this property type
Returns:
True if valid, False otherwise
'''
try:
if validation_on():
self.validate(value,... |
Declare that other types may be converted to this property type. | def accepts(self, tp, converter):
''' Declare that other types may be converted to this property type.
Args:
tp (Property) :
A type that may be converted automatically to this property
type.
converter (callable) :
A function accep... |
Assert that prepared values satisfy given conditions. | def asserts(self, fn, msg_or_fn):
''' Assert that prepared values satisfy given conditions.
Assertions are intended in enforce conditions beyond simple value
type validation. For instance, this method can be use to assert that
the columns of a ``ColumnDataSource`` all collectively have ... |
Configure the default output state to generate output saved to a file when: func: show is called. | def output_file(filename, title="Bokeh Plot", mode="cdn", root_dir=None):
'''Configure the default output state to generate output saved
to a file when :func:`show` is called.
Does not change the current ``Document`` from ``curdoc()``. File and notebook
output may be active at the same time, so e.g., t... |
Configure the default output state to generate output in notebook cells when: func: show is called. Note that: func: show may be called multiple times in a single cell to display multiple objects in the output cell. The objects will be displayed in order. | def output_notebook(resources=None, verbose=False, hide_banner=False, load_timeout=5000, notebook_type='jupyter'):
''' Configure the default output state to generate output in notebook cells
when :func:`show` is called. Note that, :func:`show` may be called multiple
times in a single cell to display multipl... |
The last path component for the basename of the configured filename. | def url_path(self):
''' The last path component for the basename of the configured filename.
'''
if self.failed:
return None
else:
# TODO should fix invalid URL characters
return '/' + os.path.splitext(os.path.basename(self._runner.path))[0] |
Convenience function to explicitly return an expr specification for a Bokeh: class: ~bokeh. core. properties. DataSpec property. | def expr(expression, transform=None):
''' Convenience function to explicitly return an "expr" specification for
a Bokeh :class:`~bokeh.core.properties.DataSpec` property.
Args:
expression (Expression) : a computed expression for a
``DataSpec`` property.
transform (Transform, op... |
Convenience function to explicitly return a field specification for a Bokeh: class: ~bokeh. core. properties. DataSpec property. | def field(name, transform=None):
''' Convenience function to explicitly return a "field" specification for
a Bokeh :class:`~bokeh.core.properties.DataSpec` property.
Args:
name (str) : name of a data source field to reference for a
``DataSpec`` property.
transform (Transform, o... |
Convenience function to explicitly return a value specification for a Bokeh: class: ~bokeh. core. properties. DataSpec property. | def value(val, transform=None):
''' Convenience function to explicitly return a "value" specification for
a Bokeh :class:`~bokeh.core.properties.DataSpec` property.
Args:
val (any) : a fixed value to specify for a ``DataSpec`` property.
transform (Transform, optional) : a transform to appl... |
Return a list of PropertyDescriptor instances to install on a class in order to delegate attribute access to this property. | def make_descriptors(self, base_name):
''' Return a list of ``PropertyDescriptor`` instances to install on a
class, in order to delegate attribute access to this property.
Unlike simpler property types, ``UnitsSpec`` returns multiple
descriptors to install. In particular, descriptors fo... |
Whether the value is a string color literal. | def isconst(cls, val):
''' Whether the value is a string color literal.
Checks for a well-formed hexadecimal color value or a named color.
Args:
val (str) : the value to check
Returns:
True, if the value is a string color literal
'''
return isi... |
Compresses and pickles given object to the given filename. | def save_object(filename, obj):
"""Compresses and pickles given object to the given filename."""
logging.info('saving {}...'.format(filename))
try:
with gzip.GzipFile(filename, 'wb') as f:
f.write(pickle.dumps(obj, 1))
except Exception as e:
logging.error('save failure: {}'.f... |
Unpickles and decompresses the given filename and returns the created object. | def load_object(filename):
"""Unpickles and decompresses the given filename and returns the created object."""
logging.info('loading {}...'.format(filename))
try:
with gzip.GzipFile(filename, 'rb') as f:
buf = ''
while True:
data = f.read()
if ... |
Returns the section heading for the issue or None if this issue should be ignored. | def issue_section(issue):
"""Returns the section heading for the issue, or None if this issue should be ignored."""
labels = issue.get('labels', [])
for label in labels:
if not label['name'].startswith('type: '):
continue
if label['name'] in LOG_SECTION:
return LOG_S... |
Returns list of tags for this issue. | def issue_tags(issue):
"""Returns list of tags for this issue."""
labels = issue.get('labels', [])
return [label['name'].replace('tag: ', '') for label in labels if label['name'].startswith('tag: ')] |
Returns True iff this issue was closed after given date. If after not given only checks if issue is closed. | def closed_issue(issue, after=None):
"""Returns True iff this issue was closed after given date. If after not given, only checks if issue is closed."""
if issue['state'] == 'closed':
if after is None or parse_timestamp(issue['closed_at']) > after:
return True
return False |
Returns True iff this issue is something we should show in the changelog. | def relevent_issue(issue, after):
"""Returns True iff this issue is something we should show in the changelog."""
return (closed_issue(issue, after) and
issue_completed(issue) and
issue_section(issue)) |
Yields relevant closed issues ( closed after a given datetime ) given a list of issues. | def relevant_issues(issues, after):
"""Yields relevant closed issues (closed after a given datetime) given a list of issues."""
logging.info('finding relevant issues after {}...'.format(after))
seen = set()
for issue in issues:
if relevent_issue(issue, after) and issue['title'] not in seen:
... |
Yields closed issues ( closed after a given datetime ) given a list of issues. | def closed_issues(issues, after):
"""Yields closed issues (closed after a given datetime) given a list of issues."""
logging.info('finding closed issues after {}...'.format(after))
seen = set()
for issue in issues:
if closed_issue(issue, after) and issue['title'] not in seen:
seen.ad... |
Yields unique set of issues given a list of issues. | def all_issues(issues):
"""Yields unique set of issues given a list of issues."""
logging.info('finding issues...')
seen = set()
for issue in issues:
if issue['title'] not in seen:
seen.add(issue['title'])
yield issue |
Returns github API URL for querying tags. | def get_issues_url(page, after):
"""Returns github API URL for querying tags."""
template = '{base_url}/{owner}/{repo}/issues?state=closed&per_page=100&page={page}&since={after}'
return template.format(page=page, after=after.isoformat(), **API_PARAMS) |
Parse ISO8601 timestamps given by github API. | def parse_timestamp(timestamp):
"""Parse ISO8601 timestamps given by github API."""
dt = dateutil.parser.parse(timestamp)
return dt.astimezone(dateutil.tz.tzutc()) |
Reads given URL as JSON and returns data as loaded python object. | def read_url(url):
"""Reads given URL as JSON and returns data as loaded python object."""
logging.debug('reading {url} ...'.format(url=url))
token = os.environ.get("BOKEH_GITHUB_API_TOKEN")
headers = {}
if token:
headers['Authorization'] = 'token %s' % token
request = Request(url, heade... |
Hits the github API for all closed issues after the given date returns the data. | def query_all_issues(after):
"""Hits the github API for all closed issues after the given date, returns the data."""
page = count(1)
data = []
while True:
page_data = query_issues(next(page), after)
if not page_data:
break
data.extend(page_data)
return data |
Given a list of tags returns the datetime of the tag with the given name ; Otherwise None. | def dateof(tag_name, tags):
"""Given a list of tags, returns the datetime of the tag with the given name; Otherwise None."""
for tag in tags:
if tag['name'] == tag_name:
commit = read_url(tag['commit']['url'])
return parse_timestamp(commit['commit']['committer']['date'])
retu... |
Gets data from query_func optionally saving that data to a file ; or loads data from a file. | def get_data(query_func, load_data=False, save_data=False):
"""Gets data from query_func, optionally saving that data to a file; or loads data from a file."""
if hasattr(query_func, '__name__'):
func_name = query_func.__name__
elif hasattr(query_func, 'func'):
func_name = query_func.func.__n... |
Checks issues for BEP 1 compliance. | def check_issues(issues, after=None):
"""Checks issues for BEP 1 compliance."""
issues = closed_issues(issues, after) if after else all_issues(issues)
issues = sorted(issues, key=ISSUES_SORT_KEY)
have_warnings = False
for section, issue_group in groupby(issues, key=ISSUES_BY_SECTION):
for ... |
Returns log line for given issue. | def issue_line(issue):
"""Returns log line for given issue."""
template = '#{number} {tags}{title}'
tags = issue_tags(issue)
params = {
'title': issue['title'].capitalize().rstrip('.'),
'number': issue['number'],
'tags': ' '.join('[{}]'.format(tag) for tag in tags) + (' ' if tags... |
Prints out changelog. | def generate_changelog(issues, after, heading, rtag=False):
"""Prints out changelog."""
relevent = relevant_issues(issues, after)
relevent = sorted(relevent, key=ISSUES_BY_SECTION)
def write(func, endofline="", append=""):
func(heading + '\n' + '-' * 20 + endofline)
for section, issue_g... |
Return a copy of this color value. | def copy(self):
''' Return a copy of this color value.
Returns:
:class:`~bokeh.colors.rgb.RGB`
'''
return RGB(self.r, self.g, self.b, self.a) |
Generate the CSS representation of this RGB color. | def to_css(self):
''' Generate the CSS representation of this RGB color.
Returns:
str, ``"rgb(...)"`` or ``"rgba(...)"``
'''
if self.a == 1.0:
return "rgb(%d, %d, %d)" % (self.r, self.g, self.b)
else:
return "rgba(%d, %d, %d, %s)" % (self.r, ... |
Return a corresponding HSL color for this RGB color. | def to_hsl(self):
''' Return a corresponding HSL color for this RGB color.
Returns:
:class:`~bokeh.colors.rgb.RGB`
'''
from .hsl import HSL # prevent circular import
h, l, s = colorsys.rgb_to_hls(float(self.r)/255, float(self.g)/255, float(self.b)/255)
retur... |
Converts result into a Future by collapsing any futures inside result. | def yield_for_all_futures(result):
""" Converts result into a Future by collapsing any futures inside result.
If result is a Future we yield until it's done, then if the value inside
the Future is another Future we yield until it's done as well, and so on.
"""
while True:
# This is needed ... |
Removes all registered callbacks. | def remove_all_callbacks(self):
""" Removes all registered callbacks."""
for cb_id in list(self._next_tick_callback_removers.keys()):
self.remove_next_tick_callback(cb_id)
for cb_id in list(self._timeout_callback_removers.keys()):
self.remove_timeout_callback(cb_id)
... |
Adds a callback to be run on the next tick. Returns an ID that can be used with remove_next_tick_callback. | def add_next_tick_callback(self, callback, callback_id=None):
""" Adds a callback to be run on the next tick.
Returns an ID that can be used with remove_next_tick_callback."""
def wrapper(*args, **kwargs):
# this 'removed' flag is a hack because Tornado has no way
# to re... |
Adds a callback to be run once after timeout_milliseconds. Returns an ID that can be used with remove_timeout_callback. | def add_timeout_callback(self, callback, timeout_milliseconds, callback_id=None):
""" Adds a callback to be run once after timeout_milliseconds.
Returns an ID that can be used with remove_timeout_callback."""
def wrapper(*args, **kwargs):
self.remove_timeout_callback(callback_id)
... |
Adds a callback to be run every period_milliseconds until it is removed. Returns an ID that can be used with remove_periodic_callback. | def add_periodic_callback(self, callback, period_milliseconds, callback_id=None):
""" Adds a callback to be run every period_milliseconds until it is removed.
Returns an ID that can be used with remove_periodic_callback."""
cb = _AsyncPeriodic(callback, period_milliseconds, io_loop=self._loop)
... |
Link to a Bokeh Github issue. | def bokeh_commit(name, rawtext, text, lineno, inliner, options=None, content=None):
''' Link to a Bokeh Github issue.
Returns 2 part tuple containing list of nodes to insert into the
document and a list of system messages. Both are allowed to be
empty.
'''
app = inliner.document.settings.env.... |
Link to a Bokeh Github issue. | def bokeh_issue(name, rawtext, text, lineno, inliner, options=None, content=None):
''' Link to a Bokeh Github issue.
Returns 2 part tuple containing list of nodes to insert into the
document and a list of system messages. Both are allowed to be
empty.
'''
app = inliner.document.settings.env.a... |
Link to a URL in the Bokeh GitHub tree pointing to appropriate tags for releases or to master otherwise. | def bokeh_tree(name, rawtext, text, lineno, inliner, options=None, content=None):
''' Link to a URL in the Bokeh GitHub tree, pointing to appropriate tags
for releases, or to master otherwise.
The link text is simply the URL path supplied, so typical usage might
look like:
.. code-block:: none
... |
Required Sphinx extension setup function. | def setup(app):
''' Required Sphinx extension setup function. '''
app.add_role('bokeh-commit', bokeh_commit)
app.add_role('bokeh-issue', bokeh_issue)
app.add_role('bokeh-pull', bokeh_pull)
app.add_role('bokeh-tree', bokeh_tree) |
Return a link to a Bokeh Github resource. | def _make_gh_link_node(app, rawtext, role, kind, api_type, id, options=None):
''' Return a link to a Bokeh Github resource.
Args:
app (Sphinx app) : current app
rawtext (str) : text being replaced with link node.
role (str) : role name
kind (str) : resource type (issue, pull, et... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.