Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: make vl-convert binaries available with python library install #151

Open
janrito opened this issue Feb 19, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@janrito
Copy link

janrito commented Feb 19, 2024

It would be really nice if we could install the python library and have the vl-convert utilities available without having to have cargo and rust installed

@jonmmease jonmmease added the enhancement New feature or request label Feb 19, 2024
@jonmmease
Copy link
Collaborator

Thanks for the suggestion @janrito. Yeah, we could add Python CLI interface to the vl-convert-python package, copying the API of native CLI.

Just in case it wasn't obvious, we do include the CLI binaries as GitHub release artifacts (https://github.com/vega/vl-convert/releases/tag/v1.2.3)

@janrito
Copy link
Author

janrito commented Feb 19, 2024

@jonmmease
Copy link
Collaborator

I don't think we'd want to double the size of the package by including a separate binary build of the CLI version of vl-convert. But I think we could include a Python CLI interface (e.g. using click) that would provide the same functionality as the binary vl-convert CLI.

@janrito
Copy link
Author

janrito commented Feb 19, 2024

This is what I'm doing in the meantime:

#!/bin/sh
set -x -e
# file: vl2png.sh
# Reads a vega-lite spec from stdin and writes a PNG to stdout
# It is equivalent to:
# vl-convert vl2png

python -c "import sys; import vl_convert; sys.stdout.buffer.write(vl_convert.vegalite_to_png(sys.stdin.read()))"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants