> For the complete documentation index, see [llms.txt](https://appsecurity.gitbook.io/devops/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://appsecurity.gitbook.io/devops/ppc/ppc-langs/backend/python/packages/obrabotka-informacii/beatifiers.md).

# Beatifiers

## JSON

\
`1. JSON`\
`echo '{"test":"a"}' | python3 -m json.tool`\
`или`\
`python3 -m json.tool in_json.txt out_json.txt`

## JS

```
pip install jsbeautifier
js-beautify -h
js-beautify -o out.js in.js

или код:
import jsbeautifier
data = 'import blabla;'
data = jsbeautifier.beautify(data)
```

## XML/HTML

```python
from bs4 import BeautifulSoup

bs = BeautifulSoup(data, 'xml')  # 'html.parser'
data = bs.prettify()
```
