hyss


Namehyss JSON
Version 2.0.0 PyPI version JSON
download
home_page
SummaryHigh impact style sheets, empowered by python
upload_time2023-01-14 16:33:35
maintainer
docs_urlNone
author
requires_python>=3.6
licenseMIT License Copyright (c) 2022 Charlie Paterson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords css hyss styles stylesheets animations web full stack
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Hyss - High Ympact Style Sheets

## Rationale

Define styles as python dicts! 
All of the power of python, realised to create stylesheets.
Coming soon to a package index near you!

## Features

- Create minified css content from a nested dictionary structure

- Helper for compound css classes (think 'div p', 'main section')  


## Potential Future Features

- Generate helpers for various css features. Already exist for animations.

- Build an indenter for output css; ease of debugging for users

- Means to convert 

## Usage Demonstrations

Here is a set of examples to illustrate the behaviour of functions within 
hyss

**stylesheet(styles: dict) -> str**

Takes a fractal dictionary structure and generates a minified css string as
shown

```python
from hyss import stylesheet

css = stylesheet(
        {
            'body': {
                'background-color': 'yellow',
            }, 
            'div': {
                'color': 'red'
            }
        }

print(css)

# This prints the following

# "body{background-color:yellow;}div{color:red;}"
```

**with_linebreaks(css: str) -> str**

Applies linebreaks to a minified css string, for debugging purposes as shown

```python

from hyss.format import with_linebreaks

minified_css = "body{background-color:yellow;}div{color:red;}"

linebreak_css = with_linebreaks(minified_css)

print(linebreaks_css)

# This prints "body{\nbackground-color:yellow;\n}\ndiv{\ncolor:red;\n}\n"

```

In a file, *linebreak_css* will look as follows

```css

body{
background-color:yellow;
}
div{
color:red;
}

```


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "hyss",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "css,hyss,styles,stylesheets,animations,web,full stack",
    "author": "",
    "author_email": "Charlie Paterson <Charlieed.paterson@googlemail.com>",
    "download_url": "https://files.pythonhosted.org/packages/d4/41/5f3fb20391ba973ff67dff8ec31c9c87facada1c2b77e930acc7b32d6aa7/hyss-2.0.0.tar.gz",
    "platform": null,
    "description": "# Hyss - High Ympact Style Sheets\n\n## Rationale\n\nDefine styles as python dicts! \nAll of the power of python, realised to create stylesheets.\nComing soon to a package index near you!\n\n## Features\n\n- Create minified css content from a nested dictionary structure\n\n- Helper for compound css classes (think 'div p', 'main section')  \n\n\n## Potential Future Features\n\n- Generate helpers for various css features. Already exist for animations.\n\n- Build an indenter for output css; ease of debugging for users\n\n- Means to convert \n\n## Usage Demonstrations\n\nHere is a set of examples to illustrate the behaviour of functions within \nhyss\n\n**stylesheet(styles: dict) -> str**\n\nTakes a fractal dictionary structure and generates a minified css string as\nshown\n\n```python\nfrom hyss import stylesheet\n\ncss = stylesheet(\n        {\n            'body': {\n                'background-color': 'yellow',\n            }, \n            'div': {\n                'color': 'red'\n            }\n        }\n\nprint(css)\n\n# This prints the following\n\n# \"body{background-color:yellow;}div{color:red;}\"\n```\n\n**with_linebreaks(css: str) -> str**\n\nApplies linebreaks to a minified css string, for debugging purposes as shown\n\n```python\n\nfrom hyss.format import with_linebreaks\n\nminified_css = \"body{background-color:yellow;}div{color:red;}\"\n\nlinebreak_css = with_linebreaks(minified_css)\n\nprint(linebreaks_css)\n\n# This prints \"body{\\nbackground-color:yellow;\\n}\\ndiv{\\ncolor:red;\\n}\\n\"\n\n```\n\nIn a file, *linebreak_css* will look as follows\n\n```css\n\nbody{\nbackground-color:yellow;\n}\ndiv{\ncolor:red;\n}\n\n```\n\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2022 Charlie Paterson  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "High impact style sheets, empowered by python",
    "version": "2.0.0",
    "split_keywords": [
        "css",
        "hyss",
        "styles",
        "stylesheets",
        "animations",
        "web",
        "full stack"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5f9d74f234424b6b4532f37a8f7291e80f2a9e4909d8ff904557fb4fb0cbb0d8",
                "md5": "802321bac9d0a938cdb9506a29b87055",
                "sha256": "ef94c92cd1cb21e34b0180df426106d64fcfe5c60d45bf8c125150278fa07c4f"
            },
            "downloads": -1,
            "filename": "hyss-2.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "802321bac9d0a938cdb9506a29b87055",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 4714,
            "upload_time": "2023-01-14T16:33:32",
            "upload_time_iso_8601": "2023-01-14T16:33:32.962191Z",
            "url": "https://files.pythonhosted.org/packages/5f/9d/74f234424b6b4532f37a8f7291e80f2a9e4909d8ff904557fb4fb0cbb0d8/hyss-2.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d4415f3fb20391ba973ff67dff8ec31c9c87facada1c2b77e930acc7b32d6aa7",
                "md5": "ac2517b4ce61edb481c09d1c2b0d1607",
                "sha256": "9491ba38af3b35f109c9c1e1330ca5d39541a521a7e14ffaa13eb6e7b05316ea"
            },
            "downloads": -1,
            "filename": "hyss-2.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "ac2517b4ce61edb481c09d1c2b0d1607",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 3834,
            "upload_time": "2023-01-14T16:33:35",
            "upload_time_iso_8601": "2023-01-14T16:33:35.033486Z",
            "url": "https://files.pythonhosted.org/packages/d4/41/5f3fb20391ba973ff67dff8ec31c9c87facada1c2b77e930acc7b32d6aa7/hyss-2.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-14 16:33:35",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "hyss"
}
        
Elapsed time: 0.02847s