No project description provided
Project description
vl-convert-python
This crate uses PyO3 to wrap the vl-convert-rs
crate as a Python library.
Installation
vl-convert-python
can be installed using pip with
$ pip install vl-convert-python
Usage
From Python, import the vl_convert
package, create a VlConverter
object, and use the converter to convert a Vega-Lite specification string to a Vega specification string.
from vl_convert import VlConverter
converter = VlConverter()
vl_spec = r"""
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {"url": "data/movies.json"},
"mark": "circle",
"encoding": {
"x": {
"bin": {"maxbins": 10},
"field": "IMDB Rating"
},
"y": {
"bin": {"maxbins": 10},
"field": "Rotten Tomatoes Rating"
},
"size": {"aggregate": "count"}
}
}
"""
vg_spec = converter.vegalite_to_vega(vl_spec=vl_spec, vl_version="5.5", pretty=True)
print(vg_spec)
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"background": "white",
"padding": 5,
"width": 200,
"height": 200,
"style": "cell",
...
}
Python development setup
Create development conda environment
$ conda create -n vl-convert-dev -c conda-forge python=3.10 deno maturin pytest black
Activate environment
$ conda activate vl-convert-dev
Change to Python package directory
$ cd vl-convert-python
Build Rust python package with maturin in develop mode
$ maturin develop --release
Run tests
$ pytest tests
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file vl_convert_python-0.0.1.tar.gz
.
File metadata
- Download URL: vl_convert_python-0.0.1.tar.gz
- Upload date:
- Size: 1.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc6d922b734e25bc8a314c0c01d7744c35d87ed3095a6377299b65a2b79fd946 |
|
MD5 | 421f6b87d0bd5b34e70e08abacf28ad2 |
|
BLAKE2b-256 | 907f8d5bacfa12264922e0896d8f961df9761d3cc1d9967ff3384355029e068e |
File details
Details for the file vl_convert_python-0.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: vl_convert_python-0.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 13.9 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6bca45c0314c4462d06950fb509778c48d0cab85bdefe6ca4453524cd90c275 |
|
MD5 | f8c7ce6e4e71bfdcb3b99c84a44c99a3 |
|
BLAKE2b-256 | 430cf73de807ca924a34547fd506e2b7f7204260a4fad3cb50fa5f698763652c |
File details
Details for the file vl_convert_python-0.0.1-cp311-cp311-macosx_11_0_arm64.whl
.
File metadata
- Download URL: vl_convert_python-0.0.1-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 12.4 MB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 554245f9bedbe6a8c70058770f95fa58b698e8836b5bfc009a2de3a439166419 |
|
MD5 | 308b073b8eb1dd29b3a6489247746987 |
|
BLAKE2b-256 | 495292e332384be68879d6c789f8776f13cd5a6f2247a39ed68fce33f58691d5 |
File details
Details for the file vl_convert_python-0.0.1-cp311-cp311-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: vl_convert_python-0.0.1-cp311-cp311-macosx_10_7_x86_64.whl
- Upload date:
- Size: 13.3 MB
- Tags: CPython 3.11, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc10be1e57706befc8c063aa09a9b2761579a3c16f62bab715c41f1b348d95cf |
|
MD5 | 277577f8638dae636c54b59895af2f0b |
|
BLAKE2b-256 | 2f769c08e409fbccf7dd115d39dbdc58cdf2f865fdd2b367545073535d5f944e |
File details
Details for the file vl_convert_python-0.0.1-cp310-none-win_amd64.whl
.
File metadata
- Download URL: vl_convert_python-0.0.1-cp310-none-win_amd64.whl
- Upload date:
- Size: 12.9 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30ad05c3fa463321fcf179ad6056ffb50127e55f90014cd3e4a15f3a72ea28ed |
|
MD5 | 96f79fa1c79015add9eb07dd84d222e8 |
|
BLAKE2b-256 | 98f0f98bcace9c7ac01f0b5fbdf2e6039b5c9859c63d566ab2e8bef85cdbe330 |
File details
Details for the file vl_convert_python-0.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: vl_convert_python-0.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 13.9 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0bcf1cebd2ed9f20dffa698c6e0fd3a4d68b5f996ad50bd4e6a803872dbfc05f |
|
MD5 | 1ba43342cfe368b22dcb608303e3540d |
|
BLAKE2b-256 | d104f35a6048cf039c7d493567156f62c4fc185957852090ccc90fdd8c05d793 |
File details
Details for the file vl_convert_python-0.0.1-cp310-cp310-macosx_11_0_arm64.whl
.
File metadata
- Download URL: vl_convert_python-0.0.1-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 12.4 MB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ee1328fad960b3e31084e33eb660538ec3c639709fa99182925173696ea415f |
|
MD5 | 97bc5d7c5727d32d9d9390774f3f25ea |
|
BLAKE2b-256 | 8c189a61a18ba1433d766984de7d3fabfe9eed645f271883b90d86c4a35a4db4 |
File details
Details for the file vl_convert_python-0.0.1-cp310-cp310-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: vl_convert_python-0.0.1-cp310-cp310-macosx_10_7_x86_64.whl
- Upload date:
- Size: 13.3 MB
- Tags: CPython 3.10, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91ec9588313142b52d293721619fea7e2d5b16056292afe91b665db610f9ab3b |
|
MD5 | 5cc2436ef9e704ed222326d0e457759c |
|
BLAKE2b-256 | 47204080b6911643b970add71e76dafcfe026031380cfe675bbd4f892241aab9 |
File details
Details for the file vl_convert_python-0.0.1-cp39-none-win_amd64.whl
.
File metadata
- Download URL: vl_convert_python-0.0.1-cp39-none-win_amd64.whl
- Upload date:
- Size: 12.9 MB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c92837f7325b2ad9d6872cf12824b0212a0de7c8718f6de78f5a2b50cb0fc08d |
|
MD5 | c111fd025ee42e82b5747d284b9703f1 |
|
BLAKE2b-256 | 672f3620f9db1f28b80ba8421a25ff11edfbf800fbe9fd5ae9b4782a0e92d9b9 |
File details
Details for the file vl_convert_python-0.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: vl_convert_python-0.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 13.9 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aaab2608b9418dc1cb6adc8961f48eb9bcde5787511cd9f029c291474f72cc93 |
|
MD5 | 61ae6ba711af6773d4d8b784f0ac35f2 |
|
BLAKE2b-256 | 18622bbbb6bf26b7df7c39ab9f1ce121344e20eccc0f437082e29f98cd3a2ba1 |
File details
Details for the file vl_convert_python-0.0.1-cp39-cp39-macosx_11_0_arm64.whl
.
File metadata
- Download URL: vl_convert_python-0.0.1-cp39-cp39-macosx_11_0_arm64.whl
- Upload date:
- Size: 12.4 MB
- Tags: CPython 3.9, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11cb9b96d37600e0b181151f0e15ee1c554690334ccb9717ad10266df8c05201 |
|
MD5 | 5635322169da8554eac0fae183482915 |
|
BLAKE2b-256 | ae3bfad2c1b2ec1c5c7717578865db44f9cf9234d18197a1773a405b2dfea47e |
File details
Details for the file vl_convert_python-0.0.1-cp39-cp39-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: vl_convert_python-0.0.1-cp39-cp39-macosx_10_7_x86_64.whl
- Upload date:
- Size: 13.3 MB
- Tags: CPython 3.9, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa54146e9dbd2b49faf6a7900b1a5bb7da630fa2241717a4ebf51fdf3f57e51c |
|
MD5 | ec2cd94ca0d85ef43a88771b4cc11e23 |
|
BLAKE2b-256 | 1defa3d3568330a2be34ee4e2ca95ab0f8c9292bcc34e30c49e42c75b068508e |
File details
Details for the file vl_convert_python-0.0.1-cp38-none-win_amd64.whl
.
File metadata
- Download URL: vl_convert_python-0.0.1-cp38-none-win_amd64.whl
- Upload date:
- Size: 12.9 MB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1484256e020412f1c2d402c1fa5d07f7a25342dd534c000852ebc302d3e45ef8 |
|
MD5 | 36ce0833aa34c4e8cd112900a6321d28 |
|
BLAKE2b-256 | e6855baae7fd03787504687e4c2b34ed160a88f1e95ce925514fbc6d0668f2f7 |
File details
Details for the file vl_convert_python-0.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: vl_convert_python-0.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 13.9 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 803a19f2e6303bb422b3eb17db457df26f85a06cf8a2010c7d7592a3cf85f9f8 |
|
MD5 | d570509767ade6a2867f06e4de808a97 |
|
BLAKE2b-256 | 4613ef99ddd6e1923cb0d70c0dd94053fd9182cc644c64e8f75bf1b197da4348 |
File details
Details for the file vl_convert_python-0.0.1-cp38-cp38-macosx_11_0_arm64.whl
.
File metadata
- Download URL: vl_convert_python-0.0.1-cp38-cp38-macosx_11_0_arm64.whl
- Upload date:
- Size: 12.4 MB
- Tags: CPython 3.8, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4bf17dd0aaf4d7d52ac97419a7306f7bebdd24aec5ed40ad59aeb5b222fcbf51 |
|
MD5 | 5baa8d27066d1dc241c0622746f8dee6 |
|
BLAKE2b-256 | 61fd0e3847521b737b68fbe17107f204fc2a77d6160410e8ae76d5bb8a8c1cba |
File details
Details for the file vl_convert_python-0.0.1-cp38-cp38-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: vl_convert_python-0.0.1-cp38-cp38-macosx_10_7_x86_64.whl
- Upload date:
- Size: 13.3 MB
- Tags: CPython 3.8, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 526db0773498eac94c99da7785d82115c527b7bb2f2b923f61ddd9d1b33075a9 |
|
MD5 | d6162bc325391509bee3140ca8cc19e0 |
|
BLAKE2b-256 | 7c11ecfc087761805d94a43ce560aac3d07b795e6e95eac81fd8b9ea251921f8 |