vl-convert-python 1.6.1__cp37-abi3-macosx_11_0_arm64.whl → 1.7.0__cp37-abi3-macosx_11_0_arm64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of vl-convert-python might be problematic. Click here for more details.

@@ -0,0 +1,853 @@
1
+ from typing import TYPE_CHECKING
2
+
3
+ if TYPE_CHECKING:
4
+ import sys
5
+ from typing import Any, Literal
6
+
7
+ if sys.version_info >= (3, 10):
8
+ from typing import TypeAlias
9
+ else:
10
+ from typing_extensions import TypeAlias
11
+
12
+ FormatLocaleName: TypeAlias = Literal[
13
+ "ar-001",
14
+ "ar-AE",
15
+ "ar-BH",
16
+ "ar-DJ",
17
+ "ar-DZ",
18
+ "ar-EG",
19
+ "ar-EH",
20
+ "ar-ER",
21
+ "ar-IL",
22
+ "ar-IQ",
23
+ "ar-JO",
24
+ "ar-KM",
25
+ "ar-KW",
26
+ "ar-LB",
27
+ "ar-LY",
28
+ "ar-MA",
29
+ "ar-MR",
30
+ "ar-OM",
31
+ "ar-PS",
32
+ "ar-QA",
33
+ "ar-SA",
34
+ "ar-SD",
35
+ "ar-SO",
36
+ "ar-SS",
37
+ "ar-SY",
38
+ "ar-TD",
39
+ "ar-TN",
40
+ "ar-YE",
41
+ "ca-ES",
42
+ "cs-CZ",
43
+ "da-DK",
44
+ "de-CH",
45
+ "de-DE",
46
+ "en-CA",
47
+ "en-GB",
48
+ "en-IE",
49
+ "en-IN",
50
+ "en-US",
51
+ "es-BO",
52
+ "es-ES",
53
+ "es-MX",
54
+ "fi-FI",
55
+ "fr-CA",
56
+ "fr-FR",
57
+ "he-IL",
58
+ "hu-HU",
59
+ "it-IT",
60
+ "ja-JP",
61
+ "ko-KR",
62
+ "mk-MK",
63
+ "nl-NL",
64
+ "pl-PL",
65
+ "pt-BR",
66
+ "pt-PT",
67
+ "ru-RU",
68
+ "sl-SI",
69
+ "sv-SE",
70
+ "uk-UA",
71
+ "zh-CN",
72
+ ]
73
+ TimeFormatLocaleName: TypeAlias = Literal[
74
+ "ar-EG",
75
+ "ar-SY",
76
+ "ca-ES",
77
+ "cs-CZ",
78
+ "da-DK",
79
+ "de-CH",
80
+ "de-DE",
81
+ "en-CA",
82
+ "en-GB",
83
+ "en-US",
84
+ "es-ES",
85
+ "es-MX",
86
+ "fa-IR",
87
+ "fi-FI",
88
+ "fr-CA",
89
+ "fr-FR",
90
+ "he-IL",
91
+ "hr-HR",
92
+ "hu-HU",
93
+ "it-IT",
94
+ "ja-JP",
95
+ "ko-KR",
96
+ "mk-MK",
97
+ "nb-NO",
98
+ "nl-BE",
99
+ "nl-NL",
100
+ "pl-PL",
101
+ "pt-BR",
102
+ "ru-RU",
103
+ "sv-SE",
104
+ "tr-TR",
105
+ "uk-UA",
106
+ "vi-VN",
107
+ "zh-CN",
108
+ "zh-TW",
109
+ ]
110
+ VegaThemes: TypeAlias = Literal[
111
+ "carbong10",
112
+ "carbong100",
113
+ "carbong90",
114
+ "carbonwhite",
115
+ "dark",
116
+ "excel",
117
+ "fivethirtyeight",
118
+ "ggplot2",
119
+ "googlecharts",
120
+ "latimes",
121
+ "powerbi",
122
+ "quartz",
123
+ "urbaninstitute",
124
+ "vox",
125
+ ]
126
+ Renderer: TypeAlias = Literal["canvas", "hybrid", "svg"]
127
+ FormatLocale: TypeAlias = FormatLocaleName | dict[str, Any]
128
+ TimeFormatLocale: TypeAlias = TimeFormatLocaleName | dict[str, Any]
129
+ VlSpec: TypeAlias = str | dict[str, Any]
130
+
131
+ __all__ = [
132
+ "get_format_locale",
133
+ "get_local_tz",
134
+ "get_themes",
135
+ "get_time_format_locale",
136
+ "javascript_bundle",
137
+ "register_font_directory",
138
+ "svg_to_jpeg",
139
+ "svg_to_pdf",
140
+ "svg_to_png",
141
+ "vega_to_html",
142
+ "vega_to_jpeg",
143
+ "vega_to_pdf",
144
+ "vega_to_png",
145
+ "vega_to_scenegraph",
146
+ "vega_to_svg",
147
+ "vega_to_url",
148
+ "vegalite_to_html",
149
+ "vegalite_to_jpeg",
150
+ "vegalite_to_pdf",
151
+ "vegalite_to_png",
152
+ "vegalite_to_scenegraph",
153
+ "vegalite_to_svg",
154
+ "vegalite_to_url",
155
+ "vegalite_to_vega",
156
+ "get_vega_version",
157
+ "get_vega_themes_version",
158
+ "get_vega_embed_version",
159
+ "get_vegalite_versions",
160
+ ]
161
+
162
+ def get_format_locale(name: FormatLocaleName) -> dict[str, Any]:
163
+ """
164
+ Get the d3-format locale dict for a named locale.
165
+
166
+ See https://github.com/d3/d3-format/tree/main/locale for available names
167
+
168
+ Parameters
169
+ ----------
170
+ name
171
+ d3-format locale name (e.g. 'it-IT')
172
+
173
+ Returns
174
+ -------
175
+ d3-format locale dict
176
+ """
177
+ ...
178
+
179
+ def get_local_tz() -> str | None:
180
+ """
181
+ Get the named local timezone that Vega uses to perform timezone calculations.
182
+
183
+ Returns
184
+ -------
185
+ Named local timezone (e.g. "America/New_York"), or None if the local timezone
186
+ cannot be determined.
187
+ """
188
+ ...
189
+
190
+ def get_themes() -> dict[VegaThemes, dict[str, Any]]:
191
+ """
192
+ Get the config dict for each built-in theme.
193
+
194
+ Returns
195
+ -------
196
+ dict from theme name to config object.
197
+ """
198
+ ...
199
+
200
+ def get_time_format_locale(name: TimeFormatLocaleName) -> dict[str, Any]:
201
+ """
202
+ Get the d3-time-format locale dict for a named locale.
203
+
204
+ See https://github.com/d3/d3-time-format/tree/main/locale for available names
205
+
206
+ Parameters
207
+ ----------
208
+ name
209
+ d3-time-format locale name (e.g. 'it-IT')
210
+
211
+ Returns
212
+ -------
213
+ d3-time-format locale dict.
214
+ """
215
+ ...
216
+
217
+ def javascript_bundle(snippet: str, vl_version: str | None = None) -> str:
218
+ """
219
+ Create a JavaScript bundle containing the Vega Embed, Vega-Lite, and Vega libraries.
220
+
221
+ Optionally, a JavaScript snippet may be provided that references Vega Embed
222
+ as `vegaEmbed`, Vega-Lite as `vegaLite`, Vega and `vega`, and the lodash.debounce
223
+ function as `lodashDebounce`.
224
+
225
+ The resulting string will include these JavaScript libraries and all of their
226
+ dependencies.
227
+ This bundle result is suitable for inclusion in an HTML <script> tag with
228
+ no external dependencies required.
229
+ The default snippet assigns `vegaEmbed`, `vegaLite`, and `vega` to the global
230
+ window object, making them available globally to other script tags.
231
+
232
+ Parameters
233
+ ----------
234
+ snippet
235
+ An ES6 JavaScript snippet which includes no imports
236
+ vl_version
237
+ Vega-Lite library version string (e.g. 'v5.15') (default to latest)
238
+
239
+ Returns
240
+ -------
241
+ Bundled snippet with all dependencies.
242
+ """
243
+ ...
244
+
245
+ def register_font_directory(font_dir: str) -> None:
246
+ """
247
+ Register a directory of fonts for use in subsequent conversions.
248
+
249
+ Parameters
250
+ ----------
251
+ font_dir
252
+ Absolute path to a directory containing font files
253
+
254
+ Returns
255
+ -------
256
+ None
257
+ """
258
+ ...
259
+
260
+ def svg_to_jpeg(
261
+ svg: str, scale: float | None = None, quality: int | None = None
262
+ ) -> bytes:
263
+ """
264
+ Convert an SVG image string to JPEG image data.
265
+
266
+ Parameters
267
+ ----------
268
+ svg
269
+ SVG image string
270
+ scale
271
+ Image scale factor (default 1.0)
272
+ quality
273
+ JPEG Quality between 0 (worst) and 100 (best). Default 90
274
+
275
+ Returns
276
+ -------
277
+ JPEG image data.
278
+ """
279
+ ...
280
+
281
+ def svg_to_pdf(svg: str, scale: float | None = None) -> bytes:
282
+ """
283
+ Convert an SVG image string to PDF document data.
284
+
285
+ Parameters
286
+ ----------
287
+ svg
288
+ SVG image string
289
+ scale
290
+ Image scale factor (default 1.0)
291
+
292
+ Returns
293
+ -------
294
+ PDF document data.
295
+ """
296
+ ...
297
+
298
+ def svg_to_png(svg: str, scale: float | None = None, ppi: float | None = None) -> bytes:
299
+ """
300
+ Convert an SVG image string to PNG image data.
301
+
302
+ Parameters
303
+ ----------
304
+ svg
305
+ SVG image string
306
+ scale
307
+ Image scale factor (default 1.0)
308
+ ppi
309
+ Pixels per inch (default 72)
310
+
311
+ Returns
312
+ -------
313
+ PNG image data.
314
+ """
315
+ ...
316
+
317
+ def vega_to_html(
318
+ vg_spec: VlSpec,
319
+ bundle: bool | None = None,
320
+ format_locale: FormatLocale | None = None,
321
+ time_format_locale: TimeFormatLocale | None = None,
322
+ renderer: Renderer | None = None,
323
+ ) -> str:
324
+ """
325
+ Convert a Vega spec to an HTML document, optionally bundling dependencies.
326
+
327
+ Parameters
328
+ ----------
329
+ vg_spec
330
+ Vega JSON specification string or dict
331
+ bundle
332
+ If True, bundle all dependencies in HTML file.
333
+ If False (default), HTML file will load dependencies from only CDN
334
+ format_locale
335
+ d3-format locale name or dictionary
336
+ time_format_locale
337
+ d3-time-format locale name or dictionary
338
+ renderer
339
+ Vega renderer. One of 'svg' (default), 'canvas',
340
+ or 'hybrid' (where text is svg and other marks are canvas)
341
+
342
+ Returns
343
+ -------
344
+ HTML document.
345
+ """
346
+ ...
347
+
348
+ def vega_to_jpeg(
349
+ vg_spec: VlSpec,
350
+ scale: float | None = None,
351
+ quality: int | None = None,
352
+ allowed_base_urls: list[str] | None = None,
353
+ format_locale: FormatLocale | None = None,
354
+ time_format_locale: TimeFormatLocale | None = None,
355
+ ) -> bytes:
356
+ """
357
+ Convert a Vega spec to JPEG image data.
358
+
359
+ Parameters
360
+ ----------
361
+ vg_spec
362
+ Vega JSON specification string or dict
363
+ scale
364
+ Image scale factor (default 1.0)
365
+ quality
366
+ JPEG Quality between 0 (worst) and 100 (best). Default 90
367
+ allowed_base_urls
368
+ List of allowed base URLs for external data requests.
369
+ Default allows any base URL
370
+ format_locale
371
+ d3-format locale name or dictionary
372
+ time_format_locale
373
+ d3-time-format locale name or dictionary
374
+
375
+ Returns
376
+ -------
377
+ JPEG image data.
378
+ """
379
+ ...
380
+
381
+ def vega_to_pdf(
382
+ vg_spec: VlSpec,
383
+ scale: float | None = None,
384
+ allowed_base_urls: list[str] | None = None,
385
+ format_locale: FormatLocale | None = None,
386
+ time_format_locale: TimeFormatLocale | None = None,
387
+ ) -> bytes:
388
+ """
389
+ Convert a Vega spec to PDF format.
390
+
391
+ Parameters
392
+ ----------
393
+ vg_spec
394
+ Vega JSON specification string or dict
395
+ scale
396
+ Image scale factor (default 1.0)
397
+ allowed_base_urls
398
+ List of allowed base URLs for external data requests.
399
+ Default allows any base URL
400
+ format_locale
401
+ d3-format locale name or dictionary
402
+ time_format_locale
403
+ d3-time-format locale name or dictionary
404
+
405
+ Returns
406
+ -------
407
+ PDF file bytes.
408
+ """
409
+ ...
410
+
411
+ def vega_to_png(
412
+ vg_spec: VlSpec,
413
+ scale: float | None = None,
414
+ ppi: float | None = None,
415
+ allowed_base_urls: list[str] | None = None,
416
+ format_locale: FormatLocale | None = None,
417
+ time_format_locale: TimeFormatLocale | None = None,
418
+ ) -> bytes:
419
+ """
420
+ Convert a Vega spec to PNG image data.
421
+
422
+ Parameters
423
+ ----------
424
+ vg_spec
425
+ Vega JSON specification string or dict
426
+ scale
427
+ Image scale factor (default 1.0)
428
+ ppi
429
+ Pixels per inch (default 72)
430
+ allowed_base_urls
431
+ List of allowed base URLs for external data requests.
432
+ Default allows any base URL
433
+ format_locale
434
+ d3-format locale name or dictionary
435
+ time_format_locale
436
+ d3-time-format locale name or dictionary
437
+
438
+ Returns
439
+ -------
440
+ PNG image data.
441
+ """
442
+ ...
443
+
444
+ def vega_to_scenegraph(
445
+ vg_spec: VlSpec,
446
+ allowed_base_urls: list[str] | None = None,
447
+ format_locale: FormatLocale | None = None,
448
+ time_format_locale: TimeFormatLocale | None = None,
449
+ ) -> dict[str, Any]:
450
+ """
451
+ Convert a Vega spec to a Vega Scenegraph.
452
+
453
+ Parameters
454
+ ----------
455
+ vg_spec
456
+ Vega JSON specification string or dict
457
+ allowed_base_urls
458
+ List of allowed base URLs for external data requests.
459
+ Default allows any base URL
460
+ format_locale
461
+ d3-format locale name or dictionary
462
+ time_format_locale
463
+ d3-time-format locale name or dictionary
464
+
465
+ Returns
466
+ -------
467
+ scenegraph dictionary
468
+ """
469
+ ...
470
+
471
+ def vega_to_svg(
472
+ vg_spec: VlSpec,
473
+ allowed_base_urls: list[str] | None = None,
474
+ format_locale: FormatLocale | None = None,
475
+ time_format_locale: TimeFormatLocale | None = None,
476
+ ) -> str:
477
+ """
478
+ Convert a Vega spec to an SVG image string.
479
+
480
+ Parameters
481
+ ----------
482
+ vg_spec
483
+ Vega JSON specification string or dict
484
+ allowed_base_urls
485
+ List of allowed base URLs for external data requests.
486
+ Default allows any base URL
487
+ format_locale
488
+ d3-format locale name or dictionary
489
+ time_format_locale
490
+ d3-time-format locale name or dictionary
491
+
492
+ Returns
493
+ -------
494
+ SVG image string.
495
+ """
496
+ ...
497
+
498
+ def vega_to_url(vg_spec: VlSpec, fullscreen: bool | None = None) -> str:
499
+ """
500
+ Convert a Vega spec to a URL that opens the chart in the Vega editor.
501
+
502
+ Parameters
503
+ ----------
504
+ vg_spec
505
+ Vega JSON specification string or dict
506
+ fullscreen
507
+ Whether to open the chart in full screen in the editor
508
+
509
+ Returns
510
+ -------
511
+ URL string.
512
+ """
513
+ ...
514
+
515
+ def vegalite_to_html(
516
+ vl_spec: VlSpec,
517
+ vl_version: str | None = None,
518
+ bundle: bool | None = None,
519
+ config: dict[str, Any] | None = None,
520
+ theme: VegaThemes | None = None,
521
+ format_locale: FormatLocale | None = None,
522
+ time_format_locale: TimeFormatLocale | None = None,
523
+ renderer: Renderer | None = None,
524
+ ) -> str:
525
+ """
526
+ Convert a Vega-Lite spec to an HTML document, optionally bundling dependencies.
527
+
528
+ Parameters
529
+ ----------
530
+ vl_spec
531
+ Vega-Lite JSON specification string or dict
532
+ vl_version
533
+ Vega-Lite library version string (e.g. 'v5.15')
534
+ (default to latest)
535
+ bundle
536
+ If True, bundle all dependencies in HTML file
537
+ If False (default), HTML file will load dependencies from only CDN
538
+ config
539
+ Chart configuration object to apply during conversion
540
+ theme
541
+ Named theme (e.g. "dark") to apply during conversion
542
+ format_locale
543
+ d3-format locale name or dictionary
544
+ time_format_locale
545
+ d3-time-format locale name or dictionary
546
+ renderer
547
+ Vega renderer. One of 'svg' (default), 'canvas',
548
+ or 'hybrid' (where text is svg and other marks are canvas)
549
+
550
+ Returns
551
+ -------
552
+ HTML document.
553
+ """
554
+ ...
555
+
556
+ def vegalite_to_jpeg(
557
+ vl_spec: VlSpec,
558
+ vl_version: str | None = None,
559
+ scale: float | None = None,
560
+ quality: int | None = None,
561
+ config: dict[str, Any] | None = None,
562
+ theme: VegaThemes | None = None,
563
+ show_warnings: bool | None = None,
564
+ allowed_base_urls: list[str] | None = None,
565
+ format_locale: FormatLocale | None = None,
566
+ time_format_locale: TimeFormatLocale | None = None,
567
+ ) -> bytes:
568
+ """
569
+ Convert a Vega-Lite spec to JPEG image data using a particular version of the Vega-Lite JavaScript library.
570
+
571
+ Parameters
572
+ ----------
573
+ vl_spec
574
+ Vega-Lite JSON specification string or dict
575
+ vl_version
576
+ Vega-Lite library version string (e.g. 'v5.15')
577
+ (default to latest)
578
+ scale
579
+ Image scale factor (default 1.0)
580
+ quality
581
+ JPEG Quality between 0 (worst) and 100 (best). Default 90
582
+ config
583
+ Chart configuration object to apply during conversion
584
+ theme
585
+ Named theme (e.g. "dark") to apply during conversion
586
+ show_warnings
587
+ Whether to print Vega-Lite compilation warnings (default false)
588
+ allowed_base_urls
589
+ List of allowed base URLs for external data requests.
590
+ Default allows any base URL
591
+ format_locale
592
+ d3-format locale name or dictionary
593
+ time_format_locale
594
+ d3-time-format locale name or dictionary
595
+
596
+ Returns
597
+ -------
598
+ JPEG image data.
599
+ """
600
+ ...
601
+
602
+ def vegalite_to_pdf(
603
+ vl_spec: VlSpec,
604
+ vl_version: str | None = None,
605
+ scale: float | None = None,
606
+ config: dict[str, Any] | None = None,
607
+ theme: VegaThemes | None = None,
608
+ allowed_base_urls: list[str] | None = None,
609
+ format_locale: FormatLocale | None = None,
610
+ time_format_locale: TimeFormatLocale | None = None,
611
+ ) -> bytes:
612
+ """
613
+ Convert a Vega-Lite spec to PDF image data using a particular version of the Vega-Lite JavaScript library.
614
+
615
+ Parameters
616
+ ----------
617
+ vl_spec
618
+ Vega-Lite JSON specification string or dict
619
+ vl_version
620
+ Vega-Lite library version string (e.g. 'v5.15')
621
+ (default to latest)
622
+ scale
623
+ Image scale factor (default 1.0)
624
+ config
625
+ Chart configuration object to apply during conversion
626
+ theme
627
+ Named theme (e.g. "dark") to apply during conversion
628
+ allowed_base_urls
629
+ List of allowed base URLs for external data requests.
630
+ Default allows any base URL
631
+ format_locale
632
+ d3-format locale name or dictionary
633
+ time_format_locale
634
+ d3-time-format locale name or dictionary
635
+
636
+ Returns
637
+ -------
638
+ PDF image data.
639
+ """
640
+ ...
641
+
642
+ def vegalite_to_png(
643
+ vl_spec: VlSpec,
644
+ vl_version: str | None = None,
645
+ scale: float | None = None,
646
+ ppi: float | None = None,
647
+ config: dict[str, Any] | None = None,
648
+ theme: VegaThemes | None = None,
649
+ show_warnings: bool | None = None,
650
+ allowed_base_urls: list[str] | None = None,
651
+ format_locale: FormatLocale | None = None,
652
+ time_format_locale: TimeFormatLocale | None = None,
653
+ ) -> bytes:
654
+ """
655
+ Convert a Vega-Lite spec to PNG image data using a particular version of the Vega-Lite JavaScript library.
656
+
657
+ Parameters
658
+ ----------
659
+ vl_spec
660
+ Vega-Lite JSON specification string or dict
661
+ vl_version
662
+ Vega-Lite library version string (e.g. 'v5.15')
663
+ (default to latest)
664
+ scale
665
+ Image scale factor (default 1.0)
666
+ ppi
667
+ Pixels per inch (default 72)
668
+ config
669
+ Chart configuration object to apply during conversion
670
+ theme
671
+ Named theme (e.g. "dark") to apply during conversion
672
+ show_warnings
673
+ Whether to print Vega-Lite compilation warnings (default false)
674
+ allowed_base_urls
675
+ List of allowed base URLs for external data requests.
676
+ Default allows any base URL
677
+ format_locale
678
+ d3-format locale name or dictionary
679
+ time_format_locale
680
+ d3-time-format locale name or dictionary
681
+
682
+ Returns
683
+ -------
684
+ PNG image data.
685
+ """
686
+ ...
687
+
688
+ def vegalite_to_scenegraph(
689
+ vl_spec: VlSpec,
690
+ vl_version: str | None = None,
691
+ config: dict[str, Any] | None = None,
692
+ theme: VegaThemes | None = None,
693
+ show_warnings: bool | None = None,
694
+ allowed_base_urls: list[str] | None = None,
695
+ format_locale: FormatLocale | None = None,
696
+ time_format_locale: TimeFormatLocale | None = None,
697
+ ) -> dict[str, Any]:
698
+ """
699
+ Convert a Vega-Lite spec to a Vega Scenegraph using a particular version of the Vega-Lite JavaScript library.
700
+
701
+ Parameters
702
+ ----------
703
+ vl_spec
704
+ Vega-Lite JSON specification string or dict
705
+ vl_version
706
+ Vega-Lite library version string (e.g. 'v5.15')
707
+ (default to latest)
708
+ config
709
+ Chart configuration object to apply during conversion
710
+ theme
711
+ Named theme (e.g. "dark") to apply during conversion
712
+ show_warnings
713
+ Whether to print Vega-Lite compilation warnings (default false)
714
+ allowed_base_urls
715
+ List of allowed base URLs for external data requests.
716
+ Default allows any base URL
717
+ format_locale
718
+ d3-format locale name or dictionary
719
+ time_format_locale
720
+ d3-time-format locale name or dictionary
721
+
722
+ Returns
723
+ -------
724
+ scenegraph dictionary
725
+ """
726
+ ...
727
+
728
+ def vegalite_to_svg(
729
+ vl_spec: VlSpec,
730
+ vl_version: str | None = None,
731
+ config: dict[str, Any] | None = None,
732
+ theme: VegaThemes | None = None,
733
+ show_warnings: bool | None = None,
734
+ allowed_base_urls: list[str] | None = None,
735
+ format_locale: FormatLocale | None = None,
736
+ time_format_locale: TimeFormatLocale | None = None,
737
+ ) -> str:
738
+ """
739
+ Convert a Vega-Lite spec to an SVG image string using a particular version of the Vega-Lite JavaScript library.
740
+
741
+ Parameters
742
+ ----------
743
+ vl_spec
744
+ Vega-Lite JSON specification string or dict
745
+ vl_version
746
+ Vega-Lite library version string (e.g. 'v5.15')
747
+ (default to latest)
748
+ config
749
+ Chart configuration object to apply during conversion
750
+ theme
751
+ Named theme (e.g. "dark") to apply during conversion
752
+ show_warnings
753
+ Whether to print Vega-Lite compilation warnings (default false)
754
+ allowed_base_urls
755
+ List of allowed base URLs for external data requests.
756
+ Default allows any base URL
757
+ format_locale
758
+ d3-format locale name or dictionary
759
+ time_format_locale
760
+ d3-time-format locale name or dictionary
761
+
762
+ Returns
763
+ -------
764
+ SVG image string.
765
+ """
766
+ ...
767
+
768
+ def vegalite_to_url(vl_spec: VlSpec, fullscreen: bool | None = None) -> str:
769
+ """
770
+ Convert a Vega-Lite spec to a URL that opens the chart in the Vega editor.
771
+
772
+ Parameters
773
+ ----------
774
+ vl_spec
775
+ Vega-Lite JSON specification string or dict
776
+ fullscreen
777
+ Whether to open the chart in full screen in the editor
778
+
779
+ Returns
780
+ -------
781
+ URL string.
782
+ """
783
+ ...
784
+
785
+ def vegalite_to_vega(
786
+ vl_spec: VlSpec,
787
+ vl_version: str | None = None,
788
+ config: dict[str, Any] | None = None,
789
+ theme: VegaThemes | None = None,
790
+ show_warnings: bool | None = None,
791
+ ) -> dict[str, Any]:
792
+ """
793
+ Convert a Vega-Lite spec to a Vega spec using a particular version of the Vega-Lite JavaScript library.
794
+
795
+ Parameters
796
+ ----------
797
+ vl_spec
798
+ Vega-Lite JSON specification string or dict
799
+ vl_version
800
+ Vega-Lite library version string (e.g. 'v5.15')
801
+ (default to latest)
802
+ config
803
+ Chart configuration object to apply during conversion
804
+ theme
805
+ Named theme (e.g. "dark") to apply during conversion
806
+ show_warnings
807
+ Whether to print Vega-Lite compilation warnings (default false)
808
+
809
+ Returns
810
+ -------
811
+ Vega JSON specification dict.
812
+ """
813
+ ...
814
+
815
+ def get_vega_version() -> str:
816
+ """
817
+ Get the bundled version of Vega
818
+
819
+ Returns
820
+ -------
821
+ Vega version string (e.g. "5.30.0")
822
+ """
823
+ ...
824
+
825
+ def get_vega_themes_version() -> str:
826
+ """
827
+ Get the bundled version of Vega-Themes
828
+
829
+ Returns
830
+ -------
831
+ Vega-Themes version string (e.g. "2.14.0")
832
+ """
833
+ ...
834
+
835
+ def get_vega_embed_version() -> str:
836
+ """
837
+ Get the bundled version of Vega-Embed
838
+
839
+ Returns
840
+ -------
841
+ Vega-Embed version string (e.g. "6.26.0")
842
+ """
843
+ ...
844
+
845
+ def get_vegalite_versions() -> list[str]:
846
+ """
847
+ Get the bundled versions of Vega-Lite
848
+
849
+ Returns
850
+ -------
851
+ Vega-Lite version strings (e.g. ["5.8", "5.9", ..., "5.21"])
852
+ """
853
+ ...
vl_convert/py.typed ADDED
File without changes
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: vl-convert-python
3
- Version: 1.6.1
3
+ Version: 1.7.0
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  License-File: LICENSE
@@ -0,0 +1,8 @@
1
+ vl_convert_python-1.7.0.dist-info/METADATA,sha256=JZ4rSCUW_lKiZzkW8ov6mEl0z2a35igI26vOtysSMQc,5151
2
+ vl_convert_python-1.7.0.dist-info/WHEEL,sha256=sEnPbDTKa0KXk_rLRYKZHR1gg3dJRumAigKUuWDx_aA,102
3
+ vl_convert_python-1.7.0.dist-info/licenses/LICENSE,sha256=mo5JuEGkBirmmLrlxBZ8sINIZ-SqgbCoL3UOhwvJE6w,1453
4
+ vl_convert/__init__.py,sha256=sfoYSsqjBnXQeASPiuxP9kisQrYoK0I4WTMNn2GTgm8,123
5
+ vl_convert/__init__.pyi,sha256=CYKydSswW4lYBTMA5_WvakzUBgUCq1dnsN8aTB6NgRw,22275
6
+ vl_convert/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
+ vl_convert/vl_convert.abi3.so,sha256=U2sWPQ5JR2-0XUTzG-Hqy69CC5kQE00-6lAbEtTCtas,64168032
8
+ vl_convert_python-1.7.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: maturin (1.7.1)
2
+ Generator: maturin (1.7.4)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp37-abi3-macosx_11_0_arm64
@@ -1,6 +0,0 @@
1
- vl_convert_python-1.6.1.dist-info/METADATA,sha256=VxqRo1S7Qg0npO5p_aXMQ0AsJj3UtgObFPUqLkohooU,5151
2
- vl_convert_python-1.6.1.dist-info/WHEEL,sha256=1TdJzUZRR46ZNNWDcWiKjA-P2bqjURChZ7YxWqFRkXc,102
3
- vl_convert_python-1.6.1.dist-info/licenses/LICENSE,sha256=mo5JuEGkBirmmLrlxBZ8sINIZ-SqgbCoL3UOhwvJE6w,1453
4
- vl_convert/__init__.py,sha256=sfoYSsqjBnXQeASPiuxP9kisQrYoK0I4WTMNn2GTgm8,123
5
- vl_convert/vl_convert.abi3.so,sha256=8N8FfQt57LjfKS1KIrsyyF-9TqRW7wGt6Lbv8iWzHvE,62583600
6
- vl_convert_python-1.6.1.dist-info/RECORD,,