# Path: yaspin/api.py
# def yaspin(*args, **kwargs):
#     """Display spinner in stdout.
# 
#     Can be used as a context manager or as a function decorator.
# 
#     Arguments:
#         spinner (base_spinner.Spinner, optional): Spinner object to use.
#         text (str, optional): Text to show along with spinner.
#         color (str, optional): Spinner color.
#         on_color (str, optional): Color highlight for the spinner.
#         attrs (list, optional): Color attributes for the spinner.
#         reversal (bool, optional): Reverse spin direction.
#         side (str, optional): Place spinner to the right or left end
#             of the text string.
#         sigmap (dict, optional): Maps POSIX signals to their respective
#             handlers.
#         timer (bool, optional): Prints a timer showing the elapsed time.
# 
#     Returns:
#         core.Yaspin: instance of the Yaspin class.
# 
#     Raises:
#         ValueError: If unsupported ``color`` is specified.
#         ValueError: If unsupported ``on_color`` is specified.
#         ValueError: If unsupported color attribute in ``attrs``
#             is specified.
#         ValueError: If trying to register handler for SIGKILL signal.
#         ValueError: If unsupported ``side`` is specified.
# 
#     Available text colors:
#         red, green, yellow, blue, magenta, cyan, white.
# 
#     Available text highlights:
#         on_red, on_green, on_yellow, on_blue, on_magenta, on_cyan,
#         on_white, on_grey.
# 
#     Available attributes:
#         bold, dark, underline, blink, reverse, concealed.
# 
#     Example::
# 
#         # Use as a context manager
#         with yaspin():
#             some_operations()
# 
#         # Context manager with text
#         with yaspin(text="Processing..."):
#             some_operations()
# 
#         # Context manager with custom sequence
#         with yaspin(Spinner('-\\|/', 150)):
#             some_operations()
# 
#         # As decorator
#         @yaspin(text="Loading...")
#         def foo():
#             time.sleep(5)
# 
#         foo()
# 
#     """
#     return Yaspin(*args, **kwargs)


import sys
import time
from yaspin import yaspin
    from prompt_toolkit import HTML, print_formatted_text
    from prompt_toolkit.styles import Style
Starting from yaspin v1.1.0 handled by ``hidden`` context manager.

Requires python-prompt-tooklit >= 2.0.1
https://github.com/jonathanslenders/python-prompt-toolkit/

.. code:: bash
    pip install "prompt_toolkit>=2.0.1"
"""




try:
except ImportError:
    print(
        "This example requires python-prompt-tooklit >= 2.0.1:\n"
        "https://github.com/jonathanslenders/python-prompt-toolkit/\n"
        "\nTo install it, run:\n"
        'pip install "prompt_toolkit>=2.0.1"'
    )
    sys.exit(1)


# override print with feature-rich ``print_formatted_text`` from prompt_toolkit
print = print_formatted_text

# build a basic prompt_toolkit style for styling the HTML wrapped text
style = Style.from_dict({"msg": "#4caf50 bold", "sub-msg": "#616161 italic"})



# Path: yaspin/api.py
# def yaspin(*args, **kwargs):
#     """Display spinner in stdout.
# 
#     Can be used as a context manager or as a function decorator.
# 
#     Arguments:
#         spinner (base_spinner.Spinner, optional): Spinner object to use.
#         text (str, optional): Text to show along with spinner.
#         color (str, optional): Spinner color.
#         on_color (str, optional): Color highlight for the spinner.
#         attrs (list, optional): Color attributes for the spinner.
#         reversal (bool, optional): Reverse spin direction.
#         side (str, optional): Place spinner to the right or left end
#             of the text string.
#         sigmap (dict, optional): Maps POSIX signals to their respective
#             handlers.
#         timer (bool, optional): Prints a timer showing the elapsed time.
# 
#     Returns:
#         core.Yaspin: instance of the Yaspin class.
# 
#     Raises:
#         ValueError: If unsupported ``color`` is specified.
#         ValueError: If unsupported ``on_color`` is specified.
#         ValueError: If unsupported color attribute in ``attrs``
#             is specified.
#         ValueError: If trying to register handler for SIGKILL signal.
#         ValueError: If unsupported ``side`` is specified.
# 
#     Available text colors:
#         red, green, yellow, blue, magenta, cyan, white.
# 
#     Available text highlights:
#         on_red, on_green, on_yellow, on_blue, on_magenta, on_cyan,
#         on_white, on_grey.
# 
#     Available attributes:
#         bold, dark, underline, blink, reverse, concealed.
# 
#     Example::
# 
#         # Use as a context manager
#         with yaspin():
#             some_operations()
# 
#         # Context manager with text
#         with yaspin(text="Processing..."):
#             some_operations()
# 
#         # Context manager with custom sequence
#         with yaspin(Spinner('-\\|/', 150)):
#             some_operations()
# 
#         # As decorator
#         @yaspin(text="Loading...")
#         def foo():
#             time.sleep(5)
# 
#         foo()
# 
#     """
#     return Yaspin(*args, **kwargs)


# Path: examples/hide_show_prompt_toolkit.py
import sys
import time
from yaspin import yaspin
    from prompt_toolkit import HTML, print_formatted_text
    from prompt_toolkit.styles import Style

Starting from yaspin v1.1.0 handled by ``hidden`` context manager.

Requires python-prompt-tooklit >= 2.0.1
https://github.com/jonathanslenders/python-prompt-toolkit/

.. code:: bash
    pip install "prompt_toolkit>=2.0.1"
"""




try:
except ImportError:
    print(
        "This example requires python-prompt-tooklit >= 2.0.1:\n"
        "https://github.com/jonathanslenders/python-prompt-toolkit/\n"
        "\nTo install it, run:\n"
        'pip install "prompt_toolkit>=2.0.1"'
    )
    sys.exit(1)


# override print with feature-rich ``print_formatted_text`` from prompt_toolkit
print = print_formatted_text

# build a basic prompt_toolkit style for styling the HTML wrapped text
style = Style.from_dict({"msg": "#4caf50 bold", "sub-msg": "#616161 italic"})



with yaspin(text="Downloading images") as sp: