🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

tailwind-processor

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tailwind-processor

Tailwind CSS classes processor

2.0.1
PyPI
Maintainers
1

Tailwind Processor

codecov

This is a Python package that processes Tailwind CSS classes into a single raw CSS string. It's super modular and simple, you can just copy the class directly and use it in your code. Just make sure to install pytailwindcss first.

It uses GO style error handling.

Installation

pip install tailwind-processor

Usage

from tailwind_processor import TailwindProcessor

tp = TailwindProcessor()

result, err = tp.process(["text-red-500", "h-dvh"])
if err:
    # Or do another thing
    raise err

file_content = textwrap.dedent("""
    <div class="text-red-500 h-dvh">
        Hey!
    </div>
""")

result, err = tp.process_file_str(file_content)

if err:
    # Or do another thing
    raise err

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts