gradio-url-buttons


Namegradio-url-buttons JSON
Version 0.0.2 PyPI version JSON
download
home_page
SummaryGradio custom compnent for adding URL buttons
upload_time2024-02-21 07:08:38
maintainer
docs_urlNone
author
requires_python>=3.8
license
keywords gradio-custom-component gradio-template-fallback
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# `gradio_url_buttons`
<a href="https://pypi.org/project/gradio_url_buttons/" target="_blank"><img alt="PyPI - Version" src="https://img.shields.io/pypi/v/gradio_url_buttons"></a>  

Gradio custom compnent for adding URL buttons

## Installation

```bash
pip install gradio_url_buttons
```

## Usage

```python

import gradio as gr
from gradio_url_buttons import source_buttons

def add_source():
    return [{"link": "https://www.github.com", "hostname": "Github.com"}, {"link": "https://www.hkk.de", "hostname": "HKK.de"}]

with gr.Blocks() as demo:
    gr.Markdown("# Change the value (keep it JSON) and the front-end will update automatically.")
    source_buttons(value=[])
    buttons = source_buttons()
    click = gr.Button("Click me")
    source_buttons(value=[{"link": "https://www.google.com", "hostname": "Google.com"}, {"link": "https://www.hkk.de", "hostname": "HKK.de"}])

    click.click(add_source, inputs=[], outputs=[buttons])


if __name__ == "__main__":
    demo.launch()

```

## `source_buttons`

### Initialization

<table>
<thead>
<tr>
<th align="left">name</th>
<th align="left" style="width: 25%;">type</th>
<th align="left">default</th>
<th align="left">description</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left"><code>value</code></td>
<td align="left" style="width: 25%;">

```python
Any
```

</td>
<td align="left"><code>None</code></td>
<td align="left">None</td>
</tr>

<tr>
<td align="left"><code>label</code></td>
<td align="left" style="width: 25%;">

```python
str | None
```

</td>
<td align="left"><code>None</code></td>
<td align="left">None</td>
</tr>

<tr>
<td align="left"><code>info</code></td>
<td align="left" style="width: 25%;">

```python
str | None
```

</td>
<td align="left"><code>None</code></td>
<td align="left">None</td>
</tr>

<tr>
<td align="left"><code>show_label</code></td>
<td align="left" style="width: 25%;">

```python
bool | None
```

</td>
<td align="left"><code>None</code></td>
<td align="left">None</td>
</tr>

<tr>
<td align="left"><code>container</code></td>
<td align="left" style="width: 25%;">

```python
bool
```

</td>
<td align="left"><code>True</code></td>
<td align="left">None</td>
</tr>

<tr>
<td align="left"><code>scale</code></td>
<td align="left" style="width: 25%;">

```python
int | None
```

</td>
<td align="left"><code>None</code></td>
<td align="left">None</td>
</tr>

<tr>
<td align="left"><code>min_width</code></td>
<td align="left" style="width: 25%;">

```python
int | None
```

</td>
<td align="left"><code>None</code></td>
<td align="left">None</td>
</tr>

<tr>
<td align="left"><code>interactive</code></td>
<td align="left" style="width: 25%;">

```python
bool | None
```

</td>
<td align="left"><code>None</code></td>
<td align="left">None</td>
</tr>

<tr>
<td align="left"><code>visible</code></td>
<td align="left" style="width: 25%;">

```python
bool
```

</td>
<td align="left"><code>True</code></td>
<td align="left">None</td>
</tr>

<tr>
<td align="left"><code>elem_id</code></td>
<td align="left" style="width: 25%;">

```python
str | None
```

</td>
<td align="left"><code>None</code></td>
<td align="left">None</td>
</tr>

<tr>
<td align="left"><code>elem_classes</code></td>
<td align="left" style="width: 25%;">

```python
list[str] | str | None
```

</td>
<td align="left"><code>None</code></td>
<td align="left">None</td>
</tr>

<tr>
<td align="left"><code>render</code></td>
<td align="left" style="width: 25%;">

```python
bool
```

</td>
<td align="left"><code>True</code></td>
<td align="left">None</td>
</tr>

<tr>
<td align="left"><code>load_fn</code></td>
<td align="left" style="width: 25%;">

```python
Callable | None
```

</td>
<td align="left"><code>None</code></td>
<td align="left">None</td>
</tr>

<tr>
<td align="left"><code>every</code></td>
<td align="left" style="width: 25%;">

```python
float | None
```

</td>
<td align="left"><code>None</code></td>
<td align="left">None</td>
</tr>
</tbody></table>





            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "gradio-url-buttons",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "gradio-custom-component,gradio-template-Fallback",
    "author": "",
    "author_email": "YOUR NAME <YOUREMAIL@domain.com>",
    "download_url": "https://files.pythonhosted.org/packages/e0/b2/080e13a93179d2dc12b0ac3a695ba4c2fd6a0d39095bc192c36e177cac92/gradio_url_buttons-0.0.2.tar.gz",
    "platform": null,
    "description": "\n# `gradio_url_buttons`\n<a href=\"https://pypi.org/project/gradio_url_buttons/\" target=\"_blank\"><img alt=\"PyPI - Version\" src=\"https://img.shields.io/pypi/v/gradio_url_buttons\"></a>  \n\nGradio custom compnent for adding URL buttons\n\n## Installation\n\n```bash\npip install gradio_url_buttons\n```\n\n## Usage\n\n```python\n\nimport gradio as gr\nfrom gradio_url_buttons import source_buttons\n\ndef add_source():\n    return [{\"link\": \"https://www.github.com\", \"hostname\": \"Github.com\"}, {\"link\": \"https://www.hkk.de\", \"hostname\": \"HKK.de\"}]\n\nwith gr.Blocks() as demo:\n    gr.Markdown(\"# Change the value (keep it JSON) and the front-end will update automatically.\")\n    source_buttons(value=[])\n    buttons = source_buttons()\n    click = gr.Button(\"Click me\")\n    source_buttons(value=[{\"link\": \"https://www.google.com\", \"hostname\": \"Google.com\"}, {\"link\": \"https://www.hkk.de\", \"hostname\": \"HKK.de\"}])\n\n    click.click(add_source, inputs=[], outputs=[buttons])\n\n\nif __name__ == \"__main__\":\n    demo.launch()\n\n```\n\n## `source_buttons`\n\n### Initialization\n\n<table>\n<thead>\n<tr>\n<th align=\"left\">name</th>\n<th align=\"left\" style=\"width: 25%;\">type</th>\n<th align=\"left\">default</th>\n<th align=\"left\">description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td align=\"left\"><code>value</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nAny\n```\n\n</td>\n<td align=\"left\"><code>None</code></td>\n<td align=\"left\">None</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>label</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nstr | None\n```\n\n</td>\n<td align=\"left\"><code>None</code></td>\n<td align=\"left\">None</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>info</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nstr | None\n```\n\n</td>\n<td align=\"left\"><code>None</code></td>\n<td align=\"left\">None</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>show_label</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nbool | None\n```\n\n</td>\n<td align=\"left\"><code>None</code></td>\n<td align=\"left\">None</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>container</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nbool\n```\n\n</td>\n<td align=\"left\"><code>True</code></td>\n<td align=\"left\">None</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>scale</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nint | None\n```\n\n</td>\n<td align=\"left\"><code>None</code></td>\n<td align=\"left\">None</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>min_width</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nint | None\n```\n\n</td>\n<td align=\"left\"><code>None</code></td>\n<td align=\"left\">None</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>interactive</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nbool | None\n```\n\n</td>\n<td align=\"left\"><code>None</code></td>\n<td align=\"left\">None</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>visible</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nbool\n```\n\n</td>\n<td align=\"left\"><code>True</code></td>\n<td align=\"left\">None</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>elem_id</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nstr | None\n```\n\n</td>\n<td align=\"left\"><code>None</code></td>\n<td align=\"left\">None</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>elem_classes</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nlist[str] | str | None\n```\n\n</td>\n<td align=\"left\"><code>None</code></td>\n<td align=\"left\">None</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>render</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nbool\n```\n\n</td>\n<td align=\"left\"><code>True</code></td>\n<td align=\"left\">None</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>load_fn</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nCallable | None\n```\n\n</td>\n<td align=\"left\"><code>None</code></td>\n<td align=\"left\">None</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>every</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nfloat | None\n```\n\n</td>\n<td align=\"left\"><code>None</code></td>\n<td align=\"left\">None</td>\n</tr>\n</tbody></table>\n\n\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Gradio custom compnent for adding URL buttons",
    "version": "0.0.2",
    "project_urls": null,
    "split_keywords": [
        "gradio-custom-component",
        "gradio-template-fallback"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8e9b39d93bcf3379ba976bc0464b7979b073c49e60019d6be0f8e1a089128db8",
                "md5": "6df8513cb37b2995482b4d5da6d2eb44",
                "sha256": "3c77b86a4c2e1a58911b2adf1f73646595975cd3130cfcf78cbc82e27b9bb4f8"
            },
            "downloads": -1,
            "filename": "gradio_url_buttons-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6df8513cb37b2995482b4d5da6d2eb44",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 22284,
            "upload_time": "2024-02-21T07:08:36",
            "upload_time_iso_8601": "2024-02-21T07:08:36.740012Z",
            "url": "https://files.pythonhosted.org/packages/8e/9b/39d93bcf3379ba976bc0464b7979b073c49e60019d6be0f8e1a089128db8/gradio_url_buttons-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e0b2080e13a93179d2dc12b0ac3a695ba4c2fd6a0d39095bc192c36e177cac92",
                "md5": "c93a93c43fe8f87a73bcc75105d9157b",
                "sha256": "fefe961be60dc20eb67f70941c1601f506aea2b24e5009e8558b5ca7c8251e9d"
            },
            "downloads": -1,
            "filename": "gradio_url_buttons-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "c93a93c43fe8f87a73bcc75105d9157b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 51083,
            "upload_time": "2024-02-21T07:08:38",
            "upload_time_iso_8601": "2024-02-21T07:08:38.640884Z",
            "url": "https://files.pythonhosted.org/packages/e0/b2/080e13a93179d2dc12b0ac3a695ba4c2fd6a0d39095bc192c36e177cac92/gradio_url_buttons-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-21 07:08:38",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "gradio-url-buttons"
}
        
Elapsed time: 2.87613s