Skip to main content

A Python-native utility-first CSS generator and compiler.

Project description

TailPySCSS Logo

TailPySCSS v0.5.0: The Frontend Engine

Analysis & Tests PyPI - Version Python Version License

"Build Modern UI in Python. No Node.js. No npm. No Webpack."

TailPySCSS is a Python-Native CSS Engine. It gives you the power of utility classes (like Tailwind) and the structure of components (like Bootstrap) without the nightmare of a Node.js build pipeline.

It compiles SCSS to CSS directly in Python. It scans your Python code for usage. It treeshakes unused styles by default.


🔥 Creating UI in Python (New in v0.5.0)

Forget writing HTML classes manually. Use the new Python Component Library:

from tailpyscss.ui import Card, Button, Input, Switch

def view():
    return Card(
        Input(placeholder="Enter email"),
        Switch(label="Enable Notifications"),
        Button("Save Changes", variant="primary")
    )

What happens?

  1. The Scanner detects you used Card, Input, and Switch.
  2. The Engine compiles only the CSS needed for those 3 components.
  3. The Output is a tiny, optimized CSS file (~9 KB for small apps).

🚀 Features

1. Zero Node.js Dependency

Stop fighting package.json, node_modules, and webpack.config.js. TailPySCSS is 100% Python.

  • Install: pip install tailpyscss
  • Run: tailpyscss build

2. The Context Engine (Tree Shaking)

We don't include 500KB of unused CSS. If you don't use the Table component in your Python code, its CSS is not generated.

  • Base Size: ~9 KB (Utilities only)
  • Full Suite: ~19 KB (All 30+ components)

3. The Component Library (30+ Elements)

Batteries included. Neon-ready. Glassmorphism-ready.

  • Essentials: Button, Card, Badge, Alert, Navbar, Hero.
  • Forms: Input, Select, Checkbox, Radio, Switch, File.
  • Overlay: Modal, Toast, Tooltip, Popover.
  • Navigation: Tabs, Sidebar, Pagination, Breadcrumb.

4. The Vibe Engine (Dynamic Theming)

Change your entire app's feel with one config line.

# tailpy_config.py
config = {
    "vibe": "neon"  # Options: 'flat', 'glass', 'neon'
}

⚡ Quick Start

1. Install

pip install tailpyscss

2. Initialize

tailpyscss init

Creates tailpy_config.py and styles/ folder.

3. Build & Watch

# Watch for changes (0.1s response time)
tailpyscss watch

🛠️ Configuration

Configure colors, spacing, and vibes in pure Python:

# tailpy_config.py
config = {
    "colors": {
        "primary": "#3b82f6",  # Blue
        "secondary": "#ec4899" # Pink
    },
    "vibe": "glass"
}

📚 Comparisons

Feature TailPySCSS (v2) Tailwind JIT Bootstrap 5
Tech Stack Python (Pip) Node.js (Npm) SASS
Setup Time 1 Minute 10-20 Minutes 5 Minutes
Dependencies 0 100+ (Node modules) 0 (if CDN)
Output Size ~9 KB - 19 KB ~3 KB - 10 KB ~200 KB + JS
Tree Shaking Yes (Component) Yes (Class) Manual Only

📄 License

MIT License. 100% Open Source. Created by Abdi Abdikarim.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tailpyscss-0.5.2.tar.gz (22.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tailpyscss-0.5.2-py3-none-any.whl (25.0 kB view details)

Uploaded Python 3

File details

Details for the file tailpyscss-0.5.2.tar.gz.

File metadata

  • Download URL: tailpyscss-0.5.2.tar.gz
  • Upload date:
  • Size: 22.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tailpyscss-0.5.2.tar.gz
Algorithm Hash digest
SHA256 9924765fca0b4b948e5387e56979ba827dba0f86151826885ad072ac7e35d231
MD5 5acc6ad1eb5032cdbe99b4ee468d5c43
BLAKE2b-256 b9b3d6696e63551236b0907209be12fca3448d235c37cbc42f9d8b4c22726c30

See more details on using hashes here.

Provenance

The following attestation bundles were made for tailpyscss-0.5.2.tar.gz:

Publisher: publish.yml on tailpyscss2/tailpyscss-framework

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tailpyscss-0.5.2-py3-none-any.whl.

File metadata

  • Download URL: tailpyscss-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 25.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tailpyscss-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 930d4d6ea52d77350f201a9649155d6ecdab44a2b1bb19c51de469d36f2f5590
MD5 f095866c628d6c25eb29fe9b02a10d83
BLAKE2b-256 4c5d6b7cadd039d5aedac1302a3862e7db42006ba2c66d7c1b6cbf94c5d2fe0e

See more details on using hashes here.

Provenance

The following attestation bundles were made for tailpyscss-0.5.2-py3-none-any.whl:

Publisher: publish.yml on tailpyscss2/tailpyscss-framework

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page