Skip to main content

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 library, create a VlConverter object, and use the vegalite_to_vega method 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 black-jupyter

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vl_convert_python-0.2.0.tar.gz (1.9 MB view details)

Uploaded Source

Built Distributions

vl_convert_python-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (22.1 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

vl_convert_python-0.2.0-cp311-cp311-macosx_11_0_arm64.whl (19.5 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

vl_convert_python-0.2.0-cp311-cp311-macosx_10_7_x86_64.whl (20.5 MB view details)

Uploaded CPython 3.11 macOS 10.7+ x86-64

vl_convert_python-0.2.0-cp310-none-win_amd64.whl (20.8 MB view details)

Uploaded CPython 3.10 Windows x86-64

vl_convert_python-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (22.1 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

vl_convert_python-0.2.0-cp310-cp310-macosx_11_0_arm64.whl (19.5 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

vl_convert_python-0.2.0-cp310-cp310-macosx_10_7_x86_64.whl (20.5 MB view details)

Uploaded CPython 3.10 macOS 10.7+ x86-64

vl_convert_python-0.2.0-cp39-none-win_amd64.whl (20.8 MB view details)

Uploaded CPython 3.9 Windows x86-64

vl_convert_python-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (22.1 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

vl_convert_python-0.2.0-cp39-cp39-macosx_11_0_arm64.whl (19.5 MB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

vl_convert_python-0.2.0-cp39-cp39-macosx_10_7_x86_64.whl (20.5 MB view details)

Uploaded CPython 3.9 macOS 10.7+ x86-64

vl_convert_python-0.2.0-cp38-none-win_amd64.whl (20.8 MB view details)

Uploaded CPython 3.8 Windows x86-64

vl_convert_python-0.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (22.1 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

vl_convert_python-0.2.0-cp38-cp38-macosx_11_0_arm64.whl (19.5 MB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

vl_convert_python-0.2.0-cp38-cp38-macosx_10_7_x86_64.whl (20.5 MB view details)

Uploaded CPython 3.8 macOS 10.7+ x86-64

vl_convert_python-0.2.0-cp37-none-win_amd64.whl (20.8 MB view details)

Uploaded CPython 3.7 Windows x86-64

vl_convert_python-0.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (22.1 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

vl_convert_python-0.2.0-cp37-cp37m-macosx_11_0_arm64.whl (19.5 MB view details)

Uploaded CPython 3.7m macOS 11.0+ ARM64

vl_convert_python-0.2.0-cp37-cp37m-macosx_10_7_x86_64.whl (20.5 MB view details)

Uploaded CPython 3.7m macOS 10.7+ x86-64

File details

Details for the file vl_convert_python-0.2.0.tar.gz.

File metadata

  • Download URL: vl_convert_python-0.2.0.tar.gz
  • Upload date:
  • Size: 1.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.13.6

File hashes

Hashes for vl_convert_python-0.2.0.tar.gz
Algorithm Hash digest
SHA256 92df145b8f232962d22141234630054ba05d7066b2ca262d0f10c671728b9b0b
MD5 90ba1498a29e40570653e68718de4eb9
BLAKE2b-256 c28e0dd5401a2963c3b82c8fdd0f5774d19942bc0c81a08a9920326f0d614ca2

See more details on using hashes here.

File details

Details for the file vl_convert_python-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for vl_convert_python-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 94db7409256db36a147d2275c7e2493934a349743225f5f2a6bfa371984b4599
MD5 2ef079d0fb109442285398324c21d042
BLAKE2b-256 af03b6911bf9600fb214e39f13a7510fbb7ac48a648423883fb0f0b7d959bb52

See more details on using hashes here.

File details

Details for the file vl_convert_python-0.2.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for vl_convert_python-0.2.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 eff3f5808cb1fea8c8b558ff155ddb8b3757077dd1e0f3c0ec79e266e2864283
MD5 09b39374e8bdd3af4917e3fd676cb55e
BLAKE2b-256 736a65406a7bb4b3c1d8b6d307c5bc3488e83c8274de4180f5646c441657330e

See more details on using hashes here.

File details

Details for the file vl_convert_python-0.2.0-cp311-cp311-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for vl_convert_python-0.2.0-cp311-cp311-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 a83977add8ca636cc22b5bb2c831e18cad38ff8c1f9d2fef1b5ae989ec6c638c
MD5 1f535f9f781749570c8a5d860895b933
BLAKE2b-256 9f91835e4280c285ada5106f3d93e8854edf354b6c431d482bcc5cc1617d2f6c

See more details on using hashes here.

File details

Details for the file vl_convert_python-0.2.0-cp310-none-win_amd64.whl.

File metadata

File hashes

Hashes for vl_convert_python-0.2.0-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 1a349dc5347a7f0681647f07b1c6077fb36f2903c1afa9edc8c2de65e6f155f7
MD5 a1b8cce6c3f9287f75b3307cc46df4de
BLAKE2b-256 c1c62a2dfe90129e5826d7ce1ec23a6ed3f66710144e59734aa37dbe185d6a6b

See more details on using hashes here.

File details

Details for the file vl_convert_python-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for vl_convert_python-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6e9bc8c979e973e85b72c7e77fdad6d36f50f3b089977497feaa9367992fddcf
MD5 07d4f96b61dcebaffacba41590c49ec0
BLAKE2b-256 31552b331fc854120f3b1c729905a4b88e02a3b3f2911be6ce8ad0f0e6ae5ce8

See more details on using hashes here.

File details

Details for the file vl_convert_python-0.2.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for vl_convert_python-0.2.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0c11e9fc8f7edd101b5fa01536c2cb406c6da76300a9dd7b3064ae2b62d6fc0b
MD5 e67fd156b8acf3d9327482923c3abcb5
BLAKE2b-256 07455afb3c06b22d27c901eb3b0488ec6d97e19cb5b44c28fcb84756e239ef32

See more details on using hashes here.

File details

Details for the file vl_convert_python-0.2.0-cp310-cp310-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for vl_convert_python-0.2.0-cp310-cp310-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 e106a98425f3b7764b23717124692e16c5ba91683b9391ddcf3f58bd66eb86b3
MD5 1fa00fa8b86a402a1c211bbc6d36f596
BLAKE2b-256 9a3ec33f76cdf761a3115d7f801318e8dcb955f17acde16b7958be88d3a9ee28

See more details on using hashes here.

File details

Details for the file vl_convert_python-0.2.0-cp39-none-win_amd64.whl.

File metadata

File hashes

Hashes for vl_convert_python-0.2.0-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 dadbdda50f46e91749561ffb7a5fe2eb78e3aacf7cb97bbb17ad7635e31b7c4d
MD5 47f938a577aaf0f618faa8bad0d2851d
BLAKE2b-256 3021f34bd6f0167797e8f50cc7bb86320dec330a481754709db3cf8bdc9e83f0

See more details on using hashes here.

File details

Details for the file vl_convert_python-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for vl_convert_python-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 26aeb283c7a1ae15df4959d98443d7aa4c470db2acc7f49ce5aa8b508f839795
MD5 e511b9dd8e9e2999cdf2d34f9879bad3
BLAKE2b-256 2e1ab74e8caf51b79ff4662e38122e2b80c264a94d2414e185a48cca6eb937e7

See more details on using hashes here.

File details

Details for the file vl_convert_python-0.2.0-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for vl_convert_python-0.2.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e42ce3b8b2022b817f45b9578fff11c11462e1d19ec9e286f3e633574f349fc5
MD5 e202bc8e0c0fb68c08442c25e04034f9
BLAKE2b-256 ff8633181263e58507215fad494fd7f98b4ba332c2d6f1b4248a003532697654

See more details on using hashes here.

File details

Details for the file vl_convert_python-0.2.0-cp39-cp39-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for vl_convert_python-0.2.0-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 2a8ecfc08ffeae13db6ce5a98500c86a49d38ca63e39b2abd2864fc6da580d04
MD5 4c19369a2a2c338ddc02465bef343d1c
BLAKE2b-256 20ff6852e5de1f93615598fe79d0dc3b9deea666348ead2a768001f100630123

See more details on using hashes here.

File details

Details for the file vl_convert_python-0.2.0-cp38-none-win_amd64.whl.

File metadata

File hashes

Hashes for vl_convert_python-0.2.0-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 00592a8d8558ace44e7620ce6e9865b719843803b2dd20b2ba855ac18fcddcd0
MD5 f0b804ee5e5674add0e9b5379167c6b3
BLAKE2b-256 675bd20a6f0383f8b93be198b4ffc1f822c667d12db9160b6043ce36f74af81c

See more details on using hashes here.

File details

Details for the file vl_convert_python-0.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for vl_convert_python-0.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9948047f7fbe32df13c859190ff716be89fa6ae03f078c34aa3292b70cdb1d09
MD5 6dd585df1a806a9f007033b6baa2b45b
BLAKE2b-256 c1e18835b1288c7e7403d63a69376a215a6e43b0d4c537a6d7d01c0f28e5ad3f

See more details on using hashes here.

File details

Details for the file vl_convert_python-0.2.0-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for vl_convert_python-0.2.0-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3fd336c4bc81b964a7b7a22279b539fb3149318ae824a406bac28a2c6e7ad174
MD5 e54531b209889756366d512b62d92189
BLAKE2b-256 c523a92ef9094d86756168f34f303bcc897dfc268bb5bcdeb19d4c9dbb436890

See more details on using hashes here.

File details

Details for the file vl_convert_python-0.2.0-cp38-cp38-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for vl_convert_python-0.2.0-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 0bca37f1f366cfa170e1b6f7e6f97db1f9544001fceb9678fca285e88e8dd8e6
MD5 2b3d5d1e770cbc0c9470cbcb6aa5bb9d
BLAKE2b-256 494e99ee15d94ac3f60f79816abdc2501b942a3d6aab04a9570a5fefc33d475a

See more details on using hashes here.

File details

Details for the file vl_convert_python-0.2.0-cp37-none-win_amd64.whl.

File metadata

File hashes

Hashes for vl_convert_python-0.2.0-cp37-none-win_amd64.whl
Algorithm Hash digest
SHA256 de4c847c3a2d2cddef0771ec0a4fd559b5118e68a9dd879c2a9bd404b36d4a10
MD5 473f7b38c2056cc8156733621dae346e
BLAKE2b-256 0c8c60f019943579f633cf9d658a62baa15a0215b852bbae9df607702a02eca2

See more details on using hashes here.

File details

Details for the file vl_convert_python-0.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for vl_convert_python-0.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bfb5d1a5c759c0756b7d524b70104c92fe5ee4ce452e65b2147bb239f5b2a4f3
MD5 5e25ca20bfcf8942cd2dc72f75ad04bd
BLAKE2b-256 3209081b2ac90e1fb0ec35f2b65e0763ccf5dac98d4b31f0862479e6fff4910e

See more details on using hashes here.

File details

Details for the file vl_convert_python-0.2.0-cp37-cp37m-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for vl_convert_python-0.2.0-cp37-cp37m-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 672ca84c2718bd3d7ce9828ab753312bef64406f7ffb0a372c3867c39cd79c69
MD5 43856324234be40d91ed949a1d9fd90d
BLAKE2b-256 896f7431b7d40d1f0c73ced1103ac98fa2ffc0819726cce626db6a19257aecb1

See more details on using hashes here.

File details

Details for the file vl_convert_python-0.2.0-cp37-cp37m-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for vl_convert_python-0.2.0-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 305cc5f0d7d0a5fff9eaa069f98dec61d1e41827e35f1f57f60531208c3c15d1
MD5 53bcf57fd34cb5c4d8d97036bc649c0f
BLAKE2b-256 688cdb4f05b50c118c60eb568b8e9e50c7180c818173302472ab82cfc43d0b2e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page