Pastel is a simple Python library (current version 0.2.1) designed to bring colors to your terminal output. It provides an easy way to colorize strings using a simple tag-based syntax and comes with predefined styles like 'info' (green), 'comment' (yellow), 'question' (black on cyan), and 'error' (white on red). The library's last release was in September 2020, indicating a low release cadence and maintenance-focused status.
pip install pastelVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to import the `pastel` library, apply predefined and custom styles to strings, and how to programmatically enable or disable color output.
For new projects, consider alternative, more actively maintained terminal coloring libraries. For existing projects, be aware of potential unaddressed issues or lack of compatibility with future Python versions.
Ensure your project runs on Python 3.5+ (which is also supported by Pastel) to align with current Python development standards.
Verify the correct PyPI package name (`pastel`) and the import statement (`import pastel`) to ensure you are using the intended library. Always check the project's GitHub URL for confirmation if unsure.
Install the library using pip: `pip install pastel`
Ensure the library is imported correctly and the function is called as `pastel.colorize()`: `import pastel; print(pastel.colorize('<info>Your text</info>'))`Provide a string as an argument to the `colorize` function: `import pastel; print(pastel.colorize('<info>This is some text</info>'))`No dependency data recorded yet.