pyhtmlify


Namepyhtmlify JSON
Version 0.1.6 PyPI version JSON
download
home_pagehttps://github.com/Peggun/pyhtml
SummaryHTML in Pure Python
upload_time2024-08-24 13:31:25
maintainerNone
docs_urlNone
authorPeggun
requires_python>=3.6
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pyhtmlify

pyhtmlify is a Python package that allows you to write HTML code with Pure Python. This package was mainly made for the [osd Project](https://github.com/Peggun/osd) for simplicity. Heres how to do it. This package isn't completely finished, as we are still adding heaps of stuff and more HTML tags to this project.

## 1. Installation
You can install pyhtml using pip
```py
pip install pyhtmlify
```
This will install the latest version of pyhtmlify.

## 2. How to use
pyhtmlify is quite easy to use. It is similar to html, but without all of the <> and other things involved. To do so, make a python file starting with html- and pyhtml will pick it up.

For pyhtml to pick up the file to generate the html code for you, you need to have a index function inside of your script. Like this for example:
```py
import pyhtmlify.HTMLTags.tags as ph

def index():
    return ph.div(
        ph.h1("Welcome to My Website"),
        ph.input(type="text", placeholder="Enter your name"),
    )
```

That is all you need for the script side. Now onto the html conversion

## 3. PY to HTML Conversion
To convert python index functions into html documents, pyhtml comes with a pyhtml command to use. In the terminal, to generate html code for all the html- files, run 
```py
pyhtmlify generate -f folder
```
The -f flag specifies the output folder, and there are some other flags and commands that are coming up. 
However, you you dont use the -f flag, the program automatically defaults to /html. All file names of the html files are the same name as the python script.

## 4. Contribution
If you would like to contribute to this project, please check out the issues and contact me at peggundev@gmail.com, or come check out osd and join the discord community!

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Peggun/pyhtml",
    "name": "pyhtmlify",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": "Peggun",
    "author_email": "peggundev@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/73/6d/ab5a69c2d7cdda761ec3ccbdc85c4ec084db8e932a6e192426e39b9f28d2/pyhtmlify-0.1.6.tar.gz",
    "platform": null,
    "description": "# pyhtmlify\r\n\r\npyhtmlify is a Python package that allows you to write HTML code with Pure Python. This package was mainly made for the [osd Project](https://github.com/Peggun/osd) for simplicity. Heres how to do it. This package isn't completely finished, as we are still adding heaps of stuff and more HTML tags to this project.\r\n\r\n## 1. Installation\r\nYou can install pyhtml using pip\r\n```py\r\npip install pyhtmlify\r\n```\r\nThis will install the latest version of pyhtmlify.\r\n\r\n## 2. How to use\r\npyhtmlify is quite easy to use. It is similar to html, but without all of the <> and other things involved. To do so, make a python file starting with html- and pyhtml will pick it up.\r\n\r\nFor pyhtml to pick up the file to generate the html code for you, you need to have a index function inside of your script. Like this for example:\r\n```py\r\nimport pyhtmlify.HTMLTags.tags as ph\r\n\r\ndef index():\r\n    return ph.div(\r\n        ph.h1(\"Welcome to My Website\"),\r\n        ph.input(type=\"text\", placeholder=\"Enter your name\"),\r\n    )\r\n```\r\n\r\nThat is all you need for the script side. Now onto the html conversion\r\n\r\n## 3. PY to HTML Conversion\r\nTo convert python index functions into html documents, pyhtml comes with a pyhtml command to use. In the terminal, to generate html code for all the html- files, run \r\n```py\r\npyhtmlify generate -f folder\r\n```\r\nThe -f flag specifies the output folder, and there are some other flags and commands that are coming up. \r\nHowever, you you dont use the -f flag, the program automatically defaults to /html. All file names of the html files are the same name as the python script.\r\n\r\n## 4. Contribution\r\nIf you would like to contribute to this project, please check out the issues and contact me at peggundev@gmail.com, or come check out osd and join the discord community!\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "HTML in Pure Python",
    "version": "0.1.6",
    "project_urls": {
        "Homepage": "https://github.com/Peggun/pyhtml"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "18b96d406f9a75a7b0e6354a7d34cc3316cd98f14af9bd83c70be2b044132df9",
                "md5": "deecc13e9679d54d7f871df45a4d8807",
                "sha256": "2e65cfcaf64464ea1bfecb22e15c35de936313f88319edb2981ff10cbd87b163"
            },
            "downloads": -1,
            "filename": "pyhtmlify-0.1.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "deecc13e9679d54d7f871df45a4d8807",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 18408,
            "upload_time": "2024-08-24T13:31:23",
            "upload_time_iso_8601": "2024-08-24T13:31:23.470329Z",
            "url": "https://files.pythonhosted.org/packages/18/b9/6d406f9a75a7b0e6354a7d34cc3316cd98f14af9bd83c70be2b044132df9/pyhtmlify-0.1.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "736dab5a69c2d7cdda761ec3ccbdc85c4ec084db8e932a6e192426e39b9f28d2",
                "md5": "0c380c517fa832c215fab34d6b869a0a",
                "sha256": "2b08cd6bf515a2098df6487419126b1b1dab8d66bcdff4f41f8be2da87edea94"
            },
            "downloads": -1,
            "filename": "pyhtmlify-0.1.6.tar.gz",
            "has_sig": false,
            "md5_digest": "0c380c517fa832c215fab34d6b869a0a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 18982,
            "upload_time": "2024-08-24T13:31:25",
            "upload_time_iso_8601": "2024-08-24T13:31:25.307865Z",
            "url": "https://files.pythonhosted.org/packages/73/6d/ab5a69c2d7cdda761ec3ccbdc85c4ec084db8e932a6e192426e39b9f28d2/pyhtmlify-0.1.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-24 13:31:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Peggun",
    "github_project": "pyhtml",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "pyhtmlify"
}
        
Elapsed time: 0.30178s