dict2css


Namedict2css JSON
Version 0.3.0 PyPI version JSON
download
home_pagehttps://github.com/sphinx-toolbox/dict2css
SummaryA μ-library for constructing cascading style sheets from Python dictionaries.
upload_time2022-02-27 16:25:04
maintainer
docs_urlNone
author
requires_python>=3.6
licenseMIT
keywords css serialize
VCS
bugtrack_url
requirements cssutils domdf-python-tools
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
#########
dict2css
#########

.. start short_desc

**A μ-library for constructing cascading style sheets from Python dictionaries.**

.. end short_desc


.. start shields

.. list-table::
	:stub-columns: 1
	:widths: 10 90

	* - Docs
	  - |docs| |docs_check|
	* - Tests
	  - |actions_linux| |actions_windows| |actions_macos| |coveralls|
	* - PyPI
	  - |pypi-version| |supported-versions| |supported-implementations| |wheel|
	* - Anaconda
	  - |conda-version| |conda-platform|
	* - Activity
	  - |commits-latest| |commits-since| |maintained| |pypi-downloads|
	* - QA
	  - |codefactor| |actions_flake8| |actions_mypy|
	* - Other
	  - |license| |language| |requires|

.. |docs| image:: https://img.shields.io/readthedocs/dict2css/latest?logo=read-the-docs
	:target: https://dict2css.readthedocs.io/en/latest
	:alt: Documentation Build Status

.. |docs_check| image:: https://github.com/sphinx-toolbox/dict2css/workflows/Docs%20Check/badge.svg
	:target: https://github.com/sphinx-toolbox/dict2css/actions?query=workflow%3A%22Docs+Check%22
	:alt: Docs Check Status

.. |actions_linux| image:: https://github.com/sphinx-toolbox/dict2css/workflows/Linux/badge.svg
	:target: https://github.com/sphinx-toolbox/dict2css/actions?query=workflow%3A%22Linux%22
	:alt: Linux Test Status

.. |actions_windows| image:: https://github.com/sphinx-toolbox/dict2css/workflows/Windows/badge.svg
	:target: https://github.com/sphinx-toolbox/dict2css/actions?query=workflow%3A%22Windows%22
	:alt: Windows Test Status

.. |actions_macos| image:: https://github.com/sphinx-toolbox/dict2css/workflows/macOS/badge.svg
	:target: https://github.com/sphinx-toolbox/dict2css/actions?query=workflow%3A%22macOS%22
	:alt: macOS Test Status

.. |actions_flake8| image:: https://github.com/sphinx-toolbox/dict2css/workflows/Flake8/badge.svg
	:target: https://github.com/sphinx-toolbox/dict2css/actions?query=workflow%3A%22Flake8%22
	:alt: Flake8 Status

.. |actions_mypy| image:: https://github.com/sphinx-toolbox/dict2css/workflows/mypy/badge.svg
	:target: https://github.com/sphinx-toolbox/dict2css/actions?query=workflow%3A%22mypy%22
	:alt: mypy status

.. |requires| image:: https://dependency-dash.herokuapp.com/github/sphinx-toolbox/dict2css/badge.svg
	:target: https://dependency-dash.herokuapp.com/github/sphinx-toolbox/dict2css/
	:alt: Requirements Status

.. |coveralls| image:: https://img.shields.io/coveralls/github/sphinx-toolbox/dict2css/master?logo=coveralls
	:target: https://coveralls.io/github/sphinx-toolbox/dict2css?branch=master
	:alt: Coverage

.. |codefactor| image:: https://img.shields.io/codefactor/grade/github/sphinx-toolbox/dict2css?logo=codefactor
	:target: https://www.codefactor.io/repository/github/sphinx-toolbox/dict2css
	:alt: CodeFactor Grade

.. |pypi-version| image:: https://img.shields.io/pypi/v/dict2css
	:target: https://pypi.org/project/dict2css/
	:alt: PyPI - Package Version

.. |supported-versions| image:: https://img.shields.io/pypi/pyversions/dict2css?logo=python&logoColor=white
	:target: https://pypi.org/project/dict2css/
	:alt: PyPI - Supported Python Versions

.. |supported-implementations| image:: https://img.shields.io/pypi/implementation/dict2css
	:target: https://pypi.org/project/dict2css/
	:alt: PyPI - Supported Implementations

.. |wheel| image:: https://img.shields.io/pypi/wheel/dict2css
	:target: https://pypi.org/project/dict2css/
	:alt: PyPI - Wheel

.. |conda-version| image:: https://img.shields.io/conda/v/domdfcoding/dict2css?logo=anaconda
	:target: https://anaconda.org/domdfcoding/dict2css
	:alt: Conda - Package Version

.. |conda-platform| image:: https://img.shields.io/conda/pn/domdfcoding/dict2css?label=conda%7Cplatform
	:target: https://anaconda.org/domdfcoding/dict2css
	:alt: Conda - Platform

.. |license| image:: https://img.shields.io/github/license/sphinx-toolbox/dict2css
	:target: https://github.com/sphinx-toolbox/dict2css/blob/master/LICENSE
	:alt: License

.. |language| image:: https://img.shields.io/github/languages/top/sphinx-toolbox/dict2css
	:alt: GitHub top language

.. |commits-since| image:: https://img.shields.io/github/commits-since/sphinx-toolbox/dict2css/v0.3.0
	:target: https://github.com/sphinx-toolbox/dict2css/pulse
	:alt: GitHub commits since tagged version

.. |commits-latest| image:: https://img.shields.io/github/last-commit/sphinx-toolbox/dict2css
	:target: https://github.com/sphinx-toolbox/dict2css/commit/master
	:alt: GitHub last commit

.. |maintained| image:: https://img.shields.io/maintenance/yes/2022
	:alt: Maintenance

.. |pypi-downloads| image:: https://img.shields.io/pypi/dm/dict2css
	:target: https://pypi.org/project/dict2css/
	:alt: PyPI - Downloads

.. end shields

``dict2css`` provides an API similar to the json_ and
toml_ modules, with ``dump`` and ``load`` functions.
The ``dump`` function takes a mapping of `CSS selectors`_
to mappings of CSS properties.
Each property value may, optionally, be a two-element tuple containing the value and the string "important".
The ``load`` function returns a mapping with the same structure.

For more information see `the documentation`_.

.. _json: https://docs.python.org/3/library/json.html
.. _toml: https://github.com/uiri/toml/
.. _CSS selectors: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors
.. _the documentation: https://dict2css.readthedocs.io/en/latest/

Installation
--------------

.. start installation

``dict2css`` can be installed from PyPI or Anaconda.

To install with ``pip``:

.. code-block:: bash

	$ python -m pip install dict2css

To install with ``conda``:

	* First add the required channels

	.. code-block:: bash

		$ conda config --add channels https://conda.anaconda.org/conda-forge
		$ conda config --add channels https://conda.anaconda.org/domdfcoding

	* Then install

	.. code-block:: bash

		$ conda install dict2css

.. end installation

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/sphinx-toolbox/dict2css",
    "name": "dict2css",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "css,serialize",
    "author": "",
    "author_email": "Dominic Davis-Foster <dominic@davis-foster.co.uk>",
    "download_url": "https://files.pythonhosted.org/packages/b3/88/5133a536aff82cadce1e532b19f39574fedfdb6affc5baade4b9d45cf70f/dict2css-0.3.0.tar.gz",
    "platform": "Windows",
    "description": "\n#########\ndict2css\n#########\n\n.. start short_desc\n\n**A \u03bc-library for constructing cascading style sheets from Python dictionaries.**\n\n.. end short_desc\n\n\n.. start shields\n\n.. list-table::\n\t:stub-columns: 1\n\t:widths: 10 90\n\n\t* - Docs\n\t  - |docs| |docs_check|\n\t* - Tests\n\t  - |actions_linux| |actions_windows| |actions_macos| |coveralls|\n\t* - PyPI\n\t  - |pypi-version| |supported-versions| |supported-implementations| |wheel|\n\t* - Anaconda\n\t  - |conda-version| |conda-platform|\n\t* - Activity\n\t  - |commits-latest| |commits-since| |maintained| |pypi-downloads|\n\t* - QA\n\t  - |codefactor| |actions_flake8| |actions_mypy|\n\t* - Other\n\t  - |license| |language| |requires|\n\n.. |docs| image:: https://img.shields.io/readthedocs/dict2css/latest?logo=read-the-docs\n\t:target: https://dict2css.readthedocs.io/en/latest\n\t:alt: Documentation Build Status\n\n.. |docs_check| image:: https://github.com/sphinx-toolbox/dict2css/workflows/Docs%20Check/badge.svg\n\t:target: https://github.com/sphinx-toolbox/dict2css/actions?query=workflow%3A%22Docs+Check%22\n\t:alt: Docs Check Status\n\n.. |actions_linux| image:: https://github.com/sphinx-toolbox/dict2css/workflows/Linux/badge.svg\n\t:target: https://github.com/sphinx-toolbox/dict2css/actions?query=workflow%3A%22Linux%22\n\t:alt: Linux Test Status\n\n.. |actions_windows| image:: https://github.com/sphinx-toolbox/dict2css/workflows/Windows/badge.svg\n\t:target: https://github.com/sphinx-toolbox/dict2css/actions?query=workflow%3A%22Windows%22\n\t:alt: Windows Test Status\n\n.. |actions_macos| image:: https://github.com/sphinx-toolbox/dict2css/workflows/macOS/badge.svg\n\t:target: https://github.com/sphinx-toolbox/dict2css/actions?query=workflow%3A%22macOS%22\n\t:alt: macOS Test Status\n\n.. |actions_flake8| image:: https://github.com/sphinx-toolbox/dict2css/workflows/Flake8/badge.svg\n\t:target: https://github.com/sphinx-toolbox/dict2css/actions?query=workflow%3A%22Flake8%22\n\t:alt: Flake8 Status\n\n.. |actions_mypy| image:: https://github.com/sphinx-toolbox/dict2css/workflows/mypy/badge.svg\n\t:target: https://github.com/sphinx-toolbox/dict2css/actions?query=workflow%3A%22mypy%22\n\t:alt: mypy status\n\n.. |requires| image:: https://dependency-dash.herokuapp.com/github/sphinx-toolbox/dict2css/badge.svg\n\t:target: https://dependency-dash.herokuapp.com/github/sphinx-toolbox/dict2css/\n\t:alt: Requirements Status\n\n.. |coveralls| image:: https://img.shields.io/coveralls/github/sphinx-toolbox/dict2css/master?logo=coveralls\n\t:target: https://coveralls.io/github/sphinx-toolbox/dict2css?branch=master\n\t:alt: Coverage\n\n.. |codefactor| image:: https://img.shields.io/codefactor/grade/github/sphinx-toolbox/dict2css?logo=codefactor\n\t:target: https://www.codefactor.io/repository/github/sphinx-toolbox/dict2css\n\t:alt: CodeFactor Grade\n\n.. |pypi-version| image:: https://img.shields.io/pypi/v/dict2css\n\t:target: https://pypi.org/project/dict2css/\n\t:alt: PyPI - Package Version\n\n.. |supported-versions| image:: https://img.shields.io/pypi/pyversions/dict2css?logo=python&logoColor=white\n\t:target: https://pypi.org/project/dict2css/\n\t:alt: PyPI - Supported Python Versions\n\n.. |supported-implementations| image:: https://img.shields.io/pypi/implementation/dict2css\n\t:target: https://pypi.org/project/dict2css/\n\t:alt: PyPI - Supported Implementations\n\n.. |wheel| image:: https://img.shields.io/pypi/wheel/dict2css\n\t:target: https://pypi.org/project/dict2css/\n\t:alt: PyPI - Wheel\n\n.. |conda-version| image:: https://img.shields.io/conda/v/domdfcoding/dict2css?logo=anaconda\n\t:target: https://anaconda.org/domdfcoding/dict2css\n\t:alt: Conda - Package Version\n\n.. |conda-platform| image:: https://img.shields.io/conda/pn/domdfcoding/dict2css?label=conda%7Cplatform\n\t:target: https://anaconda.org/domdfcoding/dict2css\n\t:alt: Conda - Platform\n\n.. |license| image:: https://img.shields.io/github/license/sphinx-toolbox/dict2css\n\t:target: https://github.com/sphinx-toolbox/dict2css/blob/master/LICENSE\n\t:alt: License\n\n.. |language| image:: https://img.shields.io/github/languages/top/sphinx-toolbox/dict2css\n\t:alt: GitHub top language\n\n.. |commits-since| image:: https://img.shields.io/github/commits-since/sphinx-toolbox/dict2css/v0.3.0\n\t:target: https://github.com/sphinx-toolbox/dict2css/pulse\n\t:alt: GitHub commits since tagged version\n\n.. |commits-latest| image:: https://img.shields.io/github/last-commit/sphinx-toolbox/dict2css\n\t:target: https://github.com/sphinx-toolbox/dict2css/commit/master\n\t:alt: GitHub last commit\n\n.. |maintained| image:: https://img.shields.io/maintenance/yes/2022\n\t:alt: Maintenance\n\n.. |pypi-downloads| image:: https://img.shields.io/pypi/dm/dict2css\n\t:target: https://pypi.org/project/dict2css/\n\t:alt: PyPI - Downloads\n\n.. end shields\n\n``dict2css`` provides an API similar to the json_ and\ntoml_ modules, with ``dump`` and ``load`` functions.\nThe ``dump`` function takes a mapping of `CSS selectors`_\nto mappings of CSS properties.\nEach property value may, optionally, be a two-element tuple containing the value and the string \"important\".\nThe ``load`` function returns a mapping with the same structure.\n\nFor more information see `the documentation`_.\n\n.. _json: https://docs.python.org/3/library/json.html\n.. _toml: https://github.com/uiri/toml/\n.. _CSS selectors: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors\n.. _the documentation: https://dict2css.readthedocs.io/en/latest/\n\nInstallation\n--------------\n\n.. start installation\n\n``dict2css`` can be installed from PyPI or Anaconda.\n\nTo install with ``pip``:\n\n.. code-block:: bash\n\n\t$ python -m pip install dict2css\n\nTo install with ``conda``:\n\n\t* First add the required channels\n\n\t.. code-block:: bash\n\n\t\t$ conda config --add channels https://conda.anaconda.org/conda-forge\n\t\t$ conda config --add channels https://conda.anaconda.org/domdfcoding\n\n\t* Then install\n\n\t.. code-block:: bash\n\n\t\t$ conda install dict2css\n\n.. end installation\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A \u03bc-library for constructing cascading style sheets from Python dictionaries.",
    "version": "0.3.0",
    "split_keywords": [
        "css",
        "serialize"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "9b72bd12f2a49b0f1553318aae61b2bf",
                "sha256": "ef934ce73a225fdd5f811b484fe9e2dd768f7ef14a89fc8f4eb5672597131d00"
            },
            "downloads": -1,
            "filename": "dict2css-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9b72bd12f2a49b0f1553318aae61b2bf",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 25688,
            "upload_time": "2022-02-27T16:25:03",
            "upload_time_iso_8601": "2022-02-27T16:25:03.214607Z",
            "url": "https://files.pythonhosted.org/packages/ff/1c/5c108f07fc0818bef046fd1d6cdd84ba081833d59b1adbc3a112a0f741cd/dict2css-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "d3cf473eadc740b0b0fece325639e98f",
                "sha256": "1e8b1bf580dca2083198f88a60ec88c878a8829d760dfe45483ef80fe2905117"
            },
            "downloads": -1,
            "filename": "dict2css-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "d3cf473eadc740b0b0fece325639e98f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 7836,
            "upload_time": "2022-02-27T16:25:04",
            "upload_time_iso_8601": "2022-02-27T16:25:04.664694Z",
            "url": "https://files.pythonhosted.org/packages/b3/88/5133a536aff82cadce1e532b19f39574fedfdb6affc5baade4b9d45cf70f/dict2css-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-02-27 16:25:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "sphinx-toolbox",
    "github_project": "dict2css",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "cssutils",
            "specs": [
                [
                    ">=",
                    "2.2.0"
                ]
            ]
        },
        {
            "name": "domdf-python-tools",
            "specs": [
                [
                    ">=",
                    "2.2.0"
                ]
            ]
        }
    ],
    "tox": true,
    "lcname": "dict2css"
}
        
Elapsed time: 0.03289s