perspective-python 3.7.1__tar.gz → 3.7.2__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 (98) hide show
  1. {perspective_python-3.7.1 → perspective_python-3.7.2}/Cargo.toml +3 -3
  2. {perspective_python-3.7.1 → perspective_python-3.7.2}/LICENSE_THIRDPARTY_cargo.yml +2 -2
  3. {perspective_python-3.7.1 → perspective_python-3.7.2}/PKG-INFO +1 -1
  4. {perspective_python-3.7.1 → perspective_python-3.7.2}/package.json +3 -2
  5. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/__init__.py +9 -4
  6. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/handlers/aiohttp.py +9 -8
  7. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/handlers/starlette.py +12 -11
  8. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/handlers/tornado.py +18 -16
  9. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/widget/__init__.py +61 -63
  10. {perspective_python-3.7.1/perspective_python-3.7.1.data → perspective_python-3.7.2/perspective_python-3.7.2.data}/data/share/jupyter/labextensions/@finos/perspective-jupyterlab/package.json +2 -2
  11. perspective_python-3.7.2/perspective_python-3.7.2.data/data/share/jupyter/labextensions/@finos/perspective-jupyterlab/static/253.bd5b70fcb9496ba1b887.js +16 -0
  12. perspective_python-3.7.2/perspective_python-3.7.2.data/data/share/jupyter/labextensions/@finos/perspective-jupyterlab/static/253.bd5b70fcb9496ba1b887.js.LICENSE.txt +63 -0
  13. perspective_python-3.7.2/perspective_python-3.7.2.data/data/share/jupyter/labextensions/@finos/perspective-jupyterlab/static/815.de1b4b53d57212354a6c.js +1 -0
  14. perspective_python-3.7.1/perspective_python-3.7.1.data/data/share/jupyter/labextensions/@finos/perspective-jupyterlab/static/remoteEntry.291ac484cbc97290fd3f.js → perspective_python-3.7.2/perspective_python-3.7.2.data/data/share/jupyter/labextensions/@finos/perspective-jupyterlab/static/remoteEntry.6c620635cc748d645b1d.js +1 -1
  15. {perspective_python-3.7.1 → perspective_python-3.7.2}/pyproject.toml +1 -1
  16. {perspective_python-3.7.1 → perspective_python-3.7.2}/src/client/client_async.rs +7 -6
  17. {perspective_python-3.7.1 → perspective_python-3.7.2}/src/client/client_sync.rs +204 -11
  18. {perspective_python-3.7.1 → perspective_python-3.7.2}/src/client/table_data.rs +1 -1
  19. {perspective_python-3.7.1 → perspective_python-3.7.2}/src/lib.rs +7 -2
  20. {perspective_python-3.7.1 → perspective_python-3.7.2}/src/py_err.rs +1 -1
  21. {perspective_python-3.7.1 → perspective_python-3.7.2}/src/server/server_async.rs +5 -4
  22. {perspective_python-3.7.1 → perspective_python-3.7.2}/src/server/server_sync.rs +38 -19
  23. {perspective_python-3.7.1 → perspective_python-3.7.2}/src/server/session_async.rs +1 -1
  24. {perspective_python-3.7.1 → perspective_python-3.7.2}/src/server/session_sync.rs +4 -4
  25. perspective_python-3.7.1/perspective_python-3.7.1.data/data/share/jupyter/labextensions/@finos/perspective-jupyterlab/static/253.68e8d46c0241772e85f9.js +0 -16
  26. perspective_python-3.7.1/perspective_python-3.7.1.data/data/share/jupyter/labextensions/@finos/perspective-jupyterlab/static/253.68e8d46c0241772e85f9.js.LICENSE.txt +0 -59
  27. perspective_python-3.7.1/perspective_python-3.7.1.data/data/share/jupyter/labextensions/@finos/perspective-jupyterlab/static/985.db6bcc3586aa631e772d.js +0 -1
  28. {perspective_python-3.7.1 → perspective_python-3.7.2}/LICENSE.md +0 -0
  29. {perspective_python-3.7.1 → perspective_python-3.7.2}/README.md +0 -0
  30. {perspective_python-3.7.1 → perspective_python-3.7.2}/build.rs +0 -0
  31. {perspective_python-3.7.1 → perspective_python-3.7.2}/docs/index.html +0 -0
  32. {perspective_python-3.7.1 → perspective_python-3.7.2}/docs/lib.md +0 -0
  33. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/extension/finos-perspective-nbextension.json +0 -0
  34. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/handlers/__init__.py +0 -0
  35. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/templates/exported_widget.html.template +0 -0
  36. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/__init__.py +0 -0
  37. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/async/test_async_client.py +0 -0
  38. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/async/test_websocket_client.py +0 -0
  39. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/conftest.py +0 -0
  40. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/core/__init__.py +0 -0
  41. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/core/test_async.py +0 -0
  42. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/multi_threaded/__init__.py +0 -0
  43. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/multi_threaded/test_multi_threaded.py +0 -0
  44. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/server/__init__.py +0 -0
  45. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/server/test_server.py +0 -0
  46. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/server/test_session.py +0 -0
  47. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/table/__init__.py +0 -0
  48. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/table/arrow/date32.arrow +0 -0
  49. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/table/arrow/date64.arrow +0 -0
  50. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/table/arrow/dict.arrow +0 -0
  51. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/table/arrow/dict_update.arrow +0 -0
  52. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/table/arrow/int_float_str.arrow +0 -0
  53. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/table/arrow/int_float_str_file.arrow +0 -0
  54. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/table/arrow/int_float_str_update.arrow +0 -0
  55. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/table/object_sequence.py +0 -0
  56. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/table/test_delete.py +0 -0
  57. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/table/test_exception.py +0 -0
  58. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/table/test_leaks.py +0 -0
  59. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/table/test_ports.py +0 -0
  60. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/table/test_remove.py +0 -0
  61. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/table/test_table.py +0 -0
  62. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/table/test_table_arrow.py +0 -0
  63. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/table/test_table_datetime.py +0 -0
  64. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/table/test_table_infer.py +0 -0
  65. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/table/test_table_limit.py +0 -0
  66. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/table/test_table_numpy.py +0 -0
  67. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/table/test_table_pandas.py +0 -0
  68. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/table/test_table_polars.py +0 -0
  69. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/table/test_to_arrow.py +0 -0
  70. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/table/test_to_arrow_lz4.py +0 -0
  71. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/table/test_to_format.py +0 -0
  72. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/table/test_to_polars.py +0 -0
  73. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/table/test_update.py +0 -0
  74. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/table/test_update_arrow.py +0 -0
  75. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/table/test_update_pandas.py +0 -0
  76. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/table/test_view.py +0 -0
  77. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/table/test_view_expression.py +0 -0
  78. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/test_dependencies.py +0 -0
  79. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/viewer/__init__.py +0 -0
  80. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/viewer/test_viewer.py +0 -0
  81. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/widget/__init__.py +0 -0
  82. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/widget/test_widget.py +0 -0
  83. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/tests/widget/test_widget_pandas.py +0 -0
  84. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/widget/viewer/__init__.py +0 -0
  85. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/widget/viewer/validate.py +0 -0
  86. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/widget/viewer/viewer.py +0 -0
  87. {perspective_python-3.7.1 → perspective_python-3.7.2}/perspective/widget/viewer/viewer_traitlets.py +0 -0
  88. {perspective_python-3.7.1/perspective_python-3.7.1.data → perspective_python-3.7.2/perspective_python-3.7.2.data}/data/share/jupyter/labextensions/@finos/perspective-jupyterlab/install.json +0 -0
  89. {perspective_python-3.7.1/perspective_python-3.7.1.data → perspective_python-3.7.2/perspective_python-3.7.2.data}/data/share/jupyter/labextensions/@finos/perspective-jupyterlab/static/style.js +0 -0
  90. {perspective_python-3.7.1/perspective_python-3.7.1.data → perspective_python-3.7.2/perspective_python-3.7.2.data}/data/share/jupyter/labextensions/@finos/perspective-jupyterlab/static/third-party-licenses.json +0 -0
  91. {perspective_python-3.7.1 → perspective_python-3.7.2}/src/client/mod.rs +0 -0
  92. {perspective_python-3.7.1 → perspective_python-3.7.2}/src/client/pandas.rs +0 -0
  93. {perspective_python-3.7.1 → perspective_python-3.7.2}/src/client/polars.rs +0 -0
  94. {perspective_python-3.7.1 → perspective_python-3.7.2}/src/client/proxy_session.rs +0 -0
  95. {perspective_python-3.7.1 → perspective_python-3.7.2}/src/client/pyarrow.rs +0 -0
  96. {perspective_python-3.7.1 → perspective_python-3.7.2}/src/client/update_data.rs +0 -0
  97. {perspective_python-3.7.1 → perspective_python-3.7.2}/src/py_async.rs +0 -0
  98. {perspective_python-3.7.1 → perspective_python-3.7.2}/src/server/mod.rs +0 -0
@@ -12,7 +12,7 @@
12
12
 
13
13
  [package]
14
14
  name = "perspective-python"
15
- version = "3.7.1"
15
+ version = "3.7.2"
16
16
  edition = "2024"
17
17
  description = "A data visualization and analytics component, especially well-suited for large and/or streaming datasets."
18
18
  repository = "https://github.com/finos/perspective"
@@ -57,8 +57,8 @@ pyo3-build-config = "0.22.6"
57
57
  python-config-rs = "0.1.2"
58
58
 
59
59
  [dependencies]
60
- perspective-client = { version = "3.7.1" }
61
- perspective-server = { version = "3.7.1" }
60
+ perspective-client = { version = "3.7.2" }
61
+ perspective-server = { version = "3.7.2" }
62
62
  macro_rules_attribute = "0.2.0"
63
63
  async-lock = "2.5.0"
64
64
  pollster = "0.3.0"
@@ -2911,14 +2911,14 @@ third_party_libraries:
2911
2911
 
2912
2912
  END OF TERMS AND CONDITIONS
2913
2913
  - package_name: perspective-client
2914
- package_version: 3.7.1
2914
+ package_version: 3.7.2
2915
2915
  repository: https://github.com/finos/perspective
2916
2916
  license: Apache-2.0
2917
2917
  licenses:
2918
2918
  - license: Apache-2.0
2919
2919
  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"
2920
2920
  - package_name: perspective-server
2921
- package_version: 3.7.1
2921
+ package_version: 3.7.2
2922
2922
  repository: https://github.com/finos/perspective
2923
2923
  license: Apache-2.0
2924
2924
  licenses:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: perspective-python
3
- Version: 3.7.1
3
+ Version: 3.7.2
4
4
  Classifier: Development Status :: 5 - Production/Stable
5
5
  Classifier: Programming Language :: Rust
6
6
  Classifier: Programming Language :: Python :: Implementation :: CPython
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finos/perspective-python",
3
- "version": "3.7.1",
3
+ "version": "3.7.2",
4
4
  "description": "",
5
5
  "private": true,
6
6
  "repository": {
@@ -12,7 +12,8 @@
12
12
  "scripts": {
13
13
  "build": "node build.mjs",
14
14
  "clean": "rimraf *.data && rimraf dist && rimraf build",
15
- "test": "node test.mjs"
15
+ "test": "node test.mjs",
16
+ "docs": "pdoc perspective/__init__.py perspective/handlers/aiohttp.py, perspective/handlers/starlette.py perspective/handlers/tornado.py perspective/widget/__init__.py -o ../../docs/static/python && node docs.mjs"
16
17
  },
17
18
  "devDependencies": {
18
19
  "@finos/perspective-scripts": "workspace:*",
@@ -10,11 +10,13 @@
10
10
  # ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
11
11
  # ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
12
12
 
13
- __version__ = "3.7.1"
13
+ __version__ = "3.7.2"
14
14
  __all__ = [
15
15
  "_jupyter_labextension_paths",
16
16
  "Server",
17
17
  "Client",
18
+ "Table",
19
+ "View",
18
20
  "PerspectiveError",
19
21
  "ProxySession",
20
22
  "AsyncClient",
@@ -29,8 +31,8 @@ from .perspective import (
29
31
  Client,
30
32
  PerspectiveError,
31
33
  ProxySession,
32
- PyServer as Server,
33
- PyAsyncServer as AsyncServer,
34
+ Server,
35
+ AsyncServer,
34
36
  AsyncClient,
35
37
  # NOTE: these are classes without constructors,
36
38
  # so we import them just for type hinting
@@ -60,6 +62,9 @@ def get_hosted_table_names(*args, **kwargs):
60
62
  return GLOBAL_CLIENT.get_hosted_table_names(*args, **kwargs)
61
63
 
62
64
 
63
- # Read by `jupyter labextension develop`
64
65
  def _jupyter_labextension_paths():
66
+ """
67
+ Read by `jupyter labextension develop`
68
+ @private
69
+ """
65
70
  return [{"src": "labextension", "dest": "@finos/perspective-jupyterlab"}]
@@ -16,7 +16,7 @@ import asyncio
16
16
 
17
17
 
18
18
  class PerspectiveAIOHTTPHandler(object):
19
- """PerspectiveAIOHTTPHandler is a drop-in implementation of Perspective.
19
+ """`PerspectiveAIOHTTPHandler` is a drop-in implementation of Perspective.
20
20
 
21
21
  Use it inside AIOHTTP routing to create a server-side Perspective that is
22
22
  ready to receive websocket messages from the front-end `perspective-viewer`.
@@ -24,14 +24,15 @@ class PerspectiveAIOHTTPHandler(object):
24
24
  The Perspective client and server will automatically keep the Websocket
25
25
  alive without timing out.
26
26
 
27
- Examples:
28
- >>> server = Server()
29
- >>> async def websocket_handler(request):
30
- ... handler = PerspectiveAIOHTTPHandler(perspective_server=server, request=request)
31
- ... await handler.run()
27
+ # Examples
32
28
 
33
- >>> app = web.Application()
34
- >>> app.router.add_get("/websocket", websocket_handler)
29
+ >>> server = Server()
30
+ >>> async def websocket_handler(request):
31
+ ... handler = PerspectiveAIOHTTPHandler(perspective_server=server, request=request)
32
+ ... await handler.run()
33
+
34
+ >>> app = web.Application()
35
+ >>> app.router.add_get("/websocket", websocket_handler)
35
36
  """
36
37
 
37
38
  def __init__(self, **kwargs):
@@ -15,17 +15,18 @@ import perspective
15
15
 
16
16
 
17
17
  class PerspectiveStarletteHandler(object):
18
- """PerspectiveStarletteHandler is a drop-in implementation of Perspective.
19
-
20
- Examples:
21
- >>> server = Server()
22
- >>> client = server.client()
23
- >>> client.table(pd.read_csv("superstore.csv"), name="data_source_one")
24
- >>> app = FastAPI()
25
- >>> async def endpoint(websocket: Websocket):
26
- ... handler = PerspectiveStarletteHandler(server, websocket)
27
- ... await handler.run()
28
- ... app.add_api_websocket_route('/websocket', endpoint)
18
+ """`PerspectiveStarletteHandler` is a drop-in implementation of Perspective.
19
+
20
+ # Examples
21
+
22
+ >>> server = Server()
23
+ >>> client = server.client()
24
+ >>> client.table(pd.read_csv("superstore.csv"), name="data_source_one")
25
+ >>> app = FastAPI()
26
+ >>> async def endpoint(websocket: Websocket):
27
+ ... handler = PerspectiveStarletteHandler(server, websocket)
28
+ ... await handler.run()
29
+ ... app.add_api_websocket_route('/websocket', endpoint)
29
30
  """
30
31
 
31
32
  def __init__(self, **kwargs):
@@ -27,22 +27,24 @@ class PerspectiveTornadoHandler(WebSocketHandler):
27
27
  to the `tornado.web.Application` constructor, as well as provide the
28
28
  `max_buffer_size` optional arg, for large datasets.
29
29
 
30
- Args:
31
- loop: An optional `IOLoop` instance to use for scheduling IO calls,
32
- defaults to `IOLoop.current()`.
33
- executor: An optional executor for scheduling `perspective.Server`
34
- message processing calls from websocket `Client`s.
35
-
36
- Examples:
37
- >>> server = psp.Server()
38
- >>> client = server.new_local_client()
39
- >>> client.table(pd.read_csv("superstore.csv"), name="data_source_one")
40
- >>> app = tornado.web.Application([
41
- ... (r"/", MainHandler),
42
- ... (r"/websocket", PerspectiveTornadoHandler, {
43
- ... "perspective_server": server,
44
- ... })
45
- ... ])
30
+ # Arguments
31
+
32
+ - `loop`: An optional `IOLoop` instance to use for scheduling IO calls,
33
+ defaults to `IOLoop.current()`.
34
+ - `executor`: An optional executor for scheduling `perspective.Server`
35
+ message processing calls from websocket `Client`s.
36
+
37
+ # Examples
38
+
39
+ >>> server = psp.Server()
40
+ >>> client = server.new_local_client()
41
+ >>> client.table(pd.read_csv("superstore.csv"), name="data_source_one")
42
+ >>> app = tornado.web.Application([
43
+ ... (r"/", MainHandler),
44
+ ... (r"/websocket", PerspectiveTornadoHandler, {
45
+ ... "perspective_server": server,
46
+ ... })
47
+ ... ])
46
48
  """
47
49
 
48
50
  def check_origin(self, origin):
@@ -28,36 +28,36 @@ __all__ = ["PerspectiveWidget"]
28
28
 
29
29
 
30
30
  class PerspectiveWidget(DOMWidget, PerspectiveViewer):
31
- """:class`~perspective.PerspectiveWidget` allows for Perspective to be used
32
- in the form of a Jupyter IPython widget.
31
+ """`PerspectiveWidget` allows for Perspective to be used as a Jupyter
32
+ widget.
33
33
 
34
34
  Using `perspective.Table`, you can create a widget that extends the full
35
35
  functionality of `perspective-viewer`. Changes on the viewer can be
36
- programatically set on the :class`~perspective.PerspectiveWidget` instance,
37
- and state is maintained across page refreshes.
38
-
39
- Examples:
40
- >>> from perspective.widget import PerspectiveWidget
41
- >>> data = {
42
- ... "a": [1, 2, 3],
43
- ... "b": [
44
- ... "2019/07/11 7:30PM",
45
- ... "2019/07/11 8:30PM",
46
- ... "2019/07/11 9:30PM"
47
- ... ]
48
- ... }
49
- >>> widget = PerspectiveWidget(
50
- ... data,
51
- ... group_by=["a"],
52
- ... sort=[["b", "desc"]],
53
- ... filter=[["a", ">", 1]]
54
- ... )
55
- >>> widget.sort
56
- [["b", "desc"]]
57
- >>> widget.sort.append(["a", "asc"])
58
- >>> widget.sort
59
- [["b", "desc"], ["a", "asc"]]
60
- >>> widget.table.update({"a": [4, 5]}) # Browser UI updates
36
+ programatically set on the `PerspectiveWidget` instance.
37
+
38
+ # Examples
39
+
40
+ >>> from perspective.widget import PerspectiveWidget
41
+ >>> data = {
42
+ ... "a": [1, 2, 3],
43
+ ... "b": [
44
+ ... "2019/07/11 7:30PM",
45
+ ... "2019/07/11 8:30PM",
46
+ ... "2019/07/11 9:30PM"
47
+ ... ]
48
+ ... }
49
+ >>> widget = PerspectiveWidget(
50
+ ... data,
51
+ ... group_by=["a"],
52
+ ... sort=[["b", "desc"]],
53
+ ... filter=[["a", ">", 1]]
54
+ ... )
55
+ >>> widget.sort
56
+ [["b", "desc"]]
57
+ >>> widget.sort.append(["a", "asc"])
58
+ >>> widget.sort
59
+ [["b", "desc"], ["a", "asc"]]
60
+ >>> widget.table.update({"a": [4, 5]}) # Browser UI updates
61
61
  """
62
62
 
63
63
  # Required by ipywidgets for proper registration of the backend
@@ -76,42 +76,38 @@ class PerspectiveWidget(DOMWidget, PerspectiveViewer):
76
76
  binding_mode="server",
77
77
  **kwargs,
78
78
  ):
79
- """Initialize an instance of :class`~perspective.PerspectiveWidget`
79
+ """Initialize an instance of `PerspectiveWidget`
80
80
  with the given table/data and viewer configuration.
81
81
 
82
- If a pivoted DataFrame or MultiIndex table is passed in, the widget
83
- preserves pivots and applies them. See `PerspectiveViewer.__init__` for
84
- arguments that transform the view shown in the widget.
85
-
86
82
  If an `AsyncTable` is passed in, then certain widget methods like
87
83
  `update()` and `delete()` return coroutines which must be awaited.
88
84
 
89
- Args:
90
- data (:obj:`Table`|:obj:`AsyncTable`|:obj:`dict`|:obj:`list`|:obj:`pandas.DataFrame`|:obj:`bytes`|:obj:`str`): a
91
- `perspective.Table` instance, a `perspective.AsyncTable` instance, or
92
- a dataset to be loaded in the widget.
85
+ # Arguments
93
86
 
94
- Keyword Arguments:
95
- index (:obj:`str`): A column name to be used as the primary key.
96
- Ignored if `server` is True.
87
+ - `data` (`Table`|`AsyncTable`|`dict`|`list`|`pandas.DataFrame`|`bytes`|`str`): a
88
+ `perspective.Table` instance, a `perspective.AsyncTable` instance, or
89
+ a dataset to be loaded in the widget.
97
90
 
98
- limit (:obj:`int`): A upper limit on the number of rows in the Table.
99
- Cannot be set at the same time as `index`, ignored if `server`
100
- is True.
91
+ # Keyword Arguments
101
92
 
102
- binding_mode (:obj:`str`): "client-server" or "server"
93
+ - `index` (`str`): A column name to be used as the primary key.
94
+ Ignored if `server` is True.
95
+ - `binding_mode` (`str`): "client-server" or "server"
96
+ - `limit` (`int`): A upper limit on the number of rows in the Table.
97
+ Cannot be set at the same time as `index`, ignored if `server`
98
+ is True.
99
+ - `kwargs` (`dict`): configuration options for the `PerspectiveViewer`,
100
+ and `Table` constructor if `data` is a dataset.
103
101
 
104
- kwargs (:obj:`dict`): configuration options for the `PerspectiveViewer`,
105
- and `Table` constructor if `data` is a dataset.
102
+ # Examples
106
103
 
107
- Examples:
108
- >>> widget = PerspectiveWidget(
109
- ... {"a": [1, 2, 3]},
110
- ... aggregates={"a": "avg"},
111
- ... group_by=["a"],
112
- ... sort=[["b", "desc"]],
113
- ... filter=[["a", ">", 1]],
114
- ... expressions=["\"a\" + 100"])
104
+ >>> widget = PerspectiveWidget(
105
+ ... {"a": [1, 2, 3]},
106
+ ... aggregates={"a": "avg"},
107
+ ... group_by=["a"],
108
+ ... sort=[["b", "desc"]],
109
+ ... filter=[["a", ">", 1]],
110
+ ... expressions=["\"a\" + 100"])
115
111
  """
116
112
 
117
113
  self.binding_mode = binding_mode
@@ -185,9 +181,10 @@ class PerspectiveWidget(DOMWidget, PerspectiveViewer):
185
181
  def delete(self, delete_table=True):
186
182
  """Delete the Widget's data and clears its internal state.
187
183
 
188
- Args:
189
- delete_table (`bool`): whether the underlying `Table` will be
190
- deleted. Defaults to True.
184
+ # Arguments
185
+
186
+ - `delete_table` (`bool`): whether the underlying `Table` will be
187
+ deleted. Defaults to True.
191
188
  """
192
189
  ret = super(PerspectiveWidget, self).delete(delete_table)
193
190
 
@@ -197,15 +194,16 @@ class PerspectiveWidget(DOMWidget, PerspectiveViewer):
197
194
 
198
195
  @observe("value")
199
196
  def handle_message(self, widget, content, buffers):
200
- """Given a message from `PerspectiveJupyterClient.send()`, process the
197
+ """Given a message from `PerspectiveJupyterClient.send`, process the
201
198
  message and return the result to `self.post`.
202
199
 
203
- Args:
204
- widget: a reference to the `Widget` instance that received the
205
- message.
206
- content (dict): the message from the front-end. Automatically
207
- de-serialized by ipywidgets.
208
- buffers : optional arraybuffers from the front-end, if any.
200
+ # Arguments
201
+
202
+ - `widget`: a reference to the `Widget` instance that received the
203
+ message.
204
+ - `content` (dict): - the message from the front-end. Automatically
205
+ de-serialized by ipywidgets.
206
+ - `buffers`: optional arraybuffers from the front-end, if any.
209
207
  """
210
208
  if content["type"] == "connect":
211
209
  client_id = content["client_id"]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finos/perspective-jupyterlab",
3
- "version": "3.7.1",
3
+ "version": "3.7.2",
4
4
  "description": "A Jupyterlab extension for the Perspective library, designed to be used with perspective-python.",
5
5
  "files": [
6
6
  "dist/**/*",
@@ -73,7 +73,7 @@
73
73
  }
74
74
  },
75
75
  "_build": {
76
- "load": "static/remoteEntry.291ac484cbc97290fd3f.js",
76
+ "load": "static/remoteEntry.6c620635cc748d645b1d.js",
77
77
  "extension": "./extension",
78
78
  "style": "./style"
79
79
  }