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.1.0.tar.gz (1.0 MB view details)

Uploaded Source

Built Distributions

vl_convert_python-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.9 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

vl_convert_python-0.1.0-cp311-cp311-macosx_11_0_arm64.whl (12.4 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

vl_convert_python-0.1.0-cp311-cp311-macosx_10_7_x86_64.whl (13.3 MB view details)

Uploaded CPython 3.11 macOS 10.7+ x86-64

vl_convert_python-0.1.0-cp310-none-win_amd64.whl (12.9 MB view details)

Uploaded CPython 3.10 Windows x86-64

vl_convert_python-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.9 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

vl_convert_python-0.1.0-cp310-cp310-macosx_11_0_arm64.whl (12.4 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

vl_convert_python-0.1.0-cp310-cp310-macosx_10_7_x86_64.whl (13.3 MB view details)

Uploaded CPython 3.10 macOS 10.7+ x86-64

vl_convert_python-0.1.0-cp39-none-win_amd64.whl (12.9 MB view details)

Uploaded CPython 3.9 Windows x86-64

vl_convert_python-0.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.9 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

vl_convert_python-0.1.0-cp39-cp39-macosx_11_0_arm64.whl (12.4 MB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

vl_convert_python-0.1.0-cp39-cp39-macosx_10_7_x86_64.whl (13.3 MB view details)

Uploaded CPython 3.9 macOS 10.7+ x86-64

vl_convert_python-0.1.0-cp38-none-win_amd64.whl (12.9 MB view details)

Uploaded CPython 3.8 Windows x86-64

vl_convert_python-0.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.9 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

vl_convert_python-0.1.0-cp38-cp38-macosx_11_0_arm64.whl (12.4 MB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

vl_convert_python-0.1.0-cp38-cp38-macosx_10_7_x86_64.whl (13.3 MB view details)

Uploaded CPython 3.8 macOS 10.7+ x86-64

File details

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

File metadata

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

File hashes

Hashes for vl_convert_python-0.1.0.tar.gz
Algorithm Hash digest
SHA256 92875d9ca02d1b7683cde9a92c5a910bb7406c013d38fdf8564ffd69907a4529
MD5 479caf25e568a0abe189908f387232df
BLAKE2b-256 f2e5474126fb446a82c3cd36729ed968b1a50316bf6c48ad9fca9973908bfa61

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vl_convert_python-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6fea49c7b7df0a19103b9d55da5a92899735172a53c54c1bb0ee7102806b19c3
MD5 1860d78640fb32fefc0e35e552bb1e5e
BLAKE2b-256 e5753b8dc7d22976571466e34d89b62b99942d11c201158a709e8e227d55fcbd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vl_convert_python-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3c24ab0503629f4d5b3fdacd98d47c1bbe2e7a6ec6aa5320aeebd17ceb539794
MD5 46a46949e79a1c947b9b85967dcb7260
BLAKE2b-256 b2e923b0cd83c9ff7dff3ec3c2b234f00695a4e841cd7db9488072c97688e155

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vl_convert_python-0.1.0-cp311-cp311-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 df70cc3833d155bdfbc905b8ef4d9e203fe18020621edfcaa692a5e4559e0d73
MD5 8a6ac4e7a23296996a937cbbc9e53840
BLAKE2b-256 99c0232fc5e1274ae7fc495c5a09ab090b3fdbf3415bba5f51e240c2a1c39704

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vl_convert_python-0.1.0-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 57d99676b5c024ddb5b6fd4c9e693bbed2dc096d3f42f80c968433a2e9e24aa9
MD5 a058d490675650223f5e95d0b8be83a6
BLAKE2b-256 b233dfc3b87975e6be2f7c583c7c682b1a69c89ea66658118072133050b80f0d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vl_convert_python-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c4fb1da72d72867639da1b792a706575742acebb68e929b54acf8f77f1553daa
MD5 361357a4d634e1773155d121fe0ef2cd
BLAKE2b-256 a72b18ac3cc78387404e3e821ea5992b24e83e22fa60b4ac2d57dc123d650824

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vl_convert_python-0.1.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c65637a3cb60dd8c7ed6286011991705208c9bc243da7aa7297cfd8971c42542
MD5 09b419da987aa3f19c2a6413cb0e82cb
BLAKE2b-256 d8dc4624b44a519947cac37df15cf1d4f0cbd6cdf4af96b190ae4b9e79e83473

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vl_convert_python-0.1.0-cp310-cp310-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 83fee56515fe83c61f4ea3e554078f3d4fff60f1594ce3f6d78f6ec2576116e3
MD5 f7493ca2707f4b22e8d84ddb8acae83e
BLAKE2b-256 836d35e7cb73d68c159d67e70c0096e5c0c677b3e25ff911cf6af5ce69db9b7a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vl_convert_python-0.1.0-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 1ce12b6cf240e0bda3d28e97e706365abcee524576c27d9ad88149ae14eb22de
MD5 8a993cf49976862d1a157144b6ecebf1
BLAKE2b-256 c0b71234f8655ac94300051cc684497f43c40ec66eff6452c0a87342ce85fb11

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vl_convert_python-0.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 03677a0608b48c535bda32a9d2b64663eb5af74961aa5402f27efd1c9919d019
MD5 0997a2d8a1b9a856e1fdcdec70f78c69
BLAKE2b-256 e87db39f1b85df8f7ea24f8c8de3d1dc49d4180533acd60ccccce36cd0a9fdac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vl_convert_python-0.1.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 29b05eaced5d1927a8311ac79e18af1eed6e3fdd991382972433243215ffd29e
MD5 abe9bf4ed49f33c33d3cce25e20fbe26
BLAKE2b-256 bc0afd6db2d6926a971983b28652ea99545ad1813275fdec2d1afb0d43632a97

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vl_convert_python-0.1.0-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 877c5857a59771f16601ec18a3393f9071eac4d349e54c3b148ef206fc159841
MD5 dba01a1f754b163b51f3f74c2fda7555
BLAKE2b-256 df94fb3342ee430312152940b6af81fe3f9fd38d2291b775fbc9298659ee49e0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vl_convert_python-0.1.0-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 1f31ded6736ab8f19bba47202866e6ea140acdd123a1d531b70cc4fe54fb8337
MD5 b604ea298f2089a45228b37b049c5694
BLAKE2b-256 a45a2b6fe27c03d9101a26cef2d256f9b949fdfffd227fd8afb2a4c6b0d30794

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vl_convert_python-0.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3170acf7e92390207f57125286439a52e996c65847bd6b074b4a9f401d4da2a2
MD5 a6ff40d67f585edd119b6a241623923e
BLAKE2b-256 d721bd472672d2a395e6a66e942cb24ac6e6c9102e840e4b3fba323d49a1d373

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vl_convert_python-0.1.0-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 008db52712aebad00c2af1dbfda9433cf9e13f0f42e071411e7d5d0790129f96
MD5 7c351b90c9f532a3aabb51c99ce61233
BLAKE2b-256 5d841ed92fee250dec9d5e3d6e2811e921bbc457838639c96af6f2c78bb849d1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vl_convert_python-0.1.0-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 d6d152e12b3c240374d5a93cb0021ef119a698647ce9f406514947f95dd374f6
MD5 b521478b7634cb4a19de7aa0532d705e
BLAKE2b-256 6b03fb6f86a57cc820ba3da597bd93af155f7429d54bf1f08edd4a4858da9fee

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