Extends HoloViz Panel with functionality to copy to and paste from the clipboard
Project description
✨ panel-copy-paste
Extends HoloViz Panel with copy-paste functionality.
Copy-paste to and from your data apps as well as external applications like Excel.
Features
CopyButton: Enables you to copy Python objects to the clipboard.PasteButton: Enables you to paste strings from the clipboard.PasteToDataFrameButton: Enables you to paste strings from the clipboard into dataframe values.
Pin your version!
This project is in its early stages, so if you find a version that suits your needs, it’s recommended to pin your version, as updates may introduce changes.
Installation
Install it via pip:
pip install panel-copy-paste
Usage
To use the CopyButton:
import panel as pn
from panel_copy_paste import CopyButton
pn.extension("codeeditor")
editor = pn.widgets.CodeEditor()
button = CopyButton(value="Hello World")
pn.Column(button, editor).servable()
To use the PasteButton:
import panel as pn
from panel_copy_paste import PasteButton
pn.extension("codeeditor")
editor = pn.widgets.CodeEditor()
button = PasteButton(target=editor)
pn.Column(button, editor).servable()
To use the PasteToDataFrameButton:
import panel as pn
from panel_copy_paste import PasteToDataFrameButton
pn.extension("tabulator")
table = pn.widgets.Tabulator()
button = PasteToDataFrameButton(target=table)
pn.Column(button, table).servable()
For more examples check out the documentation.
Development
git clone https://github.com/awesome-panel/panel-copy-paste
cd panel-copy-paste
For a simple setup use uv:
uv venv
source .venv/bin/activate # on linux. Similar commands for windows and osx
uv pip install -e .[dev]
pre-commit run install
pytest tests
For the full setup used by Github Actions use pixi:
pixi run pre-commit-install
pixi run postinstall
pixi run test
This repository is based on copier-template-panel-extension. To update to the latest template version run:
pixi exec --spec copier --spec ruamel.yaml -- copier update --defaults --trust
Note: copier will show Conflict for files with manual changes during an update. This is normal. As long as there are no merge conflict markers, all patches applied cleanly.
❤️ Contributing
Contributions are welcome! Please follow these steps to contribute:
- Fork the repository.
- Create a new branch:
git checkout -b feature/YourFeature. - Make your changes and commit them:
git commit -m 'Add some feature'. - Push to the branch:
git push origin feature/YourFeature. - Open a pull request.
Please ensure your code adheres to the project's coding standards and passes all tests.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file panel_copy_paste-0.0.4.tar.gz.
File metadata
- Download URL: panel_copy_paste-0.0.4.tar.gz
- Upload date:
- Size: 813.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e19f342b79a1316582142bc502531ea6018faeb5d967fb39ccb78d5a7d825b76
|
|
| MD5 |
327bddff07ed3245797856af71c34f3f
|
|
| BLAKE2b-256 |
e274db9bb3612ddac58481520b1af0214dcf1a3332a733f766fc5bf603cb7f84
|
Provenance
The following attestation bundles were made for panel_copy_paste-0.0.4.tar.gz:
Publisher:
build.yml on awesome-panel/panel-copy-paste
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
panel_copy_paste-0.0.4.tar.gz -
Subject digest:
e19f342b79a1316582142bc502531ea6018faeb5d967fb39ccb78d5a7d825b76 - Sigstore transparency entry: 151274456
- Sigstore integration time:
-
Permalink:
awesome-panel/panel-copy-paste@3b42f7a48fb25b2435124e86bbf8cfe3e5eedd66 -
Branch / Tag:
refs/tags/v0.0.4 - Owner: https://github.com/awesome-panel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@3b42f7a48fb25b2435124e86bbf8cfe3e5eedd66 -
Trigger Event:
push
-
Statement type:
File details
Details for the file panel_copy_paste-0.0.4-py3-none-any.whl.
File metadata
- Download URL: panel_copy_paste-0.0.4-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32c3a295d34726d212d3d6fe476c5c75a89695ea400d5e28473da99d8adaab3a
|
|
| MD5 |
4eaa659b47ba86ac4d1dc56bb7d63841
|
|
| BLAKE2b-256 |
b48db66967864e15122dd191e23b4cb9d0821f820ebdd4fedc18878be9343c0e
|
Provenance
The following attestation bundles were made for panel_copy_paste-0.0.4-py3-none-any.whl:
Publisher:
build.yml on awesome-panel/panel-copy-paste
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
panel_copy_paste-0.0.4-py3-none-any.whl -
Subject digest:
32c3a295d34726d212d3d6fe476c5c75a89695ea400d5e28473da99d8adaab3a - Sigstore transparency entry: 151274457
- Sigstore integration time:
-
Permalink:
awesome-panel/panel-copy-paste@3b42f7a48fb25b2435124e86bbf8cfe3e5eedd66 -
Branch / Tag:
refs/tags/v0.0.4 - Owner: https://github.com/awesome-panel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@3b42f7a48fb25b2435124e86bbf8cfe3e5eedd66 -
Trigger Event:
push
-
Statement type: