perspective-python 5.5.1__tar.gz → 5.6.0__tar.gz

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.
Files changed (123) hide show
  1. {perspective_python-5.5.1 → perspective_python-5.6.0}/Cargo.toml +7 -5
  2. {perspective_python-5.5.1 → perspective_python-5.6.0}/LICENSE_THIRDPARTY_cargo.yml +2 -2
  3. perspective_python-5.6.0/PKG-INFO +126 -0
  4. perspective_python-5.6.0/README.md +80 -0
  5. {perspective_python-5.5.1 → perspective_python-5.6.0}/package.json +1 -1
  6. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/__init__.py +1 -1
  7. perspective_python-5.6.0/perspective/tests/column_paths.py +33 -0
  8. perspective_python-5.6.0/perspective/tests/multi_threaded/test_derived_threaded.py +103 -0
  9. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/multi_threaded/test_multi_threaded.py +38 -0
  10. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/test_column_paths.py +10 -9
  11. perspective_python-5.6.0/perspective/tests/table/test_derived.py +145 -0
  12. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/test_exception.py +8 -0
  13. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/test_table_view_table.py +16 -16
  14. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/test_to_arrow.py +12 -13
  15. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/test_to_format.py +10 -4
  16. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/test_view.py +93 -34
  17. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/test_view_expression.py +202 -0
  18. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/virtual_servers/test_duckdb.py +201 -6
  19. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/virtual_servers/test_polars.py +35 -6
  20. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/virtual_servers/test_postgres.py +3 -2
  21. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/virtual_servers/__init__.py +69 -5
  22. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/virtual_servers/clickhouse.py +15 -5
  23. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/virtual_servers/duckdb.py +21 -5
  24. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/virtual_servers/polars.py +53 -13
  25. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/virtual_servers/postgres.py +21 -7
  26. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/widget/static/perspective-anywidget.css +1 -1
  27. perspective_python-5.6.0/perspective/widget/static/perspective-anywidget.js +31 -0
  28. {perspective_python-5.5.1/perspective_python-5.5.1.data → perspective_python-5.6.0/perspective_python-5.6.0.data}/data/share/jupyter/labextensions/@perspective-dev/jupyterlab/package.json +23 -2
  29. perspective_python-5.6.0/perspective_python-5.6.0.data/data/share/jupyter/labextensions/@perspective-dev/jupyterlab/static/253.c4440a69e8a14a73cf64.js +1 -0
  30. perspective_python-5.6.0/perspective_python-5.6.0.data/data/share/jupyter/labextensions/@perspective-dev/jupyterlab/static/523.504cd9ad7ebf4f99180b.js +1 -0
  31. perspective_python-5.5.1/perspective_python-5.5.1.data/data/share/jupyter/labextensions/@perspective-dev/jupyterlab/static/remoteEntry.6ad6e44110d05438b8b1.js → perspective_python-5.6.0/perspective_python-5.6.0.data/data/share/jupyter/labextensions/@perspective-dev/jupyterlab/static/remoteEntry.c86494bec5ee8ddb16b9.js +1 -1
  32. {perspective_python-5.5.1 → perspective_python-5.6.0}/pyproject.toml +34 -1
  33. {perspective_python-5.5.1 → perspective_python-5.6.0}/src/client/client_async.rs +64 -11
  34. {perspective_python-5.5.1 → perspective_python-5.6.0}/src/client/client_sync.rs +26 -9
  35. {perspective_python-5.5.1 → perspective_python-5.6.0}/src/client/table_data.rs +4 -1
  36. {perspective_python-5.5.1 → perspective_python-5.6.0}/src/server/generic_sql_model.rs +79 -3
  37. {perspective_python-5.5.1 → perspective_python-5.6.0}/src/server/virtual_server_sync.rs +70 -16
  38. perspective_python-5.5.1/PKG-INFO +0 -36
  39. perspective_python-5.5.1/README.md +0 -3
  40. perspective_python-5.5.1/perspective/widget/static/perspective-anywidget.js +0 -31
  41. perspective_python-5.5.1/perspective_python-5.5.1.data/data/share/jupyter/labextensions/@perspective-dev/jupyterlab/static/253.679b9dc8e8431060ef52.js +0 -1
  42. perspective_python-5.5.1/perspective_python-5.5.1.data/data/share/jupyter/labextensions/@perspective-dev/jupyterlab/static/523.2795676ad55e04dab4d7.js +0 -1
  43. {perspective_python-5.5.1 → perspective_python-5.6.0}/LICENSE.md +0 -0
  44. {perspective_python-5.5.1 → perspective_python-5.6.0}/build.rs +0 -0
  45. {perspective_python-5.5.1 → perspective_python-5.6.0}/docs/index.html +0 -0
  46. {perspective_python-5.5.1 → perspective_python-5.6.0}/docs/lib.md +0 -0
  47. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/handlers/__init__.py +0 -0
  48. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/handlers/aiohttp.py +0 -0
  49. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/handlers/starlette.py +0 -0
  50. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/handlers/tornado.py +0 -0
  51. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/templates/exported_widget.html.template +0 -0
  52. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/__init__.py +0 -0
  53. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/async/test_async_client.py +0 -0
  54. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/async/test_websocket_client.py +0 -0
  55. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/conftest.py +0 -0
  56. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/core/__init__.py +0 -0
  57. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/core/test_async.py +0 -0
  58. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/multi_threaded/__init__.py +0 -0
  59. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/server/__init__.py +0 -0
  60. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/server/test_server.py +0 -0
  61. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/server/test_session.py +0 -0
  62. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/__init__.py +0 -0
  63. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/arrow/date32.arrow +0 -0
  64. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/arrow/date64.arrow +0 -0
  65. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/arrow/dict.arrow +0 -0
  66. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/arrow/dict_update.arrow +0 -0
  67. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/arrow/int_float_str.arrow +0 -0
  68. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/arrow/int_float_str_file.arrow +0 -0
  69. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/arrow/int_float_str_update.arrow +0 -0
  70. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/object_sequence.py +0 -0
  71. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/test_delete.py +0 -0
  72. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/test_join.py +0 -0
  73. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/test_leaks.py +0 -0
  74. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/test_on_remove.py +0 -0
  75. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/test_ports.py +0 -0
  76. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/test_remove.py +0 -0
  77. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/test_table.py +0 -0
  78. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/test_table_arrow.py +0 -0
  79. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/test_table_arrow_nested.py +0 -0
  80. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/test_table_datetime.py +0 -0
  81. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/test_table_infer.py +0 -0
  82. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/test_table_limit.py +0 -0
  83. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/test_table_numpy.py +0 -0
  84. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/test_table_page_to_disk.py +0 -0
  85. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/test_table_pandas.py +0 -0
  86. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/test_table_polars.py +0 -0
  87. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/test_to_arrow_lz4.py +0 -0
  88. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/test_to_arrow_zstd.py +0 -0
  89. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/test_to_polars.py +0 -0
  90. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/test_update.py +0 -0
  91. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/test_update_arrow.py +0 -0
  92. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/table/test_update_pandas.py +0 -0
  93. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/test_dependencies.py +0 -0
  94. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/viewer/__init__.py +0 -0
  95. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/viewer/test_viewer.py +0 -0
  96. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/virtual_servers/__init__.py +0 -0
  97. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/virtual_servers/test_coerce_types.py +0 -0
  98. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/widget/__init__.py +0 -0
  99. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/widget/test_anywidget_smoke.py +0 -0
  100. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/widget/test_widget.py +0 -0
  101. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/widget/test_widget_html_export.py +0 -0
  102. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/tests/widget/test_widget_pandas.py +0 -0
  103. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/widget/__init__.py +0 -0
  104. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/widget/viewer/__init__.py +0 -0
  105. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/widget/viewer/viewer.py +0 -0
  106. {perspective_python-5.5.1 → perspective_python-5.6.0}/perspective/widget/viewer/viewer_traitlets.py +0 -0
  107. {perspective_python-5.5.1/perspective_python-5.5.1.data → perspective_python-5.6.0/perspective_python-5.6.0.data}/data/share/jupyter/labextensions/@perspective-dev/jupyterlab/install.json +0 -0
  108. {perspective_python-5.5.1/perspective_python-5.5.1.data → perspective_python-5.6.0/perspective_python-5.6.0.data}/data/share/jupyter/labextensions/@perspective-dev/jupyterlab/static/style.js +0 -0
  109. {perspective_python-5.5.1/perspective_python-5.5.1.data → perspective_python-5.6.0/perspective_python-5.6.0.data}/data/share/jupyter/labextensions/@perspective-dev/jupyterlab/static/third-party-licenses.json +0 -0
  110. {perspective_python-5.5.1 → perspective_python-5.6.0}/src/client/mod.rs +0 -0
  111. {perspective_python-5.5.1 → perspective_python-5.6.0}/src/client/pandas.rs +0 -0
  112. {perspective_python-5.5.1 → perspective_python-5.6.0}/src/client/polars.rs +0 -0
  113. {perspective_python-5.5.1 → perspective_python-5.6.0}/src/client/proxy_session.rs +0 -0
  114. {perspective_python-5.5.1 → perspective_python-5.6.0}/src/client/pyarrow.rs +0 -0
  115. {perspective_python-5.5.1 → perspective_python-5.6.0}/src/client/update_data.rs +0 -0
  116. {perspective_python-5.5.1 → perspective_python-5.6.0}/src/lib.rs +0 -0
  117. {perspective_python-5.5.1 → perspective_python-5.6.0}/src/py_async.rs +0 -0
  118. {perspective_python-5.5.1 → perspective_python-5.6.0}/src/py_err.rs +0 -0
  119. {perspective_python-5.5.1 → perspective_python-5.6.0}/src/server/mod.rs +0 -0
  120. {perspective_python-5.5.1 → perspective_python-5.6.0}/src/server/server_async.rs +0 -0
  121. {perspective_python-5.5.1 → perspective_python-5.6.0}/src/server/server_sync.rs +0 -0
  122. {perspective_python-5.5.1 → perspective_python-5.6.0}/src/server/session_async.rs +0 -0
  123. {perspective_python-5.5.1 → perspective_python-5.6.0}/src/server/session_sync.rs +0 -0
@@ -12,14 +12,16 @@
12
12
 
13
13
  [package]
14
14
  name = "perspective-python"
15
- version = "5.5.1"
15
+ version = "5.6.0"
16
16
  edition = "2024"
17
- description = "A data visualization and analytics component, especially well-suited for large and/or streaming datasets."
17
+ description = "Interactive data grid, pivot table and charts for large, real-time and streaming datasets, with a Jupyter widget and WebSocket server."
18
18
  repository = "https://github.com/perspective-dev/perspective"
19
19
  license = "Apache-2.0"
20
20
  homepage = "https://perspective-dev.github.io"
21
21
  authors = ["Andrew Stein <steinlink@gmail.com>"]
22
- keywords = []
22
+ keywords = ["datagrid", "visualization", "streaming", "jupyter", "python"]
23
+ categories = ["visualization", "wasm", "science"]
24
+ documentation = "https://docs.rs/perspective-python"
23
25
  build = "build.rs"
24
26
  include = [
25
27
  "build.rs",
@@ -58,8 +60,8 @@ pyo3-build-config = "0.29.0"
58
60
  python-config-rs = "0.1.2"
59
61
 
60
62
  [dependencies]
61
- perspective-client = { version = "5.5.1" }
62
- perspective-server = { version = "5.5.1" }
63
+ perspective-client = { version = "5.6.0" }
64
+ perspective-server = { version = "5.6.0" }
63
65
  bytes = "1.10.1"
64
66
  chrono = "0.4"
65
67
  macro_rules_attribute = "0.2.2"
@@ -4980,14 +4980,14 @@ third_party_libraries:
4980
4980
 
4981
4981
  END OF TERMS AND CONDITIONS
4982
4982
  - package_name: perspective-client
4983
- package_version: 5.5.1
4983
+ package_version: 5.6.0
4984
4984
  repository: https://github.com/perspective-dev/perspective
4985
4985
  license: Apache-2.0
4986
4986
  licenses:
4987
4987
  - license: Apache-2.0
4988
4988
  text: "# Apache License\n\n_Version 2.0, January 2004_ \n_&lt;<http://www.apache.org/licenses/>&gt;_\n\n### Terms and Conditions for use, reproduction, and distribution\n\n#### 1. Definitions\n\n“License” shall mean the terms and conditions for use, reproduction, and\ndistribution as defined by Sections 1 through 9 of this document.\n\n“Licensor” shall mean the copyright owner or entity authorized by the copyright\nowner that is granting the License.\n\n“Legal Entity” shall mean the union of the acting entity and all other entities\nthat control, are controlled by, or are under common control with that entity.\nFor the purposes of this definition, “control” means **(i)** the power, direct or\nindirect, to cause the direction or management of such entity, whether by\ncontract or otherwise, or **(ii)** ownership of fifty percent (50%) or more of the\noutstanding shares, or **(iii)** beneficial ownership of such entity.\n\n“You” (or “Your”) shall mean an individual or Legal Entity exercising\npermissions granted by this License.\n\n“Source” form shall mean the preferred form for making modifications, including\nbut not limited to software source code, documentation source, and configuration\nfiles.\n\n“Object” form shall mean any form resulting from mechanical transformation or\ntranslation of a Source form, including but not limited to compiled object code,\ngenerated documentation, and conversions to other media types.\n\n“Work” shall mean the work of authorship, whether in Source or Object form, made\navailable under the License, as indicated by a copyright notice that is included\nin or attached to the work (an example is provided in the Appendix below).\n\n“Derivative Works” shall mean any work, whether in Source or Object form, that\nis based on (or derived from) the Work and for which the editorial revisions,\nannotations, elaborations, or other modifications represent, as a whole, an\noriginal work of authorship. For the purposes of this License, Derivative Works\nshall not include works that remain separable from, or merely link (or bind by\nname) to the interfaces of, the Work and Derivative Works thereof.\n\n“Contribution” shall mean any work of authorship, including the original version\nof the Work and any modifications or additions to that Work or Derivative Works\nthereof, that is intentionally submitted to Licensor for inclusion in the Work\nby the copyright owner or by an individual or Legal Entity authorized to submit\non behalf of the copyright owner. For the purposes of this definition,\n“submitted” means any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems, and\nissue tracking systems that are managed by, or on behalf of, the Licensor for\nthe purpose of discussing and improving the Work, but excluding communication\nthat is conspicuously marked or otherwise designated in writing by the copyright\nowner as “Not a Contribution.”\n\n“Contributor” shall mean Licensor and any individual or Legal Entity on behalf\nof whom a Contribution has been received by Licensor and subsequently\nincorporated within the Work.\n\n#### 2. Grant of Copyright License\n\nSubject to the terms and conditions of this License, each Contributor hereby\ngrants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,\nirrevocable copyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the Work and such\nDerivative Works in Source or Object form.\n\n#### 3. Grant of Patent License\n\nSubject to the terms and conditions of this License, each Contributor hereby\ngrants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,\nirrevocable (except as stated in this section) patent license to make, have\nmade, use, offer to sell, sell, import, and otherwise transfer the Work, where\nsuch license applies only to those patent claims licensable by such Contributor\nthat are necessarily infringed by their Contribution(s) alone or by combination\nof their Contribution(s) with the Work to which such Contribution(s) was\nsubmitted. If You institute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work or a\nContribution incorporated within the Work constitutes direct or contributory\npatent infringement, then any patent licenses granted to You under this License\nfor that Work shall terminate as of the date such litigation is filed.\n\n#### 4. Redistribution\n\nYou may reproduce and distribute copies of the Work or Derivative Works thereof\nin any medium, with or without modifications, and in Source or Object form,\nprovided that You meet the following conditions:\n\n- **(a)** You must give any other recipients of the Work or Derivative Works a copy of\n this License; and\n- **(b)** You must cause any modified files to carry prominent notices stating that You\n changed the files; and\n- **(c)** You must retain, in the Source form of any Derivative Works that You distribute,\n all copyright, patent, trademark, and attribution notices from the Source form\n of the Work, excluding those notices that do not pertain to any part of the\n Derivative Works; and\n- **(d)** If the Work includes a “NOTICE” text file as part of its distribution, then any\n Derivative Works that You distribute must include a readable copy of the\n attribution notices contained within such NOTICE file, excluding those notices\n that do not pertain to any part of the Derivative Works, in at least one of the\n following places: within a NOTICE text file distributed as part of the\n Derivative Works; within the Source form or documentation, if provided along\n with the Derivative Works; or, within a display generated by the Derivative\n Works, if and wherever such third-party notices normally appear. The contents of\n the NOTICE file are for informational purposes only and do not modify the\n License. You may add Your own attribution notices within Derivative Works that\n You distribute, alongside or as an addendum to the NOTICE text from the Work,\n provided that such additional attribution notices cannot be construed as\n modifying the License.\n\nYou may add Your own copyright statement to Your modifications and may provide\nadditional or different license terms and conditions for use, reproduction, or\ndistribution of Your modifications, or for any such Derivative Works as a whole,\nprovided Your use, reproduction, and distribution of the Work otherwise complies\nwith the conditions stated in this License.\n\n#### 5. Submission of Contributions\n\nUnless You explicitly state otherwise, any Contribution intentionally submitted\nfor inclusion in the Work by You to the Licensor shall be under the terms and\nconditions of this License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify the terms of\nany separate license agreement you may have executed with Licensor regarding\nsuch Contributions.\n\n#### 6. Trademarks\n\nThis License does not grant permission to use the trade names, trademarks,\nservice marks, or product names of the Licensor, except as required for\nreasonable and customary use in describing the origin of the Work and\nreproducing the content of the NOTICE file.\n\n#### 7. Disclaimer of Warranty\n\nUnless required by applicable law or agreed to in writing, Licensor provides the\nWork (and each Contributor provides its Contributions) on an “AS IS” BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,\nincluding, without limitation, any warranties or conditions of TITLE,\nNON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are\nsolely responsible for determining the appropriateness of using or\nredistributing the Work and assume any risks associated with Your exercise of\npermissions under this License.\n\n#### 8. Limitation of Liability\n\nIn no event and under no legal theory, whether in tort (including negligence),\ncontract, or otherwise, unless required by applicable law (such as deliberate\nand grossly negligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special, incidental,\nor consequential damages of any character arising as a result of this License or\nout of the use or inability to use the Work (including but not limited to\ndamages for loss of goodwill, work stoppage, computer failure or malfunction, or\nany and all other commercial damages or losses), even if such Contributor has\nbeen advised of the possibility of such damages.\n\n#### 9. Accepting Warranty or Additional Liability\n\nWhile redistributing the Work or Derivative Works thereof, You may choose to\noffer, and charge a fee for, acceptance of support, warranty, indemnity, or\nother liability obligations and/or rights consistent with this License. However,\nin accepting such obligations, You may act only on Your own behalf and on Your\nsole responsibility, not on behalf of any other Contributor, and only if You\nagree to indemnify, defend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason of your\naccepting any such warranty or additional liability.\n\n_END OF TERMS AND CONDITIONS_\n\n### APPENDIX: How to apply the Apache License to your work\n\nTo apply the Apache License to your work, attach the following boilerplate\nnotice, with the fields enclosed by brackets `[]` replaced with your own\nidentifying information. (Don't include the brackets!) The text should be\nenclosed in the appropriate comment syntax for the file format. We also\nrecommend that a file or class name and description of purpose be included on\nthe same “printed page” as the copyright notice for easier identification within\nthird-party archives.\n\n Copyright 2019 The Perspective Authors\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n"
4989
4989
  - package_name: perspective-server
4990
- package_version: 5.5.1
4990
+ package_version: 5.6.0
4991
4991
  repository: https://github.com/perspective-dev/perspective
4992
4992
  license: Apache-2.0
4993
4993
  licenses:
@@ -0,0 +1,126 @@
1
+ Metadata-Version: 2.3
2
+ Name: perspective-python
3
+ Version: 5.6.0
4
+ Classifier: Development Status :: 5 - Production/Stable
5
+ Classifier: Intended Audience :: Developers
6
+ Classifier: Intended Audience :: Financial and Insurance Industry
7
+ Classifier: Intended Audience :: Science/Research
8
+ Classifier: Topic :: Scientific/Engineering :: Visualization
9
+ Classifier: Topic :: Scientific/Engineering :: Information Analysis
10
+ Classifier: Topic :: Office/Business :: Financial
11
+ Classifier: Programming Language :: Rust
12
+ Classifier: Programming Language :: Python :: Implementation :: CPython
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
+ Classifier: Framework :: Jupyter
21
+ Classifier: Framework :: Jupyter :: JupyterLab
22
+ Classifier: Framework :: Jupyter :: JupyterLab :: 3
23
+ Classifier: Framework :: Jupyter :: JupyterLab :: Extensions
24
+ Classifier: Framework :: Jupyter :: JupyterLab :: Extensions :: Prebuilt
25
+ Requires-Dist: anywidget>=0.9 ; extra == 'jupyter'
26
+ Requires-Dist: tornado>=5,<7 ; extra == 'tornado'
27
+ Requires-Dist: aiohttp>=2,<4 ; extra == 'aiohttp'
28
+ Requires-Dist: starlette<1 ; extra == 'starlette'
29
+ Provides-Extra: jupyter
30
+ Provides-Extra: tornado
31
+ Provides-Extra: aiohttp
32
+ Provides-Extra: starlette
33
+ Summary: Interactive data grid, pivot table and charts for large, real-time and streaming datasets, with a Jupyter widget and WebSocket server.
34
+ Keywords: datagrid,pivot,visualization,analytics,dashboard,jupyter,anywidget,streaming,real-time,arrow,pandas,polars,duckdb,webassembly
35
+ Home-page: https://perspective-dev.github.io
36
+ Author: Andrew Stein <steinlink@gmail.com>
37
+ Author-email: Andrew Stein <steinlink@gmail.com>
38
+ License: Apache-2.0
39
+ Requires-Python: >=3.9
40
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
41
+ Project-URL: Homepage, https://perspective-dev.github.io
42
+ Project-URL: Documentation, https://perspective-dev.github.io/guide/
43
+ Project-URL: Repository, https://github.com/perspective-dev/perspective
44
+ Project-URL: Issues, https://github.com/perspective-dev/perspective/issues
45
+ Project-URL: Changelog, https://github.com/perspective-dev/perspective/blob/master/CHANGELOG.md
46
+
47
+ # `perspective-python`
48
+
49
+ [![PyPI](https://img.shields.io/pypi/v/perspective-python.svg?style=for-the-badge)](https://pypi.org/project/perspective-python/)
50
+
51
+ Perspective is an open-source data grid, pivot table and charting component for
52
+ large, real-time and streaming datasets.
53
+
54
+ `perspective-python` is the Python distribution of Perspective:
55
+
56
+ - A streaming query engine — `Table` and `View` — with incremental pivots,
57
+ aggregates, filters, expressions and joins, reading and writing
58
+ [Apache Arrow](https://arrow.apache.org/), CSV, JSON, `pandas`, `polars` and
59
+ `pyarrow`. Tables can be memory-mapped from disk with `page_to_disk=True`
60
+ to exceed available memory.
61
+ - `PerspectiveWidget`, an interactive data grid, pivot table and charting
62
+ widget for JupyterLab, Jupyter Notebook, VS Code notebooks, Google Colab and
63
+ marimo, built on [anywidget](https://anywidget.dev/).
64
+ - WebSocket handlers for Tornado, Starlette (FastAPI) and aiohttp, which serve
65
+ real-time dashboards to `<perspective-viewer>` in the browser.
66
+ - Virtual servers which run the same UI directly against DuckDB, ClickHouse,
67
+ PostgreSQL and Polars, with no data copy.
68
+
69
+ ## Installation
70
+
71
+ ```bash
72
+ pip install perspective-python
73
+ ```
74
+
75
+ For notebooks, install the `jupyter` extra:
76
+
77
+ ```bash
78
+ pip install "perspective-python[jupyter]"
79
+ ```
80
+
81
+ ## An interactive pivot table in Jupyter
82
+
83
+ ```python
84
+ import pandas as pd
85
+ from perspective.widget import PerspectiveWidget
86
+
87
+ df = pd.read_csv("superstore.csv")
88
+ PerspectiveWidget(df, plugin="Y Bar", group_by=["Region"], columns=["Sales"])
89
+ ```
90
+
91
+ ## A streaming `Table`
92
+
93
+ ```python
94
+ import perspective
95
+
96
+ server = perspective.Server()
97
+ client = server.new_local_client()
98
+ table = client.table({"symbol": "string", "price": "float"}, name="prices")
99
+ table.update([{"symbol": "AAPL", "price": 189.5}])
100
+ ```
101
+
102
+ ## A real-time dashboard server
103
+
104
+ ```python
105
+ import tornado.ioloop
106
+ import tornado.web
107
+ from perspective.handlers.tornado import PerspectiveTornadoHandler
108
+
109
+ app = tornado.web.Application([
110
+ (r"/websocket", PerspectiveTornadoHandler, {"perspective_server": server}),
111
+ ])
112
+
113
+ app.listen(8888)
114
+ tornado.ioloop.IOLoop.current().start()
115
+ ```
116
+
117
+ Any number of browser clients can then open the `prices` table over WebSocket
118
+ and receive every `update()` as it happens.
119
+
120
+ ## Documentation
121
+
122
+ - [Project site and live examples](https://perspective-dev.github.io/)
123
+ - [User guide](https://perspective-dev.github.io/guide/)
124
+ - [Example gallery](https://perspective-dev.github.io/gallery/index.html)
125
+ - [GitHub](https://github.com/perspective-dev/perspective)
126
+ - [Python API reference](https://perspective-dev.github.io/python/index.html)
@@ -0,0 +1,80 @@
1
+ # `perspective-python`
2
+
3
+ [![PyPI](https://img.shields.io/pypi/v/perspective-python.svg?style=for-the-badge)](https://pypi.org/project/perspective-python/)
4
+
5
+ Perspective is an open-source data grid, pivot table and charting component for
6
+ large, real-time and streaming datasets.
7
+
8
+ `perspective-python` is the Python distribution of Perspective:
9
+
10
+ - A streaming query engine — `Table` and `View` — with incremental pivots,
11
+ aggregates, filters, expressions and joins, reading and writing
12
+ [Apache Arrow](https://arrow.apache.org/), CSV, JSON, `pandas`, `polars` and
13
+ `pyarrow`. Tables can be memory-mapped from disk with `page_to_disk=True`
14
+ to exceed available memory.
15
+ - `PerspectiveWidget`, an interactive data grid, pivot table and charting
16
+ widget for JupyterLab, Jupyter Notebook, VS Code notebooks, Google Colab and
17
+ marimo, built on [anywidget](https://anywidget.dev/).
18
+ - WebSocket handlers for Tornado, Starlette (FastAPI) and aiohttp, which serve
19
+ real-time dashboards to `<perspective-viewer>` in the browser.
20
+ - Virtual servers which run the same UI directly against DuckDB, ClickHouse,
21
+ PostgreSQL and Polars, with no data copy.
22
+
23
+ ## Installation
24
+
25
+ ```bash
26
+ pip install perspective-python
27
+ ```
28
+
29
+ For notebooks, install the `jupyter` extra:
30
+
31
+ ```bash
32
+ pip install "perspective-python[jupyter]"
33
+ ```
34
+
35
+ ## An interactive pivot table in Jupyter
36
+
37
+ ```python
38
+ import pandas as pd
39
+ from perspective.widget import PerspectiveWidget
40
+
41
+ df = pd.read_csv("superstore.csv")
42
+ PerspectiveWidget(df, plugin="Y Bar", group_by=["Region"], columns=["Sales"])
43
+ ```
44
+
45
+ ## A streaming `Table`
46
+
47
+ ```python
48
+ import perspective
49
+
50
+ server = perspective.Server()
51
+ client = server.new_local_client()
52
+ table = client.table({"symbol": "string", "price": "float"}, name="prices")
53
+ table.update([{"symbol": "AAPL", "price": 189.5}])
54
+ ```
55
+
56
+ ## A real-time dashboard server
57
+
58
+ ```python
59
+ import tornado.ioloop
60
+ import tornado.web
61
+ from perspective.handlers.tornado import PerspectiveTornadoHandler
62
+
63
+ app = tornado.web.Application([
64
+ (r"/websocket", PerspectiveTornadoHandler, {"perspective_server": server}),
65
+ ])
66
+
67
+ app.listen(8888)
68
+ tornado.ioloop.IOLoop.current().start()
69
+ ```
70
+
71
+ Any number of browser clients can then open the `prices` table over WebSocket
72
+ and receive every `update()` as it happens.
73
+
74
+ ## Documentation
75
+
76
+ - [Project site and live examples](https://perspective-dev.github.io/)
77
+ - [User guide](https://perspective-dev.github.io/guide/)
78
+ - [Example gallery](https://perspective-dev.github.io/gallery/index.html)
79
+ - [GitHub](https://github.com/perspective-dev/perspective)
80
+ - [Python API reference](https://perspective-dev.github.io/python/index.html)
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@perspective-dev/python",
3
- "version": "5.5.1",
3
+ "version": "5.6.0",
4
4
  "description": "",
5
5
  "private": true,
6
6
  "repository": {
@@ -10,7 +10,7 @@
10
10
  # ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
11
11
  # ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
12
12
 
13
- __version__ = "5.5.1"
13
+ __version__ = "5.6.0"
14
14
  __all__ = [
15
15
  "_jupyter_labextension_paths",
16
16
  "Server",
@@ -0,0 +1,33 @@
1
+ # ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
2
+ # ┃ ██████ ██████ ██████ █ █ █ █ █ █▄ ▀███ █ ┃
3
+ # ┃ ▄▄▄▄▄█ █▄▄▄▄▄ ▄▄▄▄▄█ ▀▀▀▀▀█▀▀▀▀▀ █ ▀▀▀▀▀█ ████████▌▐███ ███▄ ▀█ █ ▀▀▀▀▀ ┃
4
+ # ┃ █▀▀▀▀▀ █▀▀▀▀▀ █▀██▀▀ ▄▄▄▄▄ █ ▄▄▄▄▄█ ▄▄▄▄▄█ ████████▌▐███ █████▄ █ ▄▄▄▄▄ ┃
5
+ # ┃ █ ██████ █ ▀█▄ █ ██████ █ ███▌▐███ ███████▄ █ ┃
6
+ # ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
7
+ # ┃ Copyright (c) 2017, the Perspective Authors. ┃
8
+ # ┃ ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ ┃
9
+ # ┃ This file is part of the Perspective library, distributed under the terms ┃
10
+ # ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
11
+ # ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
12
+
13
+
14
+ def joined_column_paths(view, **window):
15
+ """A View's column paths as "|"-joined strings.
16
+
17
+ For the many tests whose subject is which columns exist in what order
18
+ rather than the typed values `column_paths` now returns. Tests of
19
+ `column_paths` itself assert the area directly - this helper is
20
+ deliberately lossy in the same way the old wire format was, so it must
21
+ not be used to pin a split value's type or rendering.
22
+ """
23
+ area = view.column_paths(**window)
24
+ width = len(area[-1]) if area else 0
25
+ out = []
26
+ for x in range(width):
27
+ parts = [
28
+ str(area[level][x])
29
+ for level in range(len(area))
30
+ if area[level][x] is not None
31
+ ]
32
+ out.append("|".join(parts))
33
+ return out
@@ -0,0 +1,103 @@
1
+ # ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
2
+ # ┃ ██████ ██████ ██████ █ █ █ █ █ █▄ ▀███ █ ┃
3
+ # ┃ ▄▄▄▄▄█ █▄▄▄▄▄ ▄▄▄▄▄█ ▀▀▀▀▀█▀▀▀▀▀ █ ▀▀▀▀▀█ ████████▌▐███ ███▄ ▀█ █ ▀▀▀▀▀ ┃
4
+ # ┃ █▀▀▀▀▀ █▀▀▀▀▀ █▀██▀▀ ▄▄▄▄▄ █ ▄▄▄▄▄█ ▄▄▄▄▄█ ████████▌▐███ █████▄ █ ▄▄▄▄▄ ┃
5
+ # ┃ █ ██████ █ ▀█▄ █ ██████ █ ███▌▐███ ███████▄ █ ┃
6
+ # ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
7
+ # ┃ Copyright (c) 2017, the Perspective Authors. ┃
8
+ # ┃ ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ ┃
9
+ # ┃ This file is part of the Perspective library, distributed under the terms ┃
10
+ # ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
11
+ # ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
12
+
13
+ from perspective import Server
14
+
15
+ import random
16
+ import threading
17
+
18
+
19
+ PARENTS = {
20
+ "flat": dict(filter=[["y", ">", 2]]),
21
+ "group_by": dict(
22
+ group_by=["g"],
23
+ columns=["x", "y"],
24
+ aggregates={"x": "sum", "y": "mean"},
25
+ group_rollup_mode="flat",
26
+ ),
27
+ "split_by": dict(
28
+ group_by=["g"],
29
+ split_by=["s"],
30
+ columns=["x"],
31
+ group_rollup_mode="flat",
32
+ ),
33
+ }
34
+
35
+
36
+ def _row(rand, i):
37
+ return {
38
+ "id": i,
39
+ "g": rand.choice(["a", "b", "c", "d"]),
40
+ "s": rand.choice(["Mon", "Tue", "Wed"]),
41
+ "x": rand.randint(0, 4000) / 4,
42
+ "y": rand.randint(0, 9),
43
+ }
44
+
45
+
46
+ def _key(row):
47
+ return sorted((k, str(v)) for k, v in row.items())
48
+
49
+
50
+ def _run(config):
51
+ rand = random.Random(7)
52
+ client = Server().new_local_client()
53
+ table = client.table(
54
+ {"id": "integer", "g": "string", "s": "string", "x": "float", "y": "integer"},
55
+ index="id",
56
+ )
57
+
58
+ table.update([_row(rand, i) for i in range(60)])
59
+ view = table.view(**config)
60
+ derived = client.table(view)
61
+ child = derived.view()
62
+ errors = []
63
+ done = threading.Event()
64
+
65
+ def read():
66
+ try:
67
+ while not done.is_set():
68
+ child.to_columns()
69
+ derived.size()
70
+ except Exception as e:
71
+ errors.append(e)
72
+
73
+ readers = [threading.Thread(target=read) for _ in range(4)]
74
+ for reader in readers:
75
+ reader.start()
76
+
77
+ try:
78
+ for _ in range(500):
79
+ if rand.random() < 0.2:
80
+ table.remove([rand.randint(0, 59) for _ in range(3)])
81
+ else:
82
+ table.update([_row(rand, rand.randint(0, 59)) for _ in range(4)])
83
+ finally:
84
+ done.set()
85
+ for reader in readers:
86
+ reader.join()
87
+
88
+ assert errors == []
89
+ fresh = client.table(view)
90
+ expected = fresh.view().to_records()
91
+ actual = child.to_records()
92
+ assert sorted(map(_key, actual)) == sorted(map(_key, expected))
93
+
94
+
95
+ class TestDerivedTableThreaded(object):
96
+ def test_flat_parent(self):
97
+ _run(PARENTS["flat"])
98
+
99
+ def test_group_by_parent(self):
100
+ _run(PARENTS["group_by"])
101
+
102
+ def test_split_by_parent(self):
103
+ _run(PARENTS["split_by"])
@@ -253,3 +253,41 @@ class TestServer(object):
253
253
  executor.shutdown()
254
254
 
255
255
  assert checked > 0
256
+
257
+ def test_concurrent_flat_view_reads_are_threadsafe(self):
258
+ client = Server().new_local_client()
259
+ table = client.table(
260
+ {"a": "integer", "b": "string", "index": "integer"}, index="index"
261
+ )
262
+ table.update(
263
+ [{"a": i, "b": ascii_letters[i % 52], "index": i} for i in range(60)]
264
+ )
265
+ for config in ({}, {"filter": [["a", ">", 2]]}):
266
+ view = table.view(**config)
267
+ errors = []
268
+ stop = threading.Event()
269
+
270
+ def read():
271
+ try:
272
+ while not stop.is_set():
273
+ view.column_paths()
274
+ view.to_columns()
275
+ view.to_arrow()
276
+ except Exception as e:
277
+ errors.append(e)
278
+
279
+ readers = [threading.Thread(target=read) for _ in range(8)]
280
+ for reader in readers:
281
+ reader.start()
282
+
283
+ try:
284
+ for i in range(300):
285
+ table.update([{"a": i, "b": "z", "index": i % 60}])
286
+ finally:
287
+ stop.set()
288
+ for reader in readers:
289
+ reader.join()
290
+
291
+ assert errors == []
292
+ assert view.num_rows() == len(view.to_columns()["a"])
293
+ view.delete()
@@ -20,7 +20,7 @@ class TestViewColumnPaths:
20
20
  tbl = client.table(superstore)
21
21
  view = tbl.view()
22
22
  paths = view.column_paths()
23
- assert paths == [
23
+ assert paths == [[
24
24
  "index",
25
25
  "Row ID",
26
26
  "Order ID",
@@ -41,7 +41,7 @@ class TestViewColumnPaths:
41
41
  "Quantity",
42
42
  "Discount",
43
43
  "Profit",
44
- ]
44
+ ]]
45
45
 
46
46
  view.delete()
47
47
  tbl.delete()
@@ -51,9 +51,8 @@ class TestViewColumnPaths:
51
51
  view = tbl.view(group_by=["State"], columns=["Sales"], split_by=["Ship Mode"])
52
52
  paths = view.column_paths()
53
53
  assert paths == [
54
- "First Class|Sales",
55
- "Second Class|Sales",
56
- "Standard Class|Sales",
54
+ ["First Class", "Second Class", "Standard Class"],
55
+ ["Sales", "Sales", "Sales"],
57
56
  ]
58
57
 
59
58
  view.delete()
@@ -64,15 +63,16 @@ class TestViewColumnPaths:
64
63
  view = tbl.view(group_by=["State"], columns=["Sales"], split_by=["Ship Mode"])
65
64
  paths = view.column_paths(start_col=1)
66
65
  assert paths == [
67
- "Second Class|Sales",
68
- "Standard Class|Sales",
66
+ ["Second Class", "Standard Class"],
67
+ ["Sales", "Sales"],
69
68
  ]
70
69
 
71
70
  view.delete()
72
71
  view = tbl.view(group_by=["State"], columns=["Sales"], split_by=["Ship Mode"])
73
72
  paths = view.column_paths(start_col=1, end_col=2)
74
73
  assert paths == [
75
- "Second Class|Sales",
74
+ ["Second Class"],
75
+ ["Sales"],
76
76
  ]
77
77
 
78
78
  view.delete()
@@ -80,7 +80,8 @@ class TestViewColumnPaths:
80
80
  view = tbl.view(group_by=["State"], columns=["Sales"], split_by=["Ship Mode"])
81
81
  paths = view.column_paths(end_col=1)
82
82
  assert paths == [
83
- "First Class|Sales",
83
+ ["First Class"],
84
+ ["Sales"],
84
85
  ]
85
86
 
86
87
  view.delete()