pyvibe API Reference
Full documentation for pyvibe (Standard Library / Native)
pyvibe.ABC
Python Library Documentation: class ABC in module abc class ABC(builtins.object) | Helper class that provides a standard way to create an ABC using | inheritance. | | Data and other attributes defined here: | | __abstractmethods__ = frozenset()
pyvibe.AlertComponent
Python Library Documentation: class AlertComponent in module pyvibe class AlertComponent(pyvibe.component_interface.Component) | AlertComponent(text: 'str', badge: 'str' = '', color: 'str' = 'indigo') | | You don't normally need to invoke this constructor directly. Instead, use the `.add_alert` method of the parent component. | | Method resolution order: | AlertComponent | pyvibe.component_interface.Component | builtins.object | | Methods defined here: | | __enter__(self) | | __exit__(self, exc_type, exc_value, traceback) | | __init__(self, text: 'str', badge: 'str' = '', color: 'str' = 'indigo') | Initialize self. See help(type(self)) for accurate signature. | | to_html(self) | | ---------------------------------------------------------------------- | Methods inherited from pyvibe.component_interface.Component: | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors inherited from pyvibe.component_interface.Component: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.CardComponent
Python Library Documentation: class CardComponent in module pyvibe class CardComponent(pyvibe.component_interface.Component) | CardComponent(center_content: 'bool' = False, classes: 'str' = '', components: 'list' = None) | | You don't normally need to invoke this constructor directly. Instead, use the `.add_card` method of the parent component. | | Method resolution order: | CardComponent | pyvibe.component_interface.Component | builtins.object | | Methods defined here: | | __enter__(self) | | __exit__(self, exc_type, exc_value, traceback) | | __init__(self, center_content: 'bool' = False, classes: 'str' = '', components: 'list' = None) | Initialize self. See help(type(self)) for accurate signature. | | add(self, component) | | add_alert(self, text: 'str', badge: 'str' = '', color: 'str' = 'indigo') -> 'AlertComponent' | Renders an alert | | Args: | text (str): Text to be rendered | badge (str): Optional. Text to be rendered inside the badge | color (str): Optional. Color of the. Choose 'indigo', 'orange', or 'red' | | Returns: | AlertComponent: The new component | | add_card(self, center_content: 'bool' = False, classes: 'str' = '', components: 'list' = None) -> 'CardComponent' | Renders a card | | Args: | center_content (bool): Optional. Whether the card contents should be centered | classes (str): Optional. Classes to be applied to the card | components (list): Components to be rendered inside the card | | Returns: | CardComponent: The new component | | add_code(self, value: 'str', header: 'str' = '', prefix: 'str' = '>>>') -> 'CodeComponent' | Renders a block of code | | Args: | value (str): Code to be rendered | header (str): Optional. Header to be rendered above the code block | prefix (str): Optional. Prefix to be rendered before the code block | | Returns: | CodeComponent: The new component | | add_component(self, component) | | add_container(self, grid_columns: 'int' = None, classes: 'str' = '', components: 'list' = None) -> 'ContainerComponent' | Renders a container to help with layout | | Args: | grid_columns (int): Optional. Number of columns (if any) to use. 1-12 | classes (str): Optional. Classes to be applied to the container | components (list): Components to be rendered inside the container | | Returns: | ContainerComponent: The new component | | add_datagrid(self, dataframe, action_buttons: 'list' = None) | Renders a data grid | | Args: | dataframe: Dataframe to render | action_buttons (list): Row actions to render | | Returns: | DatagridComponent: The new component | | add_divider(self) -> 'DividerComponent' | Renders a divider | | | | Returns: | DividerComponent: The new component | | add_emgithub(self, url: 'str') | Renders a block of code from a github URL | | Args: | url (str): URL of the GitHub file to be rendered | | Returns: | EmgithubComponent: The new component | | add_form(self, action: 'str' = '?', method: 'str' = 'GET', components: 'list' = None) -> 'FormComponent' | Renders a form | | Args: | action (str): Optional. Action for the form. This is the page that the form will submit to. Defaults to the current page | method (str): Optional. Method for the form (i.e. GET, POST) | components (list): List of Component of the form | | Returns: | FormComponent: The new component | | add_formemail(self, label: 'str' = 'Your E-mail', name: 'str' = 'email', placeholder: 'str' = 'user@example.com') -> 'FormemailComponent' | Renders a form email | | Args: | label (str): Optional. Label for the form email | name (str): Optional. Name for the form email | placeholder (str): Optional. Placeholder | | Returns: | FormemailComponent: The new component | | add_formpassword(self, label: 'str' = 'Password', name: 'str' = 'password', placeholder: 'str' = 'password') -> 'FormpasswordComponent' | Renders a form password | | Args: | label (str): Optional. Label for the form password | name (str): Optional. Name for the form password | placeholder (str): Optional. Placeholder | | Returns: | FormpasswordComponent: The new component | | add_formselect(self, label: 'str', name: 'str', options, value: 'str' = '') -> 'FormselectComponent' | Renders a form select | | Args: | label (str): Label for the form select | name (str): Name for the form select | options: Options for the form select | value (str): Optional. Selected value | | Returns: | FormselectComponent: The new component | | add_formsubmit(self, label: 'str' = 'Submit') -> 'FormsubmitComponent' | Renders a form submit button | | Args: | label (str): Optional. Label for the form submit button | | Returns: | FormsubmitComponent: The new component | | add_formtext(self, label: 'str', name: 'str', placeholder: 'str' = '', value: 'str' = '') -> 'FormtextComponent' | Renders a form | | Args: | label (str): Label for the form text | name (str): Name for the form text | placeholder (str): Optional. Placeholder | value (str): Optional. Value if you want to pre-populate | | Returns: | FormtextComponent: The new component | | add_formtextarea(self, label: 'str' = 'Your Message', name: 'str' = 'message', placeholder: 'str' = 'Leave a comment...', value: 'str' = '') -> 'FormtextareaComponent' | Renders a text area | | Args: | label (str): Optional. Label for the text area | name (str): Optional. Name for the text area | placeholder (str): Optional. Placeholder | value (str): Optional. Value if you want to pre-populate | | Returns: | FormtextareaComponent: The new component | | add_header(self, text: 'str', size: 'int' = 5, classes: 'str' = '') -> 'HeaderComponent' | Renders a header | | Args: | text (str): Text to be rendered | size (int): Optional. Size of the header. Choose 1-9 | classes (str): Optional. Classes to be applied to the header | | Returns: | HeaderComponent: The new component | | add_html(self, value: 'str') -> 'HtmlComponent' | Renders raw HTML. This is meant to be an escape hatch for when you need to render something that isn't supported by PyVibe. | | Args: | value (str): Raw HTML code to be rendered | | Returns: | HtmlComponent: The new component | | add_image(self, url: 'str', alt: 'str', classes: 'str' = '') -> 'ImageComponent' | Renders an image | | Args: | url (str): URL of the image | alt (str): Alt text for the image | classes (str): Optional. Classes to be applied to the image | | Returns: | ImageComponent: The new component | | add_link(self, text: 'str', url: 'str', classes: 'str' = '') -> 'LinkComponent' | Renders a link | | Args: | text (str): Text to be rendered | url (str): URL to link to | classes (str): Optional. Classes to be applied to the link | | Returns: | LinkComponent: The new component | | add_list(self, show_dots: 'bool' = True, classes: 'str' = '', components: 'list' = None) -> 'ListComponent' | Renders a list of items | | Args: | show_dots (bool): Optional. Whether or not to show dots | classes (str): Optional. Classes to be applied to the list | components (list): Items to be rendered | | Returns: | ListComponent: The new component | | add_pandastable(self, dataframe, hide_fields: 'list' = [], action_buttons: 'list' = None) | Renders a pandas table | | Args: | dataframe: Dataframe to render | hide_fields (list): List of fields to hide | action_buttons (list): Row actions to render | | Returns: | PandastableComponent: The new component | | add_plainlink(self, text: 'str', url: 'str', classes: 'str' = '') -> 'PlainlinkComponent' | Renders a link without any styling | | Args: | text (str): Text to be rendered | url (str): URL to link to | classes (str): Optional. Classes to be applied to the link | | Returns: | PlainlinkComponent: The new component | | add_plotlyfigure(self, fig, id: 'str' = '') -> 'PlotlyfigureComponent' | Renders a plotly figure | | Args: | fig: Figure to render | id (str): Optional. Unique ID for this element. Will default to a UUID. | | Returns: | PlotlyfigureComponent: The new component | | add_rawtable(self, components: 'list' = None) -> 'RawtableComponent' | Renders a table manually by constructing the table header, body, content, etc.. This is useful if you want to customize the table more than what the other table functions allow. Most of the time you'll use the other table functions instead of this one. | | Args: | components (list): Components to render in the table | | Returns: | RawtableComponent: The new component | | add_scriptstatus(self, job_id: 'str', redirect_url: 'str') -> 'ScriptstatusComponent' | Shows the status of a script execution and redirects to a new page when complete | | Args: | job_id (str): Job id to check the status of | redirect_url (str): URL to redirect to when the script is complete | | Returns: | ScriptstatusComponent: The new component | | add_text(self, value: 'str') -> 'TextComponent' | Renders a paragraph of text | | Args: | value (str): Text to be rendered | | Returns: | TextComponent: The new component | | to_html(self) | | ---------------------------------------------------------------------- | Methods inherited from pyvibe.component_interface.Component: | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors inherited from pyvibe.component_interface.Component: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.CodeComponent
Python Library Documentation: class CodeComponent in module pyvibe class CodeComponent(pyvibe.component_interface.Component) | CodeComponent(value: 'str', header: 'str' = '', prefix: 'str' = '>>>') | | You don't normally need to invoke this constructor directly. Instead, use the `.add_code` method of the parent component. | | Method resolution order: | CodeComponent | pyvibe.component_interface.Component | builtins.object | | Methods defined here: | | __enter__(self) | | __exit__(self, exc_type, exc_value, traceback) | | __init__(self, value: 'str', header: 'str' = '', prefix: 'str' = '>>>') | Initialize self. See help(type(self)) for accurate signature. | | to_html(self) | | ---------------------------------------------------------------------- | Methods inherited from pyvibe.component_interface.Component: | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors inherited from pyvibe.component_interface.Component: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.CodeeditorComponent
Python Library Documentation: class CodeeditorComponent in module pyvibe class CodeeditorComponent(pyvibe.component_interface.Component) | CodeeditorComponent(value: 'str', language: 'str' = 'python') | | You don't normally need to invoke this constructor directly. Instead, use the `.add_codeeditor` method of the parent component. | | Method resolution order: | CodeeditorComponent | pyvibe.component_interface.Component | builtins.object | | Methods defined here: | | __enter__(self) | | __exit__(self, exc_type, exc_value, traceback) | | __init__(self, value: 'str', language: 'str' = 'python') | Initialize self. See help(type(self)) for accurate signature. | | to_html(self) | | ---------------------------------------------------------------------- | Methods inherited from pyvibe.component_interface.Component: | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors inherited from pyvibe.component_interface.Component: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.Component
Python Library Documentation: class Component in module pyvibe.component_interface class Component(builtins.object) | # Base class for all components | | Methods defined here: | | to_html(self) -> str | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.ContainerComponent
Python Library Documentation: class ContainerComponent in module pyvibe class ContainerComponent(pyvibe.component_interface.Component) | ContainerComponent(grid_columns: 'int' = None, classes: 'str' = '', components: 'list' = None) | | You don't normally need to invoke this constructor directly. Instead, use the `.add_container` method of the parent component. | | Method resolution order: | ContainerComponent | pyvibe.component_interface.Component | builtins.object | | Methods defined here: | | __enter__(self) | | __exit__(self, exc_type, exc_value, traceback) | | __init__(self, grid_columns: 'int' = None, classes: 'str' = '', components: 'list' = None) | Initialize self. See help(type(self)) for accurate signature. | | add(self, component) | | add_alert(self, text: 'str', badge: 'str' = '', color: 'str' = 'indigo') -> 'AlertComponent' | Renders an alert | | Args: | text (str): Text to be rendered | badge (str): Optional. Text to be rendered inside the badge | color (str): Optional. Color of the. Choose 'indigo', 'orange', or 'red' | | Returns: | AlertComponent: The new component | | add_card(self, center_content: 'bool' = False, classes: 'str' = '', components: 'list' = None) -> 'CardComponent' | Renders a card | | Args: | center_content (bool): Optional. Whether the card contents should be centered | classes (str): Optional. Classes to be applied to the card | components (list): Components to be rendered inside the card | | Returns: | CardComponent: The new component | | add_code(self, value: 'str', header: 'str' = '', prefix: 'str' = '>>>') -> 'CodeComponent' | Renders a block of code | | Args: | value (str): Code to be rendered | header (str): Optional. Header to be rendered above the code block | prefix (str): Optional. Prefix to be rendered before the code block | | Returns: | CodeComponent: The new component | | add_component(self, component) | | add_container(self, grid_columns: 'int' = None, classes: 'str' = '', components: 'list' = None) -> 'ContainerComponent' | Renders a container to help with layout | | Args: | grid_columns (int): Optional. Number of columns (if any) to use. 1-12 | classes (str): Optional. Classes to be applied to the container | components (list): Components to be rendered inside the container | | Returns: | ContainerComponent: The new component | | add_form(self, action: 'str' = '?', method: 'str' = 'GET', components: 'list' = None) -> 'FormComponent' | Renders a form | | Args: | action (str): Optional. Action for the form. This is the page that the form will submit to. Defaults to the current page | method (str): Optional. Method for the form (i.e. GET, POST) | components (list): List of Component of the form | | Returns: | FormComponent: The new component | | add_formemail(self, label: 'str' = 'Your E-mail', name: 'str' = 'email', placeholder: 'str' = 'user@example.com') -> 'FormemailComponent' | Renders a form email | | Args: | label (str): Optional. Label for the form email | name (str): Optional. Name for the form email | placeholder (str): Optional. Placeholder | | Returns: | FormemailComponent: The new component | | add_formpassword(self, label: 'str' = 'Password', name: 'str' = 'password', placeholder: 'str' = 'password') -> 'FormpasswordComponent' | Renders a form password | | Args: | label (str): Optional. Label for the form password | name (str): Optional. Name for the form password | placeholder (str): Optional. Placeholder | | Returns: | FormpasswordComponent: The new component | | add_formselect(self, label: 'str', name: 'str', options, value: 'str' = '') -> 'FormselectComponent' | Renders a form select | | Args: | label (str): Label for the form select | name (str): Name for the form select | options: Options for the form select | value (str): Optional. Selected value | | Returns: | FormselectComponent: The new component | | add_formsubmit(self, label: 'str' = 'Submit') -> 'FormsubmitComponent' | Renders a form submit button | | Args: | label (str): Optional. Label for the form submit button | | Returns: | FormsubmitComponent: The new component | | add_formtext(self, label: 'str', name: 'str', placeholder: 'str' = '', value: 'str' = '') -> 'FormtextComponent' | Renders a form | | Args: | label (str): Label for the form text | name (str): Name for the form text | placeholder (str): Optional. Placeholder | value (str): Optional. Value if you want to pre-populate | | Returns: | FormtextComponent: The new component | | add_formtextarea(self, label: 'str' = 'Your Message', name: 'str' = 'message', placeholder: 'str' = 'Leave a comment...', value: 'str' = '') -> 'FormtextareaComponent' | Renders a text area | | Args: | label (str): Optional. Label for the text area | name (str): Optional. Name for the text area | placeholder (str): Optional. Placeholder | value (str): Optional. Value if you want to pre-populate | | Returns: | FormtextareaComponent: The new component | | add_header(self, text: 'str', size: 'int' = 5, classes: 'str' = '') -> 'HeaderComponent' | Renders a header | | Args: | text (str): Text to be rendered | size (int): Optional. Size of the header. Choose 1-9 | classes (str): Optional. Classes to be applied to the header | | Returns: | HeaderComponent: The new component | | add_html(self, value: 'str') -> 'HtmlComponent' | Renders raw HTML. This is meant to be an escape hatch for when you need to render something that isn't supported by PyVibe. | | Args: | value (str): Raw HTML code to be rendered | | Returns: | HtmlComponent: The new component | | add_image(self, url: 'str', alt: 'str', classes: 'str' = '') -> 'ImageComponent' | Renders an image | | Args: | url (str): URL of the image | alt (str): Alt text for the image | classes (str): Optional. Classes to be applied to the image | | Returns: | ImageComponent: The new component | | add_link(self, text: 'str', url: 'str', classes: 'str' = '') -> 'LinkComponent' | Renders a link | | Args: | text (str): Text to be rendered | url (str): URL to link to | classes (str): Optional. Classes to be applied to the link | | Returns: | LinkComponent: The new component | | add_list(self, show_dots: 'bool' = True, classes: 'str' = '', components: 'list' = None) -> 'ListComponent' | Renders a list of items | | Args: | show_dots (bool): Optional. Whether or not to show dots | classes (str): Optional. Classes to be applied to the list | components (list): Items to be rendered | | Returns: | ListComponent: The new component | | add_pandastable(self, dataframe, hide_fields: 'list' = [], action_buttons: 'list' = None) | Renders a pandas table | | Args: | dataframe: Dataframe to render | hide_fields (list): List of fields to hide | action_buttons (list): Row actions to render | | Returns: | PandastableComponent: The new component | | add_plainlink(self, text: 'str', url: 'str', classes: 'str' = '') -> 'PlainlinkComponent' | Renders a link without any styling | | Args: | text (str): Text to be rendered | url (str): URL to link to | classes (str): Optional. Classes to be applied to the link | | Returns: | PlainlinkComponent: The new component | | add_plotlyfigure(self, fig, id: 'str' = '') -> 'PlotlyfigureComponent' | Renders a plotly figure | | Args: | fig: Figure to render | id (str): Optional. Unique ID for this element. Will default to a UUID. | | Returns: | PlotlyfigureComponent: The new component | | add_scriptstatus(self, job_id: 'str', redirect_url: 'str') -> 'ScriptstatusComponent' | Shows the status of a script execution and redirects to a new page when complete | | Args: | job_id (str): Job id to check the status of | redirect_url (str): URL to redirect to when the script is complete | | Returns: | ScriptstatusComponent: The new component | | add_text(self, value: 'str') -> 'TextComponent' | Renders a paragraph of text | | Args: | value (str): Text to be rendered | | Returns: | TextComponent: The new component | | to_html(self) | | ---------------------------------------------------------------------- | Methods inherited from pyvibe.component_interface.Component: | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors inherited from pyvibe.component_interface.Component: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.DividerComponent
Python Library Documentation: class DividerComponent in module pyvibe class DividerComponent(pyvibe.component_interface.Component) | You don't normally need to invoke this constructor directly. Instead, use the `.add_divider` method of the parent component. | | Method resolution order: | DividerComponent | pyvibe.component_interface.Component | builtins.object | | Methods defined here: | | __enter__(self) | | __exit__(self, exc_type, exc_value, traceback) | | __init__(self) | Initialize self. See help(type(self)) for accurate signature. | | to_html(self) | | ---------------------------------------------------------------------- | Methods inherited from pyvibe.component_interface.Component: | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors inherited from pyvibe.component_interface.Component: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.FormComponent
Python Library Documentation: class FormComponent in module pyvibe class FormComponent(pyvibe.component_interface.Component) | FormComponent(action: 'str' = '?', method: 'str' = 'GET', components: 'list' = None) | | You don't normally need to invoke this constructor directly. Instead, use the `.add_form` method of the parent component. | | Method resolution order: | FormComponent | pyvibe.component_interface.Component | builtins.object | | Methods defined here: | | __enter__(self) | | __exit__(self, exc_type, exc_value, traceback) | | __init__(self, action: 'str' = '?', method: 'str' = 'GET', components: 'list' = None) | Initialize self. See help(type(self)) for accurate signature. | | add(self, component) | | add_code(self, value: 'str', header: 'str' = '', prefix: 'str' = '>>>') -> 'CodeComponent' | Renders a block of code | | Args: | value (str): Code to be rendered | header (str): Optional. Header to be rendered above the code block | prefix (str): Optional. Prefix to be rendered before the code block | | Returns: | CodeComponent: The new component | | add_component(self, component) | | add_container(self, grid_columns: 'int' = None, classes: 'str' = '', components: 'list' = None) -> 'ContainerComponent' | Renders a container to help with layout | | Args: | grid_columns (int): Optional. Number of columns (if any) to use. 1-12 | classes (str): Optional. Classes to be applied to the container | components (list): Components to be rendered inside the container | | Returns: | ContainerComponent: The new component | | add_formemail(self, label: 'str' = 'Your E-mail', name: 'str' = 'email', placeholder: 'str' = 'user@example.com') -> 'FormemailComponent' | Renders a form email | | Args: | label (str): Optional. Label for the form email | name (str): Optional. Name for the form email | placeholder (str): Optional. Placeholder | | Returns: | FormemailComponent: The new component | | add_formhidden(self, name: 'str', value: 'str') -> 'FormhiddenComponent' | Renders a hidden field on a form. This is useful for carrying state between pages without having to store data in the database. | | Args: | name (str): Name for the form hidden | value (str): Value for the form hidden | | Returns: | FormhiddenComponent: The new component | | add_formpassword(self, label: 'str' = 'Password', name: 'str' = 'password', placeholder: 'str' = 'password') -> 'FormpasswordComponent' | Renders a form password | | Args: | label (str): Optional. Label for the form password | name (str): Optional. Name for the form password | placeholder (str): Optional. Placeholder | | Returns: | FormpasswordComponent: The new component | | add_formselect(self, label: 'str', name: 'str', options, value: 'str' = '') -> 'FormselectComponent' | Renders a form select | | Args: | label (str): Label for the form select | name (str): Name for the form select | options: Options for the form select | value (str): Optional. Selected value | | Returns: | FormselectComponent: The new component | | add_formsubmit(self, label: 'str' = 'Submit') -> 'FormsubmitComponent' | Renders a form submit button | | Args: | label (str): Optional. Label for the form submit button | | Returns: | FormsubmitComponent: The new component | | add_formtext(self, label: 'str', name: 'str', placeholder: 'str' = '', value: 'str' = '') -> 'FormtextComponent' | Renders a form | | Args: | label (str): Label for the form text | name (str): Name for the form text | placeholder (str): Optional. Placeholder | value (str): Optional. Value if you want to pre-populate | | Returns: | FormtextComponent: The new component | | add_formtextarea(self, label: 'str' = 'Your Message', name: 'str' = 'message', placeholder: 'str' = 'Leave a comment...', value: 'str' = '') -> 'FormtextareaComponent' | Renders a text area | | Args: | label (str): Optional. Label for the text area | name (str): Optional. Name for the text area | placeholder (str): Optional. Placeholder | value (str): Optional. Value if you want to pre-populate | | Returns: | FormtextareaComponent: The new component | | add_image(self, url: 'str', alt: 'str', classes: 'str' = '') -> 'ImageComponent' | Renders an image | | Args: | url (str): URL of the image | alt (str): Alt text for the image | classes (str): Optional. Classes to be applied to the image | | Returns: | ImageComponent: The new component | | add_link(self, text: 'str', url: 'str', classes: 'str' = '') -> 'LinkComponent' | Renders a link | | Args: | text (str): Text to be rendered | url (str): URL to link to | classes (str): Optional. Classes to be applied to the link | | Returns: | LinkComponent: The new component | | add_list(self, show_dots: 'bool' = True, classes: 'str' = '', components: 'list' = None) -> 'ListComponent' | Renders a list of items | | Args: | show_dots (bool): Optional. Whether or not to show dots | classes (str): Optional. Classes to be applied to the list | components (list): Items to be rendered | | Returns: | ListComponent: The new component | | add_rawtable(self, components: 'list' = None) -> 'RawtableComponent' | Renders a table manually by constructing the table header, body, content, etc.. This is useful if you want to customize the table more than what the other table functions allow. Most of the time you'll use the other table functions instead of this one. | | Args: | components (list): Components to render in the table | | Returns: | RawtableComponent: The new component | | add_text(self, value: 'str') -> 'TextComponent' | Renders a paragraph of text | | Args: | value (str): Text to be rendered | | Returns: | TextComponent: The new component | | to_html(self) | | ---------------------------------------------------------------------- | Methods inherited from pyvibe.component_interface.Component: | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors inherited from pyvibe.component_interface.Component: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.FormemailComponent
Python Library Documentation: class FormemailComponent in module pyvibe class FormemailComponent(pyvibe.component_interface.Component) | FormemailComponent(label: 'str' = 'Your E-mail', name: 'str' = 'email', placeholder: 'str' = 'user@example.com') | | You don't normally need to invoke this constructor directly. Instead, use the `.add_formemail` method of the parent component. | | Method resolution order: | FormemailComponent | pyvibe.component_interface.Component | builtins.object | | Methods defined here: | | __enter__(self) | | __exit__(self, exc_type, exc_value, traceback) | | __init__(self, label: 'str' = 'Your E-mail', name: 'str' = 'email', placeholder: 'str' = 'user@example.com') | Initialize self. See help(type(self)) for accurate signature. | | to_html(self) | | ---------------------------------------------------------------------- | Methods inherited from pyvibe.component_interface.Component: | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors inherited from pyvibe.component_interface.Component: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.FormpasswordComponent
Python Library Documentation: class FormpasswordComponent in module pyvibe class FormpasswordComponent(pyvibe.component_interface.Component) | FormpasswordComponent(label: 'str' = 'Password', name: 'str' = 'password', placeholder: 'str' = 'password') | | You don't normally need to invoke this constructor directly. Instead, use the `.add_formpassword` method of the parent component. | | Method resolution order: | FormpasswordComponent | pyvibe.component_interface.Component | builtins.object | | Methods defined here: | | __enter__(self) | | __exit__(self, exc_type, exc_value, traceback) | | __init__(self, label: 'str' = 'Password', name: 'str' = 'password', placeholder: 'str' = 'password') | Initialize self. See help(type(self)) for accurate signature. | | to_html(self) | | ---------------------------------------------------------------------- | Methods inherited from pyvibe.component_interface.Component: | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors inherited from pyvibe.component_interface.Component: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.FormselectComponent
Python Library Documentation: class FormselectComponent in module pyvibe class FormselectComponent(pyvibe.component_interface.Component) | FormselectComponent(label: 'str', name: 'str', options, value: 'str' = '') | | You don't normally need to invoke this constructor directly. Instead, use the `.add_formselect` method of the parent component. | | Method resolution order: | FormselectComponent | pyvibe.component_interface.Component | builtins.object | | Methods defined here: | | __enter__(self) | | __exit__(self, exc_type, exc_value, traceback) | | __init__(self, label: 'str', name: 'str', options, value: 'str' = '') | Initialize self. See help(type(self)) for accurate signature. | | add_selectoption(self, label: 'str', value: 'str', selected: 'str' = '') -> 'SelectoptionComponent' | Renders a select option | | Args: | label (str): Label for the select option | value (str): Value for the select option | selected (str): Optional. Use 'selected' if this is selected | | Returns: | SelectoptionComponent: The new component | | to_html(self) | | ---------------------------------------------------------------------- | Methods inherited from pyvibe.component_interface.Component: | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors inherited from pyvibe.component_interface.Component: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.FormsubmitComponent
Python Library Documentation: class FormsubmitComponent in module pyvibe class FormsubmitComponent(pyvibe.component_interface.Component) | FormsubmitComponent(label: 'str' = 'Submit') | | You don't normally need to invoke this constructor directly. Instead, use the `.add_formsubmit` method of the parent component. | | Method resolution order: | FormsubmitComponent | pyvibe.component_interface.Component | builtins.object | | Methods defined here: | | __enter__(self) | | __exit__(self, exc_type, exc_value, traceback) | | __init__(self, label: 'str' = 'Submit') | Initialize self. See help(type(self)) for accurate signature. | | to_html(self) | | ---------------------------------------------------------------------- | Methods inherited from pyvibe.component_interface.Component: | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors inherited from pyvibe.component_interface.Component: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.FormtextComponent
Python Library Documentation: class FormtextComponent in module pyvibe class FormtextComponent(pyvibe.component_interface.Component) | FormtextComponent(label: 'str', name: 'str', placeholder: 'str' = '', value: 'str' = '') | | You don't normally need to invoke this constructor directly. Instead, use the `.add_formtext` method of the parent component. | | Method resolution order: | FormtextComponent | pyvibe.component_interface.Component | builtins.object | | Methods defined here: | | __enter__(self) | | __exit__(self, exc_type, exc_value, traceback) | | __init__(self, label: 'str', name: 'str', placeholder: 'str' = '', value: 'str' = '') | Initialize self. See help(type(self)) for accurate signature. | | to_html(self) | | ---------------------------------------------------------------------- | Methods inherited from pyvibe.component_interface.Component: | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors inherited from pyvibe.component_interface.Component: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.FormtextareaComponent
Python Library Documentation: class FormtextareaComponent in module pyvibe class FormtextareaComponent(pyvibe.component_interface.Component) | FormtextareaComponent(label: 'str' = 'Your Message', name: 'str' = 'message', placeholder: 'str' = 'Leave a comment...', value: 'str' = '') | | You don't normally need to invoke this constructor directly. Instead, use the `.add_formtextarea` method of the parent component. | | Method resolution order: | FormtextareaComponent | pyvibe.component_interface.Component | builtins.object | | Methods defined here: | | __enter__(self) | | __exit__(self, exc_type, exc_value, traceback) | | __init__(self, label: 'str' = 'Your Message', name: 'str' = 'message', placeholder: 'str' = 'Leave a comment...', value: 'str' = '') | Initialize self. See help(type(self)) for accurate signature. | | to_html(self) | | ---------------------------------------------------------------------- | Methods inherited from pyvibe.component_interface.Component: | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors inherited from pyvibe.component_interface.Component: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.HeaderComponent
Python Library Documentation: class HeaderComponent in module pyvibe class HeaderComponent(pyvibe.component_interface.Component) | HeaderComponent(text: 'str', size: 'int' = 5, classes: 'str' = '') | | You don't normally need to invoke this constructor directly. Instead, use the `.add_header` method of the parent component. | | Method resolution order: | HeaderComponent | pyvibe.component_interface.Component | builtins.object | | Methods defined here: | | __enter__(self) | | __exit__(self, exc_type, exc_value, traceback) | | __init__(self, text: 'str', size: 'int' = 5, classes: 'str' = '') | Initialize self. See help(type(self)) for accurate signature. | | to_html(self) | | ---------------------------------------------------------------------- | Methods inherited from pyvibe.component_interface.Component: | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors inherited from pyvibe.component_interface.Component: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.HtmlComponent
Python Library Documentation: class HtmlComponent in module pyvibe class HtmlComponent(pyvibe.component_interface.Component) | HtmlComponent(value: 'str') | | You don't normally need to invoke this constructor directly. Instead, use the `.add_html` method of the parent component. | | Method resolution order: | HtmlComponent | pyvibe.component_interface.Component | builtins.object | | Methods defined here: | | __enter__(self) | | __exit__(self, exc_type, exc_value, traceback) | | __init__(self, value: 'str') | Initialize self. See help(type(self)) for accurate signature. | | to_html(self) | | ---------------------------------------------------------------------- | Methods inherited from pyvibe.component_interface.Component: | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors inherited from pyvibe.component_interface.Component: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.ImageComponent
Python Library Documentation: class ImageComponent in module pyvibe class ImageComponent(pyvibe.component_interface.Component) | ImageComponent(url: 'str', alt: 'str', classes: 'str' = '') | | You don't normally need to invoke this constructor directly. Instead, use the `.add_image` method of the parent component. | | Method resolution order: | ImageComponent | pyvibe.component_interface.Component | builtins.object | | Methods defined here: | | __enter__(self) | | __exit__(self, exc_type, exc_value, traceback) | | __init__(self, url: 'str', alt: 'str', classes: 'str' = '') | Initialize self. See help(type(self)) for accurate signature. | | to_html(self) | | ---------------------------------------------------------------------- | Methods inherited from pyvibe.component_interface.Component: | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors inherited from pyvibe.component_interface.Component: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.LinkComponent
Python Library Documentation: class LinkComponent in module pyvibe class LinkComponent(pyvibe.component_interface.Component) | LinkComponent(text: 'str', url: 'str', classes: 'str' = '') | | You don't normally need to invoke this constructor directly. Instead, use the `.add_link` method of the parent component. | | Method resolution order: | LinkComponent | pyvibe.component_interface.Component | builtins.object | | Methods defined here: | | __enter__(self) | | __exit__(self, exc_type, exc_value, traceback) | | __init__(self, text: 'str', url: 'str', classes: 'str' = '') | Initialize self. See help(type(self)) for accurate signature. | | to_html(self) | | ---------------------------------------------------------------------- | Methods inherited from pyvibe.component_interface.Component: | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors inherited from pyvibe.component_interface.Component: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.ListComponent
Python Library Documentation: class ListComponent in module pyvibe class ListComponent(pyvibe.component_interface.Component) | ListComponent(show_dots: 'bool' = True, classes: 'str' = '', components: 'list' = None) | | You don't normally need to invoke this constructor directly. Instead, use the `.add_list` method of the parent component. | | Method resolution order: | ListComponent | pyvibe.component_interface.Component | builtins.object | | Methods defined here: | | __enter__(self) | | __exit__(self, exc_type, exc_value, traceback) | | __init__(self, show_dots: 'bool' = True, classes: 'str' = '', components: 'list' = None) | Initialize self. See help(type(self)) for accurate signature. | | add(self, component) | | add_component(self, component) | | add_listitem(self, value: 'str', classes: 'str' = '', svg: 'str' = '', is_checked: 'bool' = None) -> 'ListitemComponent' | Renders an item in a list | | Args: | value (str): Text to be rendered | classes (str): Optional. Classes to be applied to the list item | svg (str): Optional. SVG to render inside the list | is_checked (bool): Optional. Whether or not the item is checked | | Returns: | ListitemComponent: The new component | | to_html(self) | | ---------------------------------------------------------------------- | Methods inherited from pyvibe.component_interface.Component: | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors inherited from pyvibe.component_interface.Component: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.ListitemComponent
Python Library Documentation: class ListitemComponent in module pyvibe class ListitemComponent(pyvibe.component_interface.Component) | ListitemComponent(value: 'str', classes: 'str' = '', svg: 'str' = '', is_checked: 'bool' = None) | | You don't normally need to invoke this constructor directly. Instead, use the `.add_listitem` method of the parent component. | | Method resolution order: | ListitemComponent | pyvibe.component_interface.Component | builtins.object | | Methods defined here: | | __enter__(self) | | __exit__(self, exc_type, exc_value, traceback) | | __init__(self, value: 'str', classes: 'str' = '', svg: 'str' = '', is_checked: 'bool' = None) | Initialize self. See help(type(self)) for accurate signature. | | to_html(self) | | ---------------------------------------------------------------------- | Methods inherited from pyvibe.component_interface.Component: | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors inherited from pyvibe.component_interface.Component: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.Page
Python Library Documentation: class Page in module pyvibe class Page(pyvibe.component_interface.Component) | Page(title: 'str' = '', description: 'str' = '', image: 'str' = '', additional_head: 'str' = '', navbar: 'Navbar' = <pyvibe.Navbar object at 0x000002D5557A3DA0>, footer: 'Footer' = <pyvibe.Footer object at 0x000002D5557A3E00>, sidebar: 'Sidebar' = None, components: 'list' = None) | | A page is the top level component of a website. It contains the navbar, the main content, and the footer. | | Method resolution order: | Page | pyvibe.component_interface.Component | builtins.object | | Methods defined here: | | __enter__(self) | | __exit__(self, exc_type, exc_value, traceback) | | __init__(self, title: 'str' = '', description: 'str' = '', image: 'str' = '', additional_head: 'str' = '', navbar: 'Navbar' = <pyvibe.Navbar object at 0x000002D5557A3DA0>, footer: 'Footer' = <pyvibe.Footer object at 0x000002D5557A3E00>, sidebar: 'Sidebar' = None, components: 'list' = None) | Initialize self. See help(type(self)) for accurate signature. | | add(self, component) | | add_alert(self, text: 'str', badge: 'str' = '', color: 'str' = 'indigo') -> 'AlertComponent' | Renders an alert | | Args: | text (str): Text to be rendered | badge (str): Optional. Text to be rendered inside the badge | color (str): Optional. Color of the. Choose 'indigo', 'orange', or 'red' | | Returns: | AlertComponent: The new component | | add_card(self, center_content: 'bool' = False, classes: 'str' = '', components: 'list' = None) -> 'CardComponent' | Renders a card | | Args: | center_content (bool): Optional. Whether the card contents should be centered | classes (str): Optional. Classes to be applied to the card | components (list): Components to be rendered inside the card | | Returns: | CardComponent: The new component | | add_code(self, value: 'str', header: 'str' = '', prefix: 'str' = '>>>') -> 'CodeComponent' | Renders a block of code | | Args: | value (str): Code to be rendered | header (str): Optional. Header to be rendered above the code block | prefix (str): Optional. Prefix to be rendered before the code block | | Returns: | CodeComponent: The new component | | add_codeeditor(self, value: 'str', language: 'str' = 'python') -> 'CodeeditorComponent' | Renders a code editor | | Args: | value (str): Code to be rendered | language (str): Optional. Language mode for syntax highlighting | | Returns: | CodeeditorComponent: The new component | | add_component(self, component) | | add_container(self, grid_columns: 'int' = None, classes: 'str' = '', components: 'list' = None) -> 'ContainerComponent' | Renders a container to help with layout | | Args: | grid_columns (int): Optional. Number of columns (if any) to use. 1-12 | classes (str): Optional. Classes to be applied to the container | components (list): Components to be rendered inside the container | | Returns: | ContainerComponent: The new component | | add_datagrid(self, dataframe, action_buttons: 'list' = None) | Renders a data grid | | Args: | dataframe: Dataframe to render | action_buttons (list): Row actions to render | | Returns: | DatagridComponent: The new component | | add_divider(self) -> 'DividerComponent' | Renders a divider | | | | Returns: | DividerComponent: The new component | | add_emgithub(self, url: 'str') | Renders a block of code from a github URL | | Args: | url (str): URL of the GitHub file to be rendered | | Returns: | EmgithubComponent: The new component | | add_form(self, action: 'str' = '?', method: 'str' = 'GET', components: 'list' = None) -> 'FormComponent' | Renders a form | | Args: | action (str): Optional. Action for the form. This is the page that the form will submit to. Defaults to the current page | method (str): Optional. Method for the form (i.e. GET, POST) | components (list): List of Component of the form | | Returns: | FormComponent: The new component | | add_header(self, text: 'str', size: 'int' = 5, classes: 'str' = '') -> 'HeaderComponent' | Renders a header | | Args: | text (str): Text to be rendered | size (int): Optional. Size of the header. Choose 1-9 | classes (str): Optional. Classes to be applied to the header | | Returns: | HeaderComponent: The new component | | add_html(self, value: 'str') -> 'HtmlComponent' | Renders raw HTML. This is meant to be an escape hatch for when you need to render something that isn't supported by PyVibe. | | Args: | value (str): Raw HTML code to be rendered | | Returns: | HtmlComponent: The new component | | add_image(self, url: 'str', alt: 'str', classes: 'str' = '') -> 'ImageComponent' | Renders an image | | Args: | url (str): URL of the image | alt (str): Alt text for the image | classes (str): Optional. Classes to be applied to the image | | Returns: | ImageComponent: The new component | | add_link(self, text: 'str', url: 'str', classes: 'str' = '') -> 'LinkComponent' | Renders a link | | Args: | text (str): Text to be rendered | url (str): URL to link to | classes (str): Optional. Classes to be applied to the link | | Returns: | LinkComponent: The new component | | add_list(self, show_dots: 'bool' = True, classes: 'str' = '', components: 'list' = None) -> 'ListComponent' | Renders a list of items | | Args: | show_dots (bool): Optional. Whether or not to show dots | classes (str): Optional. Classes to be applied to the list | components (list): Items to be rendered | | Returns: | ListComponent: The new component | | add_pandastable(self, dataframe, hide_fields: 'list' = [], action_buttons: 'list' = None) | Renders a pandas table | | Args: | dataframe: Dataframe to render | hide_fields (list): List of fields to hide | action_buttons (list): Row actions to render | | Returns: | PandastableComponent: The new component | | add_plainlink(self, text: 'str', url: 'str', classes: 'str' = '') -> 'PlainlinkComponent' | Renders a link without any styling | | Args: | text (str): Text to be rendered | url (str): URL to link to | classes (str): Optional. Classes to be applied to the link | | Returns: | PlainlinkComponent: The new component | | add_plotlyfigure(self, fig, id: 'str' = '') -> 'PlotlyfigureComponent' | Renders a plotly figure | | Args: | fig: Figure to render | id (str): Optional. Unique ID for this element. Will default to a UUID. | | Returns: | PlotlyfigureComponent: The new component | | add_rawtable(self, components: 'list' = None) -> 'RawtableComponent' | Renders a table manually by constructing the table header, body, content, etc.. This is useful if you want to customize the table more than what the other table functions allow. Most of the time you'll use the other table functions instead of this one. | | Args: | components (list): Components to render in the table | | Returns: | RawtableComponent: The new component | | add_scriptstatus(self, job_id: 'str', redirect_url: 'str') -> 'ScriptstatusComponent' | Shows the status of a script execution and redirects to a new page when complete | | Args: | job_id (str): Job id to check the status of | redirect_url (str): URL to redirect to when the script is complete | | Returns: | ScriptstatusComponent: The new component | | add_section(self, id: 'str', name: 'str', level: 'int' = 1) -> 'SectionComponent' | Creates an invisible element that can be used to link to in the sidebar | | Args: | id (str): ID for the section. This is what will appear in the link as /page#id | name (str): Name of the section. This is what will appear in the navigation bar | level (int): Optional. Level of the section. This is the indentation that will appear in the navigation bar | | Returns: | SectionComponent: The new component | | add_text(self, value: 'str') -> 'TextComponent' | Renders a paragraph of text | | Args: | value (str): Text to be rendered | | Returns: | TextComponent: The new component | | to_html(self) | | ---------------------------------------------------------------------- | Methods inherited from pyvibe.component_interface.Component: | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors inherited from pyvibe.component_interface.Component: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.PlainlinkComponent
Python Library Documentation: class PlainlinkComponent in module pyvibe class PlainlinkComponent(pyvibe.component_interface.Component) | PlainlinkComponent(text: 'str', url: 'str', classes: 'str' = '') | | You don't normally need to invoke this constructor directly. Instead, use the `.add_plainlink` method of the parent component. | | Method resolution order: | PlainlinkComponent | pyvibe.component_interface.Component | builtins.object | | Methods defined here: | | __enter__(self) | | __exit__(self, exc_type, exc_value, traceback) | | __init__(self, text: 'str', url: 'str', classes: 'str' = '') | Initialize self. See help(type(self)) for accurate signature. | | to_html(self) | | ---------------------------------------------------------------------- | Methods inherited from pyvibe.component_interface.Component: | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors inherited from pyvibe.component_interface.Component: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.PlotlyfigureComponent
Python Library Documentation: class PlotlyfigureComponent in module pyvibe class PlotlyfigureComponent(pyvibe.component_interface.Component) | PlotlyfigureComponent(fig, id: 'str' = '') | | You don't normally need to invoke this constructor directly. Instead, use the `.add_plotlyfigure` method of the parent component. | | Method resolution order: | PlotlyfigureComponent | pyvibe.component_interface.Component | builtins.object | | Methods defined here: | | __enter__(self) | | __exit__(self, exc_type, exc_value, traceback) | | __init__(self, fig, id: 'str' = '') | Initialize self. See help(type(self)) for accurate signature. | | to_html(self) | | ---------------------------------------------------------------------- | Methods inherited from pyvibe.component_interface.Component: | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors inherited from pyvibe.component_interface.Component: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.RawtableComponent
Python Library Documentation: class RawtableComponent in module pyvibe class RawtableComponent(pyvibe.component_interface.Component) | RawtableComponent(components: 'list' = None) | | You don't normally need to invoke this constructor directly. Instead, use the `.add_rawtable` method of the parent component. | | Method resolution order: | RawtableComponent | pyvibe.component_interface.Component | builtins.object | | Methods defined here: | | __enter__(self) | | __exit__(self, exc_type, exc_value, traceback) | | __init__(self, components: 'list' = None) | Initialize self. See help(type(self)) for accurate signature. | | add(self, component) | | add_component(self, component) | | add_tablebody(self, components: 'list' = None) -> 'TablebodyComponent' | Renders a table body | | Args: | components (list): Components to render in the table body | | Returns: | TablebodyComponent: The new component | | add_tablehead(self, components: 'list' = None) -> 'TableheadComponent' | Renders a table head | | Args: | components (list): Components to render in the table head | | Returns: | TableheadComponent: The new component | | add_tablerow(self, components: 'list' = None) -> 'TablerowComponent' | Renders a table row | | Args: | components (list): Components to render in the table row | | Returns: | TablerowComponent: The new component | | to_html(self) | | ---------------------------------------------------------------------- | Methods inherited from pyvibe.component_interface.Component: | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors inherited from pyvibe.component_interface.Component: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.Rowaction
Python Library Documentation: class Rowaction in module pyvibe class Rowaction(pyvibe.component_interface.Component) | Rowaction(label: 'str', url: 'str', classes: 'str' = '', open_in_new_window: 'bool' = True) | | Renders a row action | | Method resolution order: | Rowaction | pyvibe.component_interface.Component | builtins.object | | Methods defined here: | | __enter__(self) | | __exit__(self, exc_type, exc_value, traceback) | | __init__(self, label: 'str', url: 'str', classes: 'str' = '', open_in_new_window: 'bool' = True) | Initialize self. See help(type(self)) for accurate signature. | | to_html(self) | | ---------------------------------------------------------------------- | Methods inherited from pyvibe.component_interface.Component: | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors inherited from pyvibe.component_interface.Component: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.ScriptstatusComponent
Python Library Documentation: class ScriptstatusComponent in module pyvibe class ScriptstatusComponent(pyvibe.component_interface.Component) | ScriptstatusComponent(job_id: 'str', redirect_url: 'str') | | You don't normally need to invoke this constructor directly. Instead, use the `.add_scriptstatus` method of the parent component. | | Method resolution order: | ScriptstatusComponent | pyvibe.component_interface.Component | builtins.object | | Methods defined here: | | __enter__(self) | | __exit__(self, exc_type, exc_value, traceback) | | __init__(self, job_id: 'str', redirect_url: 'str') | Initialize self. See help(type(self)) for accurate signature. | | to_html(self) | | ---------------------------------------------------------------------- | Methods inherited from pyvibe.component_interface.Component: | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors inherited from pyvibe.component_interface.Component: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.SectionComponent
Python Library Documentation: class SectionComponent in module pyvibe class SectionComponent(pyvibe.component_interface.Component) | SectionComponent(id: 'str', name: 'str', level: 'int' = 1) | | You don't normally need to invoke this constructor directly. Instead, use the `.add_section` method of the parent component. | | Method resolution order: | SectionComponent | pyvibe.component_interface.Component | builtins.object | | Methods defined here: | | __enter__(self) | | __exit__(self, exc_type, exc_value, traceback) | | __init__(self, id: 'str', name: 'str', level: 'int' = 1) | Initialize self. See help(type(self)) for accurate signature. | | to_html(self) | | ---------------------------------------------------------------------- | Methods inherited from pyvibe.component_interface.Component: | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors inherited from pyvibe.component_interface.Component: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.SelectoptionComponent
Python Library Documentation: class SelectoptionComponent in module pyvibe class SelectoptionComponent(pyvibe.component_interface.Component) | SelectoptionComponent(label: 'str', value: 'str', selected: 'str' = '') | | You don't normally need to invoke this constructor directly. Instead, use the `.add_selectoption` method of the parent component. | | Method resolution order: | SelectoptionComponent | pyvibe.component_interface.Component | builtins.object | | Methods defined here: | | __enter__(self) | | __exit__(self, exc_type, exc_value, traceback) | | __init__(self, label: 'str', value: 'str', selected: 'str' = '') | Initialize self. See help(type(self)) for accurate signature. | | to_html(self) | | ---------------------------------------------------------------------- | Methods inherited from pyvibe.component_interface.Component: | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors inherited from pyvibe.component_interface.Component: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.Sidebar
Python Library Documentation: class Sidebar in module pyvibe class Sidebar(pyvibe.component_interface.Component) | Sidebar(components: 'list' = None) | | Renders a sidebar | | Method resolution order: | Sidebar | pyvibe.component_interface.Component | builtins.object | | Methods defined here: | | __enter__(self) | | __exit__(self, exc_type, exc_value, traceback) | | __init__(self, components: 'list' = None) | Initialize self. See help(type(self)) for accurate signature. | | add(self, component) | | add_component(self, component) | | add_sidebarcategory(self, title: 'str', components: 'list' = None) -> 'SidebarcategoryComponent' | Renders a category in the sidebar | | Args: | title (str): Title of the category | components (list): List of Sidebar Link in the category | | Returns: | SidebarcategoryComponent: The new component | | to_html(self) | | ---------------------------------------------------------------------- | Methods inherited from pyvibe.component_interface.Component: | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors inherited from pyvibe.component_interface.Component: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.SidebarcategoryComponent
Python Library Documentation: class SidebarcategoryComponent in module pyvibe class SidebarcategoryComponent(pyvibe.component_interface.Component) | SidebarcategoryComponent(title: 'str', components: 'list' = None) | | You don't normally need to invoke this constructor directly. Instead, use the `.add_sidebarcategory` method of the parent component. | | Method resolution order: | SidebarcategoryComponent | pyvibe.component_interface.Component | builtins.object | | Methods defined here: | | __enter__(self) | | __exit__(self, exc_type, exc_value, traceback) | | __init__(self, title: 'str', components: 'list' = None) | Initialize self. See help(type(self)) for accurate signature. | | add(self, component) | | add_component(self, component) | | add_sidebarlink(self, title: 'str', url: 'str') -> 'SidebarlinkComponent' | Renders a link in the sidebar | | Args: | title (str): Title of the link | url (str): URL of the link | | Returns: | SidebarlinkComponent: The new component | | to_html(self) | | ---------------------------------------------------------------------- | Methods inherited from pyvibe.component_interface.Component: | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors inherited from pyvibe.component_interface.Component: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.SidebarlinkComponent
Python Library Documentation: class SidebarlinkComponent in module pyvibe class SidebarlinkComponent(pyvibe.component_interface.Component) | SidebarlinkComponent(title: 'str', url: 'str') | | You don't normally need to invoke this constructor directly. Instead, use the `.add_sidebarlink` method of the parent component. | | Method resolution order: | SidebarlinkComponent | pyvibe.component_interface.Component | builtins.object | | Methods defined here: | | __enter__(self) | | __exit__(self, exc_type, exc_value, traceback) | | __init__(self, title: 'str', url: 'str') | Initialize self. See help(type(self)) for accurate signature. | | to_html(self) | | ---------------------------------------------------------------------- | Methods inherited from pyvibe.component_interface.Component: | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors inherited from pyvibe.component_interface.Component: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.TablebodyComponent
Python Library Documentation: class TablebodyComponent in module pyvibe class TablebodyComponent(pyvibe.component_interface.Component) | TablebodyComponent(components: 'list' = None) | | You don't normally need to invoke this constructor directly. Instead, use the `.add_tablebody` method of the parent component. | | Method resolution order: | TablebodyComponent | pyvibe.component_interface.Component | builtins.object | | Methods defined here: | | __enter__(self) | | __exit__(self, exc_type, exc_value, traceback) | | __init__(self, components: 'list' = None) | Initialize self. See help(type(self)) for accurate signature. | | add(self, component) | | add_component(self, component) | | add_tablerow(self, components: 'list' = None) -> 'TablerowComponent' | Renders a table row | | Args: | components (list): Components to render in the table row | | Returns: | TablerowComponent: The new component | | to_html(self) | | ---------------------------------------------------------------------- | Methods inherited from pyvibe.component_interface.Component: | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors inherited from pyvibe.component_interface.Component: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.TablecellComponent
Python Library Documentation: class TablecellComponent in module pyvibe class TablecellComponent(pyvibe.component_interface.Component) | TablecellComponent(value: 'str') | | You don't normally need to invoke this constructor directly. Instead, use the `.add_tablecell` method of the parent component. | | Method resolution order: | TablecellComponent | pyvibe.component_interface.Component | builtins.object | | Methods defined here: | | __enter__(self) | | __exit__(self, exc_type, exc_value, traceback) | | __init__(self, value: 'str') | Initialize self. See help(type(self)) for accurate signature. | | to_html(self) | | ---------------------------------------------------------------------- | Methods inherited from pyvibe.component_interface.Component: | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors inherited from pyvibe.component_interface.Component: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.TablecellheaderComponent
Python Library Documentation: class TablecellheaderComponent in module pyvibe class TablecellheaderComponent(pyvibe.component_interface.Component) | TablecellheaderComponent(value: 'str') | | You don't normally need to invoke this constructor directly. Instead, use the `.add_tablecellheader` method of the parent component. | | Method resolution order: | TablecellheaderComponent | pyvibe.component_interface.Component | builtins.object | | Methods defined here: | | __enter__(self) | | __exit__(self, exc_type, exc_value, traceback) | | __init__(self, value: 'str') | Initialize self. See help(type(self)) for accurate signature. | | to_html(self) | | ---------------------------------------------------------------------- | Methods inherited from pyvibe.component_interface.Component: | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors inherited from pyvibe.component_interface.Component: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.TablecolComponent
Python Library Documentation: class TablecolComponent in module pyvibe class TablecolComponent(pyvibe.component_interface.Component) | TablecolComponent(components: 'list' = None) | | You don't normally need to invoke this constructor directly. Instead, use the `.add_tablecol` method of the parent component. | | Method resolution order: | TablecolComponent | pyvibe.component_interface.Component | builtins.object | | Methods defined here: | | __enter__(self) | | __exit__(self, exc_type, exc_value, traceback) | | __init__(self, components: 'list' = None) | Initialize self. See help(type(self)) for accurate signature. | | add(self, component) | | add_component(self, component) | | to_html(self) | | ---------------------------------------------------------------------- | Methods inherited from pyvibe.component_interface.Component: | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors inherited from pyvibe.component_interface.Component: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.TableheadComponent
Python Library Documentation: class TableheadComponent in module pyvibe class TableheadComponent(pyvibe.component_interface.Component) | TableheadComponent(components: 'list' = None) | | You don't normally need to invoke this constructor directly. Instead, use the `.add_tablehead` method of the parent component. | | Method resolution order: | TableheadComponent | pyvibe.component_interface.Component | builtins.object | | Methods defined here: | | __enter__(self) | | __exit__(self, exc_type, exc_value, traceback) | | __init__(self, components: 'list' = None) | Initialize self. See help(type(self)) for accurate signature. | | add(self, component) | | add_component(self, component) | | add_tablecell(self, value: 'str') -> 'TablecellComponent' | Renders a table cell | | Args: | value (str): String to render in the table cell | | Returns: | TablecellComponent: The new component | | add_tablecellheader(self, value: 'str') -> 'TablecellheaderComponent' | Renders a table cell header | | Args: | value (str): String to render in the table cell header | | Returns: | TablecellheaderComponent: The new component | | add_tablecol(self, components: 'list' = None) -> 'TablecolComponent' | Renders a table column | | Args: | components (list): Components to render in the table column | | Returns: | TablecolComponent: The new component | | add_tablerow(self, components: 'list' = None) -> 'TablerowComponent' | Renders a table row | | Args: | components (list): Components to render in the table row | | Returns: | TablerowComponent: The new component | | to_html(self) | | ---------------------------------------------------------------------- | Methods inherited from pyvibe.component_interface.Component: | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors inherited from pyvibe.component_interface.Component: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.TablerowComponent
Python Library Documentation: class TablerowComponent in module pyvibe class TablerowComponent(pyvibe.component_interface.Component) | TablerowComponent(components: 'list' = None) | | You don't normally need to invoke this constructor directly. Instead, use the `.add_tablerow` method of the parent component. | | Method resolution order: | TablerowComponent | pyvibe.component_interface.Component | builtins.object | | Methods defined here: | | __enter__(self) | | __exit__(self, exc_type, exc_value, traceback) | | __init__(self, components: 'list' = None) | Initialize self. See help(type(self)) for accurate signature. | | add(self, component) | | add_component(self, component) | | add_tablecell(self, value: 'str') -> 'TablecellComponent' | Renders a table cell | | Args: | value (str): String to render in the table cell | | Returns: | TablecellComponent: The new component | | add_tablecellheader(self, value: 'str') -> 'TablecellheaderComponent' | Renders a table cell header | | Args: | value (str): String to render in the table cell header | | Returns: | TablecellheaderComponent: The new component | | add_tablecol(self, components: 'list' = None) -> 'TablecolComponent' | Renders a table column | | Args: | components (list): Components to render in the table column | | Returns: | TablecolComponent: The new component | | to_html(self) | | ---------------------------------------------------------------------- | Methods inherited from pyvibe.component_interface.Component: | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors inherited from pyvibe.component_interface.Component: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.TextComponent
Python Library Documentation: class TextComponent in module pyvibe class TextComponent(pyvibe.component_interface.Component) | TextComponent(value: 'str') | | You don't normally need to invoke this constructor directly. Instead, use the `.add_text` method of the parent component. | | Method resolution order: | TextComponent | pyvibe.component_interface.Component | builtins.object | | Methods defined here: | | __enter__(self) | | __exit__(self, exc_type, exc_value, traceback) | | __init__(self, value: 'str') | Initialize self. See help(type(self)) for accurate signature. | | to_html(self) | | ---------------------------------------------------------------------- | Methods inherited from pyvibe.component_interface.Component: | | to_json(self) -> str | | ---------------------------------------------------------------------- | Data descriptors inherited from pyvibe.component_interface.Component: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.abstractmethod
Python Library Documentation: function abstractmethod in module abc
abstractmethod(funcobj)
A decorator indicating abstract methods.
Requires that the metaclass is ABCMeta or derived from it. A
class that has a metaclass derived from ABCMeta cannot be
instantiated unless all of its abstract methods are overridden.
The abstract methods can be called using any of the normal
'super' call mechanisms. abstractmethod() may be used to declare
abstract methods for properties and descriptors.
Usage:
class C(metaclass=ABCMeta):
@abstractmethod
def my_abstract_method(self, arg1, arg2, argN):
...
pyvibe.advanced_add_datagrid
Python Library Documentation: function advanced_add_datagrid in module pyvibe advanced_add_datagrid(page, dataframe, action_buttons)
pyvibe.advanced_add_emgithub
Python Library Documentation: function advanced_add_emgithub in module pyvibe advanced_add_emgithub(self, url)
pyvibe.advanced_add_pandastable
Python Library Documentation: function advanced_add_pandastable in module pyvibe advanced_add_pandastable(self, df, hide_fields, action_buttons)
pyvibe.annotations
Python Library Documentation: _Feature in module __future__ object class _Feature(builtins.object) | _Feature(optionalRelease, mandatoryRelease, compiler_flag) | | Methods defined here: | | __init__(self, optionalRelease, mandatoryRelease, compiler_flag) | Initialize self. See help(type(self)) for accurate signature. | | __repr__(self) | Return repr(self). | | getMandatoryRelease(self) | Return release in which this feature will become mandatory. | | This is a 5-tuple, of the same form as sys.version_info, or, if | the feature was dropped, or the release date is undetermined, is None. | | getOptionalRelease(self) | Return first release in which this feature was recognized. | | This is a 5-tuple, of the same form as sys.version_info. | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
pyvibe.component_interface
Python Library Documentation: module pyvibe.component_interface in pyvibe
NAME
pyvibe.component_interface
CLASSES
builtins.object
Component
class Component(builtins.object)
| # Base class for all components
|
| Methods defined here:
|
| to_html(self) -> str
|
| to_json(self) -> str
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\site-packages\pyvibe\component_interface.py
pyvibe.format_input
Python Library Documentation: function format_input in module pyvibe format_input(input)
pyvibe.json
Python Library Documentation: package json
NAME
json
MODULE REFERENCE
https://docs.python.org/3.12/library/json.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
DESCRIPTION
JSON (JavaScript Object Notation) <https://json.org> is a subset of
JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data
interchange format.
:mod:`json` exposes an API familiar to users of the standard library
:mod:`marshal` and :mod:`pickle` modules. It is derived from a
version of the externally maintained simplejson library.
Encoding basic Python object hierarchies::
>>> import json
>>> json.dumps(['foo', {'bar': ('baz', None, 1.0, 2)}])
'["foo", {"bar": ["baz", null, 1.0, 2]}]'
>>> print(json.dumps("\"foo\bar"))
"\"foo\bar"
>>> print(json.dumps('\u1234'))
"\u1234"
>>> print(json.dumps('\\'))
"\\"
>>> print(json.dumps({"c": 0, "b": 0, "a": 0}, sort_keys=True))
{"a": 0, "b": 0, "c": 0}
>>> from io import StringIO
>>> io = StringIO()
>>> json.dump(['streaming API'], io)
>>> io.getvalue()
'["streaming API"]'
Compact encoding::
>>> import json
>>> mydict = {'4': 5, '6': 7}
>>> json.dumps([1,2,3,mydict], separators=(',', ':'))
'[1,2,3,{"4":5,"6":7}]'
Pretty printing::
>>> import json
>>> print(json.dumps({'4': 5, '6': 7}, sort_keys=True, indent=4))
{
"4": 5,
"6": 7
}
Decoding JSON::
>>> import json
>>> obj = ['foo', {'bar': ['baz', None, 1.0, 2]}]
>>> json.loads('["foo", {"bar":["baz", null, 1.0, 2]}]') == obj
True
>>> json.loads('"\\"foo\\bar"') == '"foo\x08ar'
True
>>> from io import StringIO
>>> io = StringIO('["streaming API"]')
>>> json.load(io)[0] == 'streaming API'
True
Specializing JSON object decoding::
>>> import json
>>> def as_complex(dct):
... if '__complex__' in dct:
... return complex(dct['real'], dct['imag'])
... return dct
...
>>> json.loads('{"__complex__": true, "real": 1, "imag": 2}',
... object_hook=as_complex)
(1+2j)
>>> from decimal import Decimal
>>> json.loads('1.1', parse_float=Decimal) == Decimal('1.1')
True
Specializing JSON object encoding::
>>> import json
>>> def encode_complex(obj):
... if isinstance(obj, complex):
... return [obj.real, obj.imag]
... raise TypeError(f'Object of type {obj.__class__.__name__} '
... f'is not JSON serializable')
...
>>> json.dumps(2 + 1j, default=encode_complex)
'[2.0, 1.0]'
>>> json.JSONEncoder(default=encode_complex).encode(2 + 1j)
'[2.0, 1.0]'
>>> ''.join(json.JSONEncoder(default=encode_complex).iterencode(2 + 1j))
'[2.0, 1.0]'
Using json.tool from the shell to validate and pretty-print::
$ echo '{"json":"obj"}' | python -m json.tool
{
"json": "obj"
}
$ echo '{ 1.2:3.4}' | python -m json.tool
Expecting property name enclosed in double quotes: line 1 column 3 (char 2)
PACKAGE CONTENTS
decoder
encoder
scanner
tool
CLASSES
builtins.ValueError(builtins.Exception)
json.decoder.JSONDecodeError
builtins.object
json.decoder.JSONDecoder
json.encoder.JSONEncoder
class JSONDecodeError(builtins.ValueError)
| JSONDecodeError(msg, doc, pos)
|
| Subclass of ValueError with the following additional properties:
|
| msg: The unformatted error message
| doc: The JSON document being parsed
| pos: The start index of doc where parsing failed
| lineno: The line corresponding to pos
| colno: The column corresponding to pos
|
| Method resolution order:
| JSONDecodeError
| builtins.ValueError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Methods defined here:
|
| __init__(self, msg, doc, pos)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(self)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.ValueError:
|
| __new__(*args, **kwargs) class method of builtins.ValueError
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class JSONDecoder(builtins.object)
| JSONDecoder(*, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, strict=True, object_pairs_hook=None)
|
| Simple JSON <https://json.org> decoder
|
| Performs the following translations in decoding by default:
|
| +---------------+-------------------+
| | JSON | Python |
| +===============+===================+
| | object | dict |
| +---------------+-------------------+
| | array | list |
| +---------------+-------------------+
| | string | str |
| +---------------+-------------------+
| | number (int) | int |
| +---------------+-------------------+
| | number (real) | float |
| +---------------+-------------------+
| | true | True |
| +---------------+-------------------+
| | false | False |
| +---------------+-------------------+
| | null | None |
| +---------------+-------------------+
|
| It also understands ``NaN``, ``Infinity``, and ``-Infinity`` as
| their corresponding ``float`` values, which is outside the JSON spec.
|
| Methods defined here:
|
| __init__(self, *, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, strict=True, object_pairs_hook=None)
| ``object_hook``, if specified, will be called with the result
| of every JSON object decoded and its return value will be used in
| place of the given ``dict``. This can be used to provide custom
| deserializations (e.g. to support JSON-RPC class hinting).
|
| ``object_pairs_hook``, if specified will be called with the result of
| every JSON object decoded with an ordered list of pairs. The return
| value of ``object_pairs_hook`` will be used instead of the ``dict``.
| This feature can be used to implement custom decoders.
| If ``object_hook`` is also defined, the ``object_pairs_hook`` takes
| priority.
|
| ``parse_float``, if specified, will be called with the string
| of every JSON float to be decoded. By default this is equivalent to
| float(num_str). This can be used to use another datatype or parser
| for JSON floats (e.g. decimal.Decimal).
|
| ``parse_int``, if specified, will be called with the string
| of every JSON int to be decoded. By default this is equivalent to
| int(num_str). This can be used to use another datatype or parser
| for JSON integers (e.g. float).
|
| ``parse_constant``, if specified, will be called with one of the
| following strings: -Infinity, Infinity, NaN.
| This can be used to raise an exception if invalid JSON numbers
| are encountered.
|
| If ``strict`` is false (true is the default), then control
| characters will be allowed inside strings. Control characters in
| this context are those with character codes in the 0-31 range,
| including ``'\t'`` (tab), ``'\n'``, ``'\r'`` and ``'\0'``.
|
| decode(self, s, _w=<built-in method match of re.Pattern object at 0x000002D55578B100>)
| Return the Python representation of ``s`` (a ``str`` instance
| containing a JSON document).
|
| raw_decode(self, s, idx=0)
| Decode a JSON document from ``s`` (a ``str`` beginning with
| a JSON document) and return a 2-tuple of the Python
| representation and the index in ``s`` where the document ended.
|
| This can be used to decode a JSON document from a string that may
| have extraneous data at the end.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
class JSONEncoder(builtins.object)
| JSONEncoder(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)
|
| Extensible JSON <https://json.org> encoder for Python data structures.
|
| Supports the following objects and types by default:
|
| +-------------------+---------------+
| | Python | JSON |
| +===================+===============+
| | dict | object |
| +-------------------+---------------+
| | list, tuple | array |
| +-------------------+---------------+
| | str | string |
| +-------------------+---------------+
| | int, float | number |
| +-------------------+---------------+
| | True | true |
| +-------------------+---------------+
| | False | false |
| +-------------------+---------------+
| | None | null |
| +-------------------+---------------+
|
| To extend this to recognize other objects, subclass and implement a
| ``.default()`` method with another method that returns a serializable
| object for ``o`` if possible, otherwise it should call the superclass
| implementation (to raise ``TypeError``).
|
| Methods defined here:
|
| __init__(self, *, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)
| Constructor for JSONEncoder, with sensible defaults.
|
| If skipkeys is false, then it is a TypeError to attempt
| encoding of keys that are not str, int, float or None. If
| skipkeys is True, such items are simply skipped.
|
| If ensure_ascii is true, the output is guaranteed to be str
| objects with all incoming non-ASCII characters escaped. If
| ensure_ascii is false, the output can contain non-ASCII characters.
|
| If check_circular is true, then lists, dicts, and custom encoded
| objects will be checked for circular references during encoding to
| prevent an infinite recursion (which would cause an RecursionError).
| Otherwise, no such check takes place.
|
| If allow_nan is true, then NaN, Infinity, and -Infinity will be
| encoded as such. This behavior is not JSON specification compliant,
| but is consistent with most JavaScript based encoders and decoders.
| Otherwise, it will be a ValueError to encode such floats.
|
| If sort_keys is true, then the output of dictionaries will be
| sorted by key; this is useful for regression tests to ensure
| that JSON serializations can be compared on a day-to-day basis.
|
| If indent is a non-negative integer, then JSON array
| elements and object members will be pretty-printed with that
| indent level. An indent level of 0 will only insert newlines.
| None is the most compact representation.
|
| If specified, separators should be an (item_separator, key_separator)
| tuple. The default is (', ', ': ') if *indent* is ``None`` and
| (',', ': ') otherwise. To get the most compact JSON representation,
| you should specify (',', ':') to eliminate whitespace.
|
| If specified, default is a function that gets called for objects
| that can't otherwise be serialized. It should return a JSON encodable
| version of the object or raise a ``TypeError``.
|
| default(self, o)
| Implement this method in a subclass such that it returns
| a serializable object for ``o``, or calls the base implementation
| (to raise a ``TypeError``).
|
| For example, to support arbitrary iterators, you could
| implement default like this::
|
| def default(self, o):
| try:
| iterable = iter(o)
| except TypeError:
| pass
| else:
| return list(iterable)
| # Let the base class default method raise the TypeError
| return super().default(o)
|
| encode(self, o)
| Return a JSON string representation of a Python data structure.
|
| >>> from json.encoder import JSONEncoder
| >>> JSONEncoder().encode({"foo": ["bar", "baz"]})
| '{"foo": ["bar", "baz"]}'
|
| iterencode(self, o, _one_shot=False)
| Encode the given object and yield each string
| representation as available.
|
| For example::
|
| for chunk in JSONEncoder().iterencode(bigobject):
| mysocket.write(chunk)
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| item_separator = ', '
|
| key_separator = ': '
FUNCTIONS
dump(obj, fp, *, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, cls=None, indent=None, separators=None, default=None, sort_keys=False, **kw)
Serialize ``obj`` as a JSON formatted stream to ``fp`` (a
``.write()``-supporting file-like object).
If ``skipkeys`` is true then ``dict`` keys that are not basic types
(``str``, ``int``, ``float``, ``bool``, ``None``) will be skipped
instead of raising a ``TypeError``.
If ``ensure_ascii`` is false, then the strings written to ``fp`` can
contain non-ASCII characters if they appear in strings contained in
``obj``. Otherwise, all such characters are escaped in JSON strings.
If ``check_circular`` is false, then the circular reference check
for container types will be skipped and a circular reference will
result in an ``RecursionError`` (or worse).
If ``allow_nan`` is false, then it will be a ``ValueError`` to
serialize out of range ``float`` values (``nan``, ``inf``, ``-inf``)
in strict compliance of the JSON specification, instead of using the
JavaScript equivalents (``NaN``, ``Infinity``, ``-Infinity``).
If ``indent`` is a non-negative integer, then JSON array elements and
object members will be pretty-printed with that indent level. An indent
level of 0 will only insert newlines. ``None`` is the most compact
representation.
If specified, ``separators`` should be an ``(item_separator, key_separator)``
tuple. The default is ``(', ', ': ')`` if *indent* is ``None`` and
``(',', ': ')`` otherwise. To get the most compact JSON representation,
you should specify ``(',', ':')`` to eliminate whitespace.
``default(obj)`` is a function that should return a serializable version
of obj or raise TypeError. The default simply raises TypeError.
If *sort_keys* is true (default: ``False``), then the output of
dictionaries will be sorted by key.
To use a custom ``JSONEncoder`` subclass (e.g. one that overrides the
``.default()`` method to serialize additional types), specify it with
the ``cls`` kwarg; otherwise ``JSONEncoder`` is used.
dumps(obj, *, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, cls=None, indent=None, separators=None, default=None, sort_keys=False, **kw)
Serialize ``obj`` to a JSON formatted ``str``.
If ``skipkeys`` is true then ``dict`` keys that are not basic types
(``str``, ``int``, ``float``, ``bool``, ``None``) will be skipped
instead of raising a ``TypeError``.
If ``ensure_ascii`` is false, then the return value can contain non-ASCII
characters if they appear in strings contained in ``obj``. Otherwise, all
such characters are escaped in JSON strings.
If ``check_circular`` is false, then the circular reference check
for container types will be skipped and a circular reference will
result in an ``RecursionError`` (or worse).
If ``allow_nan`` is false, then it will be a ``ValueError`` to
serialize out of range ``float`` values (``nan``, ``inf``, ``-inf``) in
strict compliance of the JSON specification, instead of using the
JavaScript equivalents (``NaN``, ``Infinity``, ``-Infinity``).
If ``indent`` is a non-negative integer, then JSON array elements and
object members will be pretty-printed with that indent level. An indent
level of 0 will only insert newlines. ``None`` is the most compact
representation.
If specified, ``separators`` should be an ``(item_separator, key_separator)``
tuple. The default is ``(', ', ': ')`` if *indent* is ``None`` and
``(',', ': ')`` otherwise. To get the most compact JSON representation,
you should specify ``(',', ':')`` to eliminate whitespace.
``default(obj)`` is a function that should return a serializable version
of obj or raise TypeError. The default simply raises TypeError.
If *sort_keys* is true (default: ``False``), then the output of
dictionaries will be sorted by key.
To use a custom ``JSONEncoder`` subclass (e.g. one that overrides the
``.default()`` method to serialize additional types), specify it with
the ``cls`` kwarg; otherwise ``JSONEncoder`` is used.
load(fp, *, cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, object_pairs_hook=None, **kw)
Deserialize ``fp`` (a ``.read()``-supporting file-like object containing
a JSON document) to a Python object.
``object_hook`` is an optional function that will be called with the
result of any object literal decode (a ``dict``). The return value of
``object_hook`` will be used instead of the ``dict``. This feature
can be used to implement custom decoders (e.g. JSON-RPC class hinting).
``object_pairs_hook`` is an optional function that will be called with the
result of any object literal decoded with an ordered list of pairs. The
return value of ``object_pairs_hook`` will be used instead of the ``dict``.
This feature can be used to implement custom decoders. If ``object_hook``
is also defined, the ``object_pairs_hook`` takes priority.
To use a custom ``JSONDecoder`` subclass, specify it with the ``cls``
kwarg; otherwise ``JSONDecoder`` is used.
loads(s, *, cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, object_pairs_hook=None, **kw)
Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
``object_hook`` is an optional function that will be called with the
result of any object literal decode (a ``dict``). The return value of
``object_hook`` will be used instead of the ``dict``. This feature
can be used to implement custom decoders (e.g. JSON-RPC class hinting).
``object_pairs_hook`` is an optional function that will be called with the
result of any object literal decoded with an ordered list of pairs. The
return value of ``object_pairs_hook`` will be used instead of the ``dict``.
This feature can be used to implement custom decoders. If ``object_hook``
is also defined, the ``object_pairs_hook`` takes priority.
``parse_float``, if specified, will be called with the string
of every JSON float to be decoded. By default this is equivalent to
float(num_str). This can be used to use another datatype or parser
for JSON floats (e.g. decimal.Decimal).
``parse_int``, if specified, will be called with the string
of every JSON int to be decoded. By default this is equivalent to
int(num_str). This can be used to use another datatype or parser
for JSON integers (e.g. float).
``parse_constant``, if specified, will be called with one of the
following strings: -Infinity, Infinity, NaN.
This can be used to raise an exception if invalid JSON numbers
are encountered.
To use a custom ``JSONDecoder`` subclass, specify it with the ``cls``
kwarg; otherwise ``JSONDecoder`` is used.
DATA
__all__ = ['dump', 'dumps', 'load', 'loads', 'JSONDecoder', 'JSONDecod...
VERSION
2.0.9
AUTHOR
Bob Ippolito <bob@redivi.com>
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\json\__init__.py
pyvibe.quote
Python Library Documentation: function quote in module urllib.parse
quote(string, safe='/', encoding=None, errors=None)
quote('abc def') -> 'abc%20def'
Each part of a URL, e.g. the path info, the query, etc., has a
different set of reserved characters that must be quoted. The
quote function offers a cautious (not minimal) way to quote a
string for most of these parts.
RFC 3986 Uniform Resource Identifier (URI): Generic Syntax lists
the following (un)reserved characters.
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
reserved = gen-delims / sub-delims
gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@"
sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
/ "*" / "+" / "," / ";" / "="
Each of the reserved characters is reserved in some component of a URL,
but not necessarily in all of them.
The quote function %-escapes all characters that are neither in the
unreserved chars ("always safe") nor the additional chars set via the
safe arg.
The default for the safe arg is '/'. The character is reserved, but in
typical usage the quote function is being called on a path where the
existing slash characters are to be preserved.
Python 3.7 updates from using RFC 2396 to RFC 3986 to quote URL strings.
Now, "~" is included in the set of unreserved characters.
string and safe may be either str or bytes objects. encoding and errors
must not be specified if string is a bytes object.
The optional encoding and errors parameters specify how to deal with
non-ASCII characters, as accepted by the str.encode method.
By default, encoding='utf-8' (characters are encoded with UTF-8), and
errors='strict' (unsupported characters raise a UnicodeEncodeError).
pyvibe.re
Python Library Documentation: package re
NAME
re - Support for regular expressions (RE).
MODULE REFERENCE
https://docs.python.org/3.12/library/re.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
DESCRIPTION
This module provides regular expression matching operations similar to
those found in Perl. It supports both 8-bit and Unicode strings; both
the pattern and the strings being processed can contain null bytes and
characters outside the US ASCII range.
Regular expressions can contain both special and ordinary characters.
Most ordinary characters, like "A", "a", or "0", are the simplest
regular expressions; they simply match themselves. You can
concatenate ordinary characters, so last matches the string 'last'.
The special characters are:
"." Matches any character except a newline.
"^" Matches the start of the string.
"$" Matches the end of the string or just before the newline at
the end of the string.
"*" Matches 0 or more (greedy) repetitions of the preceding RE.
Greedy means that it will match as many repetitions as possible.
"+" Matches 1 or more (greedy) repetitions of the preceding RE.
"?" Matches 0 or 1 (greedy) of the preceding RE.
*?,+?,?? Non-greedy versions of the previous three special characters.
{m,n} Matches from m to n repetitions of the preceding RE.
{m,n}? Non-greedy version of the above.
"\\" Either escapes special characters or signals a special sequence.
[] Indicates a set of characters.
A "^" as the first character indicates a complementing set.
"|" A|B, creates an RE that will match either A or B.
(...) Matches the RE inside the parentheses.
The contents can be retrieved or matched later in the string.
(?aiLmsux) The letters set the corresponding flags defined below.
(?:...) Non-grouping version of regular parentheses.
(?P<name>...) The substring matched by the group is accessible by name.
(?P=name) Matches the text matched earlier by the group named name.
(?#...) A comment; ignored.
(?=...) Matches if ... matches next, but doesn't consume the string.
(?!...) Matches if ... doesn't match next.
(?<=...) Matches if preceded by ... (must be fixed length).
(?<!...) Matches if not preceded by ... (must be fixed length).
(?(id/name)yes|no) Matches yes pattern if the group with id/name matched,
the (optional) no pattern otherwise.
The special sequences consist of "\\" and a character from the list
below. If the ordinary character is not on the list, then the
resulting RE will match the second character.
\number Matches the contents of the group of the same number.
\A Matches only at the start of the string.
\Z Matches only at the end of the string.
\b Matches the empty string, but only at the start or end of a word.
\B Matches the empty string, but not at the start or end of a word.
\d Matches any decimal digit; equivalent to the set [0-9] in
bytes patterns or string patterns with the ASCII flag.
In string patterns without the ASCII flag, it will match the whole
range of Unicode digits.
\D Matches any non-digit character; equivalent to [^\d].
\s Matches any whitespace character; equivalent to [ \t\n\r\f\v] in
bytes patterns or string patterns with the ASCII flag.
In string patterns without the ASCII flag, it will match the whole
range of Unicode whitespace characters.
\S Matches any non-whitespace character; equivalent to [^\s].
\w Matches any alphanumeric character; equivalent to [a-zA-Z0-9_]
in bytes patterns or string patterns with the ASCII flag.
In string patterns without the ASCII flag, it will match the
range of Unicode alphanumeric characters (letters plus digits
plus underscore).
With LOCALE, it will match the set [0-9_] plus characters defined
as letters for the current locale.
\W Matches the complement of \w.
\\ Matches a literal backslash.
This module exports the following functions:
match Match a regular expression pattern to the beginning of a string.
fullmatch Match a regular expression pattern to all of a string.
search Search a string for the presence of a pattern.
sub Substitute occurrences of a pattern found in a string.
subn Same as sub, but also return the number of substitutions made.
split Split a string by the occurrences of a pattern.
findall Find all occurrences of a pattern in a string.
finditer Return an iterator yielding a Match object for each match.
compile Compile a pattern into a Pattern object.
purge Clear the regular expression cache.
escape Backslash all non-alphanumerics in a string.
Each function other than purge and escape can take an optional 'flags' argument
consisting of one or more of the following module constants, joined by "|".
A, L, and U are mutually exclusive.
A ASCII For string patterns, make \w, \W, \b, \B, \d, \D
match the corresponding ASCII character categories
(rather than the whole Unicode categories, which is the
default).
For bytes patterns, this flag is the only available
behaviour and needn't be specified.
I IGNORECASE Perform case-insensitive matching.
L LOCALE Make \w, \W, \b, \B, dependent on the current locale.
M MULTILINE "^" matches the beginning of lines (after a newline)
as well as the string.
"$" matches the end of lines (before a newline) as well
as the end of the string.
S DOTALL "." matches any character at all, including the newline.
X VERBOSE Ignore whitespace and comments for nicer looking RE's.
U UNICODE For compatibility only. Ignored for string patterns (it
is the default), and forbidden for bytes patterns.
This module also defines an exception 'error'.
PACKAGE CONTENTS
_casefix
_compiler
_constants
_parser
CLASSES
builtins.Exception(builtins.BaseException)
error
builtins.object
Match
Pattern
enum.IntFlag(builtins.int, enum.ReprEnum, enum.Flag)
RegexFlag
class Match(builtins.object)
| The result of re.match() and re.search().
| Match objects always have a boolean value of True.
|
| Methods defined here:
|
| __copy__(self, /)
|
| __deepcopy__(self, memo, /)
|
| __getitem__(self, key, /)
| Return self[key].
|
| __repr__(self, /)
| Return repr(self).
|
| end(self, group=0, /)
| Return index of the end of the substring matched by group.
|
| expand(self, /, template)
| Return the string obtained by doing backslash substitution on the string template, as done by the sub() method.
|
| group(...)
| group([group1, ...]) -> str or tuple.
| Return subgroup(s) of the match by indices or names.
| For 0 returns the entire match.
|
| groupdict(self, /, default=None)
| Return a dictionary containing all the named subgroups of the match, keyed by the subgroup name.
|
| default
| Is used for groups that did not participate in the match.
|
| groups(self, /, default=None)
| Return a tuple containing all the subgroups of the match, from 1.
|
| default
| Is used for groups that did not participate in the match.
|
| span(self, group=0, /)
| For match object m, return the 2-tuple (m.start(group), m.end(group)).
|
| start(self, group=0, /)
| Return index of the start of the substring matched by group.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __class_getitem__(...)
| See PEP 585
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| endpos
| The index into the string beyond which the RE engine will not go.
|
| lastgroup
| The name of the last matched capturing group.
|
| lastindex
| The integer index of the last matched capturing group.
|
| pos
| The index into the string at which the RE engine started looking for a match.
|
| re
| The regular expression object.
|
| regs
|
| string
| The string passed to match() or search().
class Pattern(builtins.object)
| Compiled regular expression object.
|
| Methods defined here:
|
| __copy__(self, /)
|
| __deepcopy__(self, memo, /)
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __repr__(self, /)
| Return repr(self).
|
| findall(self, /, string, pos=0, endpos=9223372036854775807)
| Return a list of all non-overlapping matches of pattern in string.
|
| finditer(self, /, string, pos=0, endpos=9223372036854775807)
| Return an iterator over all non-overlapping matches for the RE pattern in string.
|
| For each match, the iterator returns a match object.
|
| fullmatch(self, /, string, pos=0, endpos=9223372036854775807)
| Matches against all of the string.
|
| match(self, /, string, pos=0, endpos=9223372036854775807)
| Matches zero or more characters at the beginning of the string.
|
| scanner(self, /, string, pos=0, endpos=9223372036854775807)
|
| search(self, /, string, pos=0, endpos=9223372036854775807)
| Scan through string looking for a match, and return a corresponding match object instance.
|
| Return None if no position in the string matches.
|
| split(self, /, string, maxsplit=0)
| Split string by the occurrences of pattern.
|
| sub(self, /, repl, string, count=0)
| Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl.
|
| subn(self, /, repl, string, count=0)
| Return the tuple (new_string, number_of_subs_made) found by replacing the leftmost non-overlapping occurrences of pattern with the replacement repl.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __class_getitem__(...)
| See PEP 585
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| flags
| The regex matching flags.
|
| groupindex
| A dictionary mapping group names to group numbers.
|
| groups
| The number of capturing groups in the pattern.
|
| pattern
| The pattern string from which the RE object was compiled.
class RegexFlag(enum.IntFlag)
| RegexFlag(*values)
|
| An enumeration.
|
| Method resolution order:
| RegexFlag
| enum.IntFlag
| builtins.int
| enum.ReprEnum
| enum.Flag
| enum.Enum
| builtins.object
|
| Methods defined here:
|
| __and__(self, other) from enum.Flag
|
| __format__(self, format_spec, /) from builtins.int
| Convert to a string according to format_spec.
|
| __invert__(self) from enum.Flag
|
| __new__(cls, value) from enum.Enum
| Create and return a new object. See help(type) for accurate signature.
|
| __or__(self, other) from enum.Flag
| Return self|value.
|
| __rand__ = __and__(self, other)
|
| __repr__ = global_flag_repr(self) from enum
| use module.flag_name instead of class.flag_name
|
| the module is the last module in case of a multi-module name
|
| __ror__ = __or__(self, other)
|
| __rxor__ = __xor__(self, other)
|
| __str__(self, /) from builtins.object
| Return str(self).
|
| __xor__(self, other) from enum.Flag
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| ASCII = re.ASCII
|
| DEBUG = re.DEBUG
|
| DOTALL = re.DOTALL
|
| IGNORECASE = re.IGNORECASE
|
| LOCALE = re.LOCALE
|
| MULTILINE = re.MULTILINE
|
| TEMPLATE = re.TEMPLATE
|
| UNICODE = re.UNICODE
|
| VERBOSE = re.VERBOSE
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.int:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods inherited from builtins.int:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.int:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Flag:
|
| __contains__(self, other)
| Returns True if self has at least the same flags set as other.
|
| __iter__(self)
| Returns flags in definition order.
|
| __len__(self)
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Methods inherited from enum.Enum:
|
| __dir__(self)
| Returns public methods and other interesting attributes.
|
| __init__(self, *args, **kwds)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce_ex__(self, proto)
| Helper for pickle.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __getitem__(name)
| Return the member matching `name`.
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
class error(builtins.Exception)
| error(msg, pattern=None, pos=None)
|
| Exception raised for invalid regular expressions.
|
| Attributes:
|
| msg: The unformatted error message
| pattern: The regular expression pattern
| pos: The index in the pattern where compilation failed (may be None)
| lineno: The line corresponding to pos (may be None)
| colno: The column corresponding to pos (may be None)
|
| Method resolution order:
| error
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Methods defined here:
|
| __init__(self, msg, pattern=None, pos=None) from re._constants.error
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) class method of builtins.Exception
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| add_note(...)
| Exception.add_note(note) --
| add a note to the exception
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
FUNCTIONS
compile(pattern, flags=0)
Compile a regular expression pattern, returning a Pattern object.
escape(pattern)
Escape special characters in a string.
findall(pattern, string, flags=0)
Return a list of all non-overlapping matches in the string.
If one or more capturing groups are present in the pattern, return
a list of groups; this will be a list of tuples if the pattern
has more than one group.
Empty matches are included in the result.
finditer(pattern, string, flags=0)
Return an iterator over all non-overlapping matches in the
string. For each match, the iterator returns a Match object.
Empty matches are included in the result.
fullmatch(pattern, string, flags=0)
Try to apply the pattern to all of the string, returning
a Match object, or None if no match was found.
match(pattern, string, flags=0)
Try to apply the pattern at the start of the string, returning
a Match object, or None if no match was found.
purge()
Clear the regular expression caches
search(pattern, string, flags=0)
Scan through string looking for a match to the pattern, returning
a Match object, or None if no match was found.
split(pattern, string, maxsplit=0, flags=0)
Split the source string by the occurrences of the pattern,
returning a list containing the resulting substrings. If
capturing parentheses are used in pattern, then the text of all
groups in the pattern are also returned as part of the resulting
list. If maxsplit is nonzero, at most maxsplit splits occur,
and the remainder of the string is returned as the final element
of the list.
sub(pattern, repl, string, count=0, flags=0)
Return the string obtained by replacing the leftmost
non-overlapping occurrences of the pattern in string by the
replacement repl. repl can be either a string or a callable;
if a string, backslash escapes in it are processed. If it is
a callable, it's passed the Match object and must return
a replacement string to be used.
subn(pattern, repl, string, count=0, flags=0)
Return a 2-tuple containing (new_string, number).
new_string is the string obtained by replacing the leftmost
non-overlapping occurrences of the pattern in the source
string by the replacement repl. number is the number of
substitutions that were made. repl can be either a string or a
callable; if a string, backslash escapes in it are processed.
If it is a callable, it's passed the Match object and must
return a replacement string to be used.
template(pattern, flags=0)
Compile a template pattern, returning a Pattern object, deprecated
DATA
A = re.ASCII
ASCII = re.ASCII
DOTALL = re.DOTALL
I = re.IGNORECASE
IGNORECASE = re.IGNORECASE
L = re.LOCALE
LOCALE = re.LOCALE
M = re.MULTILINE
MULTILINE = re.MULTILINE
NOFLAG = re.NOFLAG
S = re.DOTALL
U = re.UNICODE
UNICODE = re.UNICODE
VERBOSE = re.VERBOSE
X = re.VERBOSE
__all__ = ['match', 'fullmatch', 'search', 'sub', 'subn', 'split', 'fi...
VERSION
2.2.1
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\re\__init__.py
pyvibe.string_format_with_more
Python Library Documentation: function string_format_with_more in module pyvibe string_format_with_more(text: 'str', max_length: 'int') -> 'str'
pyvibe.uuid
Python Library Documentation: module uuid
NAME
uuid - UUID objects (universally unique identifiers) according to RFC 4122.
MODULE REFERENCE
https://docs.python.org/3.12/library/uuid.html
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
DESCRIPTION
This module provides immutable UUID objects (class UUID) and the functions
uuid1(), uuid3(), uuid4(), uuid5() for generating version 1, 3, 4, and 5
UUIDs as specified in RFC 4122.
If all you want is a unique ID, you should probably call uuid1() or uuid4().
Note that uuid1() may compromise privacy since it creates a UUID containing
the computer's network address. uuid4() creates a random UUID.
Typical usage:
>>> import uuid
# make a UUID based on the host ID and current time
>>> uuid.uuid1() # doctest: +SKIP
UUID('a8098c1a-f86e-11da-bd1a-00112444be1e')
# make a UUID using an MD5 hash of a namespace UUID and a name
>>> uuid.uuid3(uuid.NAMESPACE_DNS, 'python.org')
UUID('6fa459ea-ee8a-3ca4-894e-db77e160355e')
# make a random UUID
>>> uuid.uuid4() # doctest: +SKIP
UUID('16fd2706-8baf-433b-82eb-8c7fada847da')
# make a UUID using a SHA-1 hash of a namespace UUID and a name
>>> uuid.uuid5(uuid.NAMESPACE_DNS, 'python.org')
UUID('886313e1-3b8a-5372-9b90-0c9aee199e5d')
# make a UUID from a string of hex digits (braces and hyphens ignored)
>>> x = uuid.UUID('{00010203-0405-0607-0809-0a0b0c0d0e0f}')
# convert a UUID to a string of hex digits in standard form
>>> str(x)
'00010203-0405-0607-0809-0a0b0c0d0e0f'
# get the raw 16 bytes of the UUID
>>> x.bytes
b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f'
# make a UUID from a 16-byte string
>>> uuid.UUID(bytes=x.bytes)
UUID('00010203-0405-0607-0809-0a0b0c0d0e0f')
CLASSES
builtins.object
UUID
enum.Enum(builtins.object)
SafeUUID
class SafeUUID(enum.Enum)
| SafeUUID(*values)
|
| An enumeration.
|
| Method resolution order:
| SafeUUID
| enum.Enum
| builtins.object
|
| Data and other attributes defined here:
|
| safe = <SafeUUID.safe: 0>
|
| unknown = <SafeUUID.unknown: None>
|
| unsafe = <SafeUUID.unsafe: -1>
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
| The name of the Enum member.
|
| value
| The value of the Enum member.
|
| ----------------------------------------------------------------------
| Static methods inherited from enum.EnumType:
|
| __contains__(value)
| Return True if `value` is in `cls`.
|
| `value` is in `cls` if:
| 1) `value` is a member of `cls`, or
| 2) `value` is the value of one of the `cls`'s members.
|
| __getitem__(name)
| Return the member matching `name`.
|
| __iter__()
| Return members in definition order.
|
| __len__()
| Return the number of members (no aliases)
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
| Returns a mapping of member name->value.
|
| This mapping lists all enum members, including aliases. Note that this
| is a read-only view of the internal mapping.
class UUID(builtins.object)
| UUID(hex=None, bytes=None, bytes_le=None, fields=None, int=None, version=None, *, is_safe=<SafeUUID.unknown: None>)
|
| Instances of the UUID class represent UUIDs as specified in RFC 4122.
| UUID objects are immutable, hashable, and usable as dictionary keys.
| Converting a UUID to a string with str() yields something in the form
| '12345678-1234-1234-1234-123456789abc'. The UUID constructor accepts
| five possible forms: a similar string of hexadecimal digits, or a tuple
| of six integer fields (with 32-bit, 16-bit, 16-bit, 8-bit, 8-bit, and
| 48-bit values respectively) as an argument named 'fields', or a string
| of 16 bytes (with all the integer fields in big-endian order) as an
| argument named 'bytes', or a string of 16 bytes (with the first three
| fields in little-endian order) as an argument named 'bytes_le', or a
| single 128-bit integer as an argument named 'int'.
|
| UUIDs have these read-only attributes:
|
| bytes the UUID as a 16-byte string (containing the six
| integer fields in big-endian byte order)
|
| bytes_le the UUID as a 16-byte string (with time_low, time_mid,
| and time_hi_version in little-endian byte order)
|
| fields a tuple of the six integer fields of the UUID,
| which are also available as six individual attributes
| and two derived attributes:
|
| time_low the first 32 bits of the UUID
| time_mid the next 16 bits of the UUID
| time_hi_version the next 16 bits of the UUID
| clock_seq_hi_variant the next 8 bits of the UUID
| clock_seq_low the next 8 bits of the UUID
| node the last 48 bits of the UUID
|
| time the 60-bit timestamp
| clock_seq the 14-bit sequence number
|
| hex the UUID as a 32-character hexadecimal string
|
| int the UUID as a 128-bit integer
|
| urn the UUID as a URN as specified in RFC 4122
|
| variant the UUID variant (one of the constants RESERVED_NCS,
| RFC_4122, RESERVED_MICROSOFT, or RESERVED_FUTURE)
|
| version the UUID version number (1 through 5, meaningful only
| when the variant is RFC_4122)
|
| is_safe An enum indicating whether the UUID has been generated in
| a way that is safe for multiprocessing applications, via
| uuid_generate_time_safe(3).
|
| Methods defined here:
|
| __eq__(self, other)
| Return self==value.
|
| __ge__(self, other)
| Return self>=value.
|
| __getstate__(self)
| Helper for pickle.
|
| __gt__(self, other)
| Return self>value.
|
| __hash__(self)
| Return hash(self).
|
| __init__(self, hex=None, bytes=None, bytes_le=None, fields=None, int=None, version=None, *, is_safe=<SafeUUID.unknown: None>)
| Create a UUID from either a string of 32 hexadecimal digits,
| a string of 16 bytes as the 'bytes' argument, a string of 16 bytes
| in little-endian order as the 'bytes_le' argument, a tuple of six
| integers (32-bit time_low, 16-bit time_mid, 16-bit time_hi_version,
| 8-bit clock_seq_hi_variant, 8-bit clock_seq_low, 48-bit node) as
| the 'fields' argument, or a single 128-bit integer as the 'int'
| argument. When a string of hex digits is given, curly braces,
| hyphens, and a URN prefix are all optional. For example, these
| expressions all yield the same UUID:
|
| UUID('{12345678-1234-5678-1234-567812345678}')
| UUID('12345678123456781234567812345678')
| UUID('urn:uuid:12345678-1234-5678-1234-567812345678')
| UUID(bytes='\x12\x34\x56\x78'*4)
| UUID(bytes_le='\x78\x56\x34\x12\x34\x12\x78\x56' +
| '\x12\x34\x56\x78\x12\x34\x56\x78')
| UUID(fields=(0x12345678, 0x1234, 0x5678, 0x12, 0x34, 0x567812345678))
| UUID(int=0x12345678123456781234567812345678)
|
| Exactly one of 'hex', 'bytes', 'bytes_le', 'fields', or 'int' must
| be given. The 'version' argument is optional; if given, the resulting
| UUID will have its variant and version set according to RFC 4122,
| overriding the given 'hex', 'bytes', 'bytes_le', 'fields', or 'int'.
|
| is_safe is an enum exposed as an attribute on the instance. It
| indicates whether the UUID has been generated in a way that is safe
| for multiprocessing applications, via uuid_generate_time_safe(3).
|
| __int__(self)
|
| __le__(self, other)
| Return self<=value.
|
| __lt__(self, other)
| Return self<value.
|
| __repr__(self)
| Return repr(self).
|
| __setattr__(self, name, value)
| Implement setattr(self, name, value).
|
| __setstate__(self, state)
|
| __str__(self)
| Return str(self).
|
| ----------------------------------------------------------------------
| Readonly properties defined here:
|
| bytes
|
| bytes_le
|
| clock_seq
|
| clock_seq_hi_variant
|
| clock_seq_low
|
| fields
|
| hex
|
| node
|
| time
|
| time_hi_version
|
| time_low
|
| time_mid
|
| urn
|
| variant
|
| version
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object
|
| int
|
| is_safe
FUNCTIONS
getnode()
Get the hardware address as a 48-bit positive integer.
The first time this runs, it may launch a separate program, which could
be quite slow. If all attempts to obtain the hardware address fail, we
choose a random 48-bit number with its eighth bit set to 1 as recommended
in RFC 4122.
main()
Run the uuid command line interface.
uuid1(node=None, clock_seq=None)
Generate a UUID from a host ID, sequence number, and the current time.
If 'node' is not given, getnode() is used to obtain the hardware
address. If 'clock_seq' is given, it is used as the sequence number;
otherwise a random 14-bit sequence number is chosen.
uuid3(namespace, name)
Generate a UUID from the MD5 hash of a namespace UUID and a name.
uuid4()
Generate a random UUID.
uuid5(namespace, name)
Generate a UUID from the SHA-1 hash of a namespace UUID and a name.
DATA
NAMESPACE_DNS = UUID('6ba7b810-9dad-11d1-80b4-00c04fd430c8')
NAMESPACE_OID = UUID('6ba7b812-9dad-11d1-80b4-00c04fd430c8')
NAMESPACE_URL = UUID('6ba7b811-9dad-11d1-80b4-00c04fd430c8')
NAMESPACE_X500 = UUID('6ba7b814-9dad-11d1-80b4-00c04fd430c8')
RESERVED_FUTURE = 'reserved for future definition'
RESERVED_MICROSOFT = 'reserved for Microsoft compatibility'
RESERVED_NCS = 'reserved for NCS compatibility'
RFC_4122 = 'specified in RFC 4122'
AUTHOR
Ka-Ping Yee <ping@zesty.ca>
FILE
c:\users\youse\appdata\local\programs\python\python312\lib\uuid.py