Skip to main content

Converts CSS to JSON format

Project description

# CSSJSON :rocket:

A Python scripts that converts css to json. I usually use this when I do web scrapping and I need to scrape something from css using classnames or ids.

# Installation

## GitHub

$ git clone
$ cd cssjson
$ python install

## PyPI

$ pip install cssjson

# Usage


from cssjson import toJSON, toCSS

json = toJSON("example.css", path=True)
css = toCSS(json)


# Methods

## toJSON (text, path, url)

Converts css to json and can either be a text, file or url.

### Text


### Path

print(toJSON("example.css", path=True)

### Url

print(toJSON("", url=True)

## toCSS (dict)

Converts json serialized css to css.


# Contribution

You can contribute by sending a PR.

# Author

Oyetoke Toby (

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

cssjson-1.0.0.tar.gz (3.7 kB view hashes)

Uploaded source

Built Distributions

cssjson-1.0.0-py3-none-any.whl (3.8 kB view hashes)

Uploaded py3

cssjson-1.0.0-py2.7.egg (4.1 kB view hashes)

Uploaded 2 7

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page