Registry / devops / blue
library0.9.1pypypi✓ verified 84d ago

Blue is a Python code formatter that offers an alternative to Black. Version 0.9.1 is a beta release (pre-1.0). The project has infrequent updates.

pip install blue
INSTALL
IMPORT
SIG · BLUE
B
blue
devopspythonv0.9.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

blue
import blue
from blue import Blue
Blue is a module, not a class.

Formats a string of Python code using Blue's default style.

import blue code = "x = 1+2\n" formatted = blue.format_str(code) print(formatted)
Debug
Known issues
deprecatedBlue may be merged into a renamed project or become unmaintained. Check the repository for status.
fix
Consider using Black or Ruff as alternatives.
affects: *
gotchaBlue's formatting style may differ slightly from Black's. Your code may look different when switching between formatters.
fix
Pin your formatter version and use consistent formatting.
affects: *
gotchaBlue does not support configuration via pyproject.toml or other config files. It uses defaults only.
fix
Accept Blue's defaults or switch to a configurable formatter like Black.
affects: *
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'blue'
Blue is not installed.
fix
Run 'pip install blue'.
AttributeError: module 'blue' has no attribute 'format_str'
Using an outdated version or incorrect API.
fix
Ensure you have version 0.9.1 and use 'blue.format_str' as the main API.
Upgrade
Version history
0.9.1latest on PyPI · released Aug 1, 2022
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
8
Resources
blue — pip install blue · libregistry