Skip to main content

CSS-Generator

What is this?

css-generator is a tool to work with css stylesheet with python. It allow you to take a an existing css stylesheet and parse it to have a css object that can be modified or to create a css file in a python script.

Install

To install CSS-Generator, run the following command:

pip install css-generator

Usage

After install, to use CSS-Generator to create a new css file, use the following code:

.. code-block:: python

from css_generator import StyleSheet
from css_generator import Rule

stylesheet = StyleSheet()

container = Rule(
    rule_selector='container',
    rule_type='class',
    properties={
        'position': 'relative',
        'width': '100 %'
    }
)

stylesheet.add_rule(container)

stylesheet.css(path='style.css')

If you want to load an existing stylesheet use:

.. code-block:: python

from css_generator import parser

style = parser.from_file(path='style.css')

Metadata

Release files for css-generator 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for css-generator 0.1.1
File Size Uploaded Provenance Actions
css-generator-0.1.1.tar.gz 2.7 kB Without provenance Details for css-generator-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for css-generator 0.1.1
File Interpreter ABI Platform Actions
css_generator-0.1.1-py3-none-any.whl Python 3 none any Details for css_generator-0.1.1-py3-none-any.whl

Total release size: 6.9 kB

Release files / css-generator-0.1.1.tar.gz

Download URL css-generator-0.1.1.tar.gz
Size 2.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d87f1744f20e35035f4458b66004ee07aa115d8c100c721910a0c116c62918aa
BLAKE2b-256 checksum
How to use checksums
431db3d0dc603ea3a2b52d13bdf41100b8346a5eacb3874612ff0d45a7ddffe3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.7.9

Release files / css_generator-0.1.1-py3-none-any.whl

Download URL css_generator-0.1.1-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
af2b3eb2ab450cef78d2919f78fdaeec7f8a313cc4bcbf1e30cff6a4cacaf17c
BLAKE2b-256 checksum
How to use checksums
7d251255091dc37c9e7dee26c1a699a1a9366727d9a8c25b82ad1142904b76cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.7.9

Security for css-generator 0.1.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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page