semvec/pypi-packages huggingface dataset:
svg-writer 0.5
Write SVG files with Python.
Requires Python: >=3.4

# svg_writer 

The most straightforward way to create SVG files with Python.

## Three functions only:

    from svg_writer import new_svg_root, write_svg, write_png_from_svg

### new_svg_root
    x: float,
    y: float,
    width: float,
    height: float,
    pad: float = 0
    -> etree.Element

Create an svg root element from viewBox style arguments and provide the necessary svg-specific attributes. This is your window onto the scene. The arguments are the same you'd use to create a `rect` element (plus `pad`):
* `x`: x value in upper-left corner
* `y`: y value in upper-left corner
* `width`: width of viewBox
* `height`: height of viewBox
* `pad`: The one small convenience I've provided. Optionally increase viewBox by `pad` in all directions.


### write_svg
    filename: str,
    xml: etree.Element,
    stylesheet: Optional[str] = None,
    do_link_css: bool = True,
    -> None:

Write an xml element as an svg file. This will link or inline your css code and insert the necessary declaration, doctype, and processing instructions.

* `filename`: path to output file (include extension .svg)
* `param xml`: root node of your svg geometry (created by `new_svg_root`)
* `stylesheet`: optional path to a css stylesheet
* `do_link_css`: link to stylesheet, else write contents of stylesheet into svg (ignored if `stylesheet` is None)

### write_png_from_svg

    inkscape_exe: PathType,
    svg: str
    -> Path

Convert an svg file to a png. Python does not have a library for this. That has an upside, as any library would be one more set of svg implementation idiosyncrasies we'd have to deal with. Inkscape will convert the file. This function provides the necessary command-line arguments.

* `inkscape_exe`: path to inkscape.exe
* `svg`: path to svg file
* `return`: png filename

[Full Documentation and Tutorial](https://shayallenhill.com/svg-with-css-in-python/)
setuptools-git-ver 1.0.4
Automatically set package version using git tag/hash
Requires Python: >=3.7
Keywords: setuptools git version-control

# setuptools-git-ver

[![PyPI version](https://badge.fury.io/py/setuptools-git-ver.svg)](https://badge.fury.io/py/setuptools-git-ver)
[![Build Status](https://travis-ci.org/camas/setuptools-git-ver.svg?branch=master)](https://travis-ci.org/camas/setuptools-git-ver)

Automatically set package version using git tag/hash

## Install

Install using pip

## Usage

To just use the default templates for versioning:

```python
setuptools.setup(
    ...
    version_config=True,
    ...
    setup_requires=['setuptools-git-ver'],
    ...
)
```

Changing templates (also shows the defaults):

```python
setuptools.setup(
    ...
    version_config={
        "template": "{tag}",
        "dev_template": "{tag}.dev{ccount}+git.{sha}"
        "dirty_template": "{tag}.dev{ccount}+git.{sha}.dirty"
    },
    ...
    setup_requires=['setuptools-git-ver'],
    ...
)
```

### Templates

- `template`: used if no untracked files and latest commit is tagged

- `dev_template`: used if no untracked files and latest commit isn't tagged

- `dirty_template`: used if untracked files exist or uncommitted changes have been made

### Format Options

- `{tag}`: Latest tag in the repository

- `{ccount}`: Number of commits since last tag

- `{sha}`: First 8 characters of the sha hash of the latest commit
clicolor 1.0.7
Quick python reference for terminal color escape codes
Requires Python: >=3.7

# clicolor

[![PyPI version](https://badge.fury.io/py/clicolor.svg)](https://badge.fury.io/py/clicolor)
[![Build Status](https://travis-ci.org/camas/clicolor.svg?branch=master)](https://travis-ci.org/camas/clicolor)

Quick python reference for terminal color escape codes

## Usage

Install options:

- Install the package `clicolor`

- Add as a submodule

```python
git submodule add https://github.com/camas/clicolor
```

- Or just copy `cli.py` and `LICENSE` somewhere

Then `from clicolor.cli import CLI, ...`

## Examples

```python
print(f"{CLI.BG_YELLOW}{CLI.GREEN}Green on yellow.{CLI.RESET}")
```

![Green text on yellow background example](https://raw.githubusercontent.com/camas/clicolor/master/examples/green_on_yellow.png)

```python
print(f"{CLI.BOLD}{CLI.RED}Bold red.{CLI.RESET}")
```

![Bold red text example](https://raw.githubusercontent.com/camas/clicolor/master/examples/bold_red.png)

```python
print(f"{CLIT.bg(128,0,0)}{CLIT.fg(255,99,71)}Truecolor tomato red on maroon red background{CLI.RESET}")
```

![Truecolor red example](https://raw.githubusercontent.com/camas/clicolor/master/examples/truecolor_red.png)

## test.py

use test.py to run a variety of tests including modifiers, 8/16 colors, 256 colors and Truecolors.