pytailwindcss-extra
Use Tailwind CSS with daisyUI without Node.js and install it via pip.
An extension of pytailwindcss with tailwind-cli-extra to enable daisyUI support.
Why
Tailwind CSS is notoriously dependent on Node.js. If you're a Python developer, this dependency may not be welcome in your team, your Docker container, or your inner circle.
The Tailwind CSS team recently announced a new standalone CLI build that gives you the full power of Tailwind CLI in
a self-contained executable — no Node.js or npm required.
However, installing such a standalone CLI isn't as easy as running npm install, the installation command for Node.js.
So the user timonweb created the pytailwindcss
package, which allows you to install the standalone Tailwind CLI with a simple pip command.
While this package works well, there is one particular problem. Due to the binary nature of the Tailwind CLI, only the official Tailwind CSS plugins are included and other plugins, especially the very popular daisyUI plugin, cannot be installed (see Caveats).
Although the problem cannot be solved completely, daisyUI is very useful, not only for me, so the user dobicinaitis offers tailwind-cli-extra, a Tailwind CLI binary patched with daisyUI. Using this binary, pytailwindcss-extra extends pytailwindcss and provides the Tailwind CLI with the daisyUI plugin for the Python ecosystem.
Get started
-
Install
tailwindcss-extraviapipby executing the following command:pip install pytailwindcss-extra -
The
tailwindcss-extracommand should now be available in your terminal. Try to run it:tailwindcss-extraIf the installation was successful, you should see the message about binary being downloaded on the first run. When download is complete, you should see the help output for the
tailwindcss-extracommand. Use it to create a new project or work with an existing Tailwind CSS project. -
Let's create a new project. Go to the directory where you want to create your Tailwind CSS project and initialize it by creating an CSS file e.g.
input.css:@import "tailwindcss"; @plugin "daisyui";
-
Start a watcher by running:
tailwindcss-extra -i input.css -o output.css --watch -
Compile and minify your CSS for production by running:
tailwindcss-extra -i input.css -o output.css --minify
You got it. Please refer to official Tailwind documentation for more information on using Tailwind CSS and its CLI.
Caveats
It's not all roses, though. Giving up Node.js means you won't be able to install plugins or additional dependencies
for your Tailwind CSS setup. At the same time, that might not be a dealbreaker. You can still customize Tailwind CSS
via your CSS file. And the standalone build also comes with all official Tailwind CSS plugins
like @tailwindcss/aspect-ratio, @tailwindcss/forms, @tailwindcss/line-clamp, @tailwindcss/typography and of
course daisyUI. So in 90% of Tailwind CSS usage cases you should be covered, and the setup is so simplified now.
Here is what the Tailwind CSS team says about going the standalone Tailwind CSS route:
If you’re working on a project where you don’t otherwise need Node.js or
npm, the standalone build can be a great choice. If Tailwind was the only reason you had a package.json file, this is probably going to feel like a nicer solution.
Metadata
Release files for pytailwindcss-extra 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pytailwindcss_extra-0.2.1.tar.gz | 9.1 kB | Without provenance | Details for pytailwindcss_extra-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pytailwindcss_extra-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for pytailwindcss_extra-0.2.1-py3-none-any.whl |
Total release size: 18.2 kB
Release files / pytailwindcss_extra-0.2.1.tar.gz
| Download URL | pytailwindcss_extra-0.2.1.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7f497e9f6c62889fd7d09873333ca621efae33921a246b863db60d4bfb72fb80
|
|
BLAKE2b-256 checksum How to use checksums |
1162253bfd37c7a7ed0349a62ee4dd15b3a114a1d9edb1f52a2abf84d960f641
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / pytailwindcss_extra-0.2.1-py3-none-any.whl
| Download URL | pytailwindcss_extra-0.2.1-py3-none-any.whl |
|---|---|
| Size | 9.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
77a083d972e4bc607a3a38afd909255d607b70a67bfe72adbba481633c04fd16
|
|
BLAKE2b-256 checksum How to use checksums |
6a85ababeab33e61c2ebb60932b11e16dafe87da9974bf5ecaf23df097073aff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Security for pytailwindcss-extra 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.