tikz-python


Nametikz-python JSON
Version 0.0.2 PyPI version JSON
download
home_page
SummaryA python wrapper for tikz
upload_time2023-09-09 22:54:40
maintainer
docs_urlNone
author
requires_python>=3.7
license
keywords
VCS
bugtrack_url
requirements black click iniconfig mypy-extensions numpy packaging pathspec platformdirs pluggy pytest ruff
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Tikz-Python
An object-oriented Python approach towards providing a giant wrapper for Tikz code, with the goal of streamlining the process of creating complex figures for TeX documents.

To install it, run 
```
pip install tikz-python
```

## Documentation

We have documentation now! Please visit the [documentation](https://ltrujello.github.io/Tikz-Python) site.

## How to Use: Basics
An example of this package in action is below. 
```python
from tikzpy import TikzPicture  # Import the class TikzPicture

tikz = TikzPicture()
tikz.circle((0, 0), 3, options="thin, fill=orange!15")

arc_one = tikz.arc((3, 0), 0, 180, x_radius=3, y_radius=1.5, options="dashed")
arc_two = tikz.arc((-3, 0), 180, 360, x_radius=3, y_radius=1.5)

tikz.show()  # Displays a pdf of the drawing to the user
```
which produces
<img src="https://github.com/ltrujello/Tikz-Python/blob/main/docs/png/basic.png?raw=true"/> 

We explain line-by-line the above code.

* `from tikzpy import TikzPicture` imports the `TikzPicture` class from the `tikzpy` package. 

* The second line of code is analogous to the TeX code `\begin{tikzpicture}` and `\end{tikzpicture}`. The variable `tikz` is now a tikz environment, specifically an instance of the class `TikzPicture`, and we can now append drawings to it.

* The third, fourth, and fifth lines draw a filled circle and two elliptic arcs, which give the illusion of a sphere.

* In the last line, the call `show()` immediately displays the PDF of the drawing to the user.


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "tikz-python",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "",
    "author": "",
    "author_email": "Luke Trujillo <ltrujillo@hmc.edu>",
    "download_url": "https://files.pythonhosted.org/packages/8d/68/6cc6b1bac016ac9f500cccab9307ea81298fd5c2a2f5667cb0cc349fb15e/tikz_python-0.0.2.tar.gz",
    "platform": null,
    "description": "# Tikz-Python\nAn object-oriented Python approach towards providing a giant wrapper for Tikz code, with the goal of streamlining the process of creating complex figures for TeX documents.\n\nTo install it, run \n```\npip install tikz-python\n```\n\n## Documentation\n\nWe have documentation now! Please visit the [documentation](https://ltrujello.github.io/Tikz-Python) site.\n\n## How to Use: Basics\nAn example of this package in action is below. \n```python\nfrom tikzpy import TikzPicture  # Import the class TikzPicture\n\ntikz = TikzPicture()\ntikz.circle((0, 0), 3, options=\"thin, fill=orange!15\")\n\narc_one = tikz.arc((3, 0), 0, 180, x_radius=3, y_radius=1.5, options=\"dashed\")\narc_two = tikz.arc((-3, 0), 180, 360, x_radius=3, y_radius=1.5)\n\ntikz.show()  # Displays a pdf of the drawing to the user\n```\nwhich produces\n<img src=\"https://github.com/ltrujello/Tikz-Python/blob/main/docs/png/basic.png?raw=true\"/> \n\nWe explain line-by-line the above code.\n\n* `from tikzpy import TikzPicture` imports the `TikzPicture` class from the `tikzpy` package. \n\n* The second line of code is analogous to the TeX code `\\begin{tikzpicture}` and `\\end{tikzpicture}`. The variable `tikz` is now a tikz environment, specifically an instance of the class `TikzPicture`, and we can now append drawings to it.\n\n* The third, fourth, and fifth lines draw a filled circle and two elliptic arcs, which give the illusion of a sphere.\n\n* In the last line, the call `show()` immediately displays the PDF of the drawing to the user.\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A python wrapper for tikz",
    "version": "0.0.2",
    "project_urls": {
        "Documentation": "https://ltrujello.github.io/Tikz-Python/",
        "Homepage": "https://github.com/ltrujello/Tikz-Python/"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e13a7beb32c31c1775faae0a378ea3e764afe177dd814b28bccae14943313a0f",
                "md5": "fb2b465bebe58eacc48c208fc8dea28c",
                "sha256": "0a52b28fc37689a11b83c060cdac529d87a40679d70966ca262b9615d3c02c3b"
            },
            "downloads": -1,
            "filename": "tikz_python-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fb2b465bebe58eacc48c208fc8dea28c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 25551,
            "upload_time": "2023-09-09T22:54:39",
            "upload_time_iso_8601": "2023-09-09T22:54:39.324978Z",
            "url": "https://files.pythonhosted.org/packages/e1/3a/7beb32c31c1775faae0a378ea3e764afe177dd814b28bccae14943313a0f/tikz_python-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8d686cc6b1bac016ac9f500cccab9307ea81298fd5c2a2f5667cb0cc349fb15e",
                "md5": "2336eaba06915c925298475b64d9074b",
                "sha256": "3b740dae4e1df6b1823b741b60ef9eb45f38775954592bacb5c645519d2df52d"
            },
            "downloads": -1,
            "filename": "tikz_python-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "2336eaba06915c925298475b64d9074b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 21314,
            "upload_time": "2023-09-09T22:54:40",
            "upload_time_iso_8601": "2023-09-09T22:54:40.943536Z",
            "url": "https://files.pythonhosted.org/packages/8d/68/6cc6b1bac016ac9f500cccab9307ea81298fd5c2a2f5667cb0cc349fb15e/tikz_python-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-09 22:54:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ltrujello",
    "github_project": "Tikz-Python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "black",
            "specs": [
                [
                    "==",
                    "23.7.0"
                ]
            ]
        },
        {
            "name": "click",
            "specs": [
                [
                    "==",
                    "8.1.6"
                ]
            ]
        },
        {
            "name": "iniconfig",
            "specs": [
                [
                    "==",
                    "2.0.0"
                ]
            ]
        },
        {
            "name": "mypy-extensions",
            "specs": [
                [
                    "==",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "numpy",
            "specs": [
                [
                    "==",
                    "1.25.1"
                ]
            ]
        },
        {
            "name": "packaging",
            "specs": [
                [
                    "==",
                    "23.1"
                ]
            ]
        },
        {
            "name": "pathspec",
            "specs": [
                [
                    "==",
                    "0.11.1"
                ]
            ]
        },
        {
            "name": "platformdirs",
            "specs": [
                [
                    "==",
                    "3.9.1"
                ]
            ]
        },
        {
            "name": "pluggy",
            "specs": [
                [
                    "==",
                    "1.2.0"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": [
                [
                    "==",
                    "7.4.0"
                ]
            ]
        },
        {
            "name": "ruff",
            "specs": [
                [
                    "==",
                    "0.0.280"
                ]
            ]
        }
    ],
    "lcname": "tikz-python"
}
        
Elapsed time: 0.20529s