pybiolib 0.2.951__py3-none-any.whl → 1.2.1890__py3-none-any.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.
- biolib/__init__.py +357 -11
- biolib/_data_record/data_record.py +380 -0
- biolib/_index/__init__.py +0 -0
- biolib/_index/index.py +55 -0
- biolib/_index/query_result.py +103 -0
- biolib/_internal/__init__.py +0 -0
- biolib/_internal/add_copilot_prompts.py +58 -0
- biolib/_internal/add_gui_files.py +81 -0
- biolib/_internal/data_record/__init__.py +1 -0
- biolib/_internal/data_record/data_record.py +85 -0
- biolib/_internal/data_record/push_data.py +116 -0
- biolib/_internal/data_record/remote_storage_endpoint.py +43 -0
- biolib/_internal/errors.py +5 -0
- biolib/_internal/file_utils.py +125 -0
- biolib/_internal/fuse_mount/__init__.py +1 -0
- biolib/_internal/fuse_mount/experiment_fuse_mount.py +209 -0
- biolib/_internal/http_client.py +159 -0
- biolib/_internal/lfs/__init__.py +1 -0
- biolib/_internal/lfs/cache.py +51 -0
- biolib/_internal/libs/__init__.py +1 -0
- biolib/_internal/libs/fusepy/__init__.py +1257 -0
- biolib/_internal/push_application.py +488 -0
- biolib/_internal/runtime.py +22 -0
- biolib/_internal/string_utils.py +13 -0
- biolib/_internal/templates/__init__.py +1 -0
- biolib/_internal/templates/copilot_template/.github/instructions/general-app-knowledge.instructions.md +10 -0
- biolib/_internal/templates/copilot_template/.github/instructions/style-general.instructions.md +20 -0
- biolib/_internal/templates/copilot_template/.github/instructions/style-python.instructions.md +16 -0
- biolib/_internal/templates/copilot_template/.github/instructions/style-react-ts.instructions.md +47 -0
- biolib/_internal/templates/copilot_template/.github/prompts/biolib_app_inputs.prompt.md +11 -0
- biolib/_internal/templates/copilot_template/.github/prompts/biolib_onboard_repo.prompt.md +19 -0
- biolib/_internal/templates/copilot_template/.github/prompts/biolib_run_apps.prompt.md +12 -0
- biolib/_internal/templates/dashboard_template/.biolib/config.yml +5 -0
- biolib/_internal/templates/github_workflow_template/.github/workflows/biolib.yml +21 -0
- biolib/_internal/templates/gitignore_template/.gitignore +10 -0
- biolib/_internal/templates/gui_template/.yarnrc.yml +1 -0
- biolib/_internal/templates/gui_template/App.tsx +53 -0
- biolib/_internal/templates/gui_template/Dockerfile +27 -0
- biolib/_internal/templates/gui_template/biolib-sdk.ts +82 -0
- biolib/_internal/templates/gui_template/dev-data/output.json +7 -0
- biolib/_internal/templates/gui_template/index.css +5 -0
- biolib/_internal/templates/gui_template/index.html +13 -0
- biolib/_internal/templates/gui_template/index.tsx +10 -0
- biolib/_internal/templates/gui_template/package.json +27 -0
- biolib/_internal/templates/gui_template/tsconfig.json +24 -0
- biolib/_internal/templates/gui_template/vite-plugin-dev-data.ts +50 -0
- biolib/_internal/templates/gui_template/vite.config.mts +10 -0
- biolib/_internal/templates/init_template/.biolib/config.yml +19 -0
- biolib/_internal/templates/init_template/Dockerfile +14 -0
- biolib/_internal/templates/init_template/requirements.txt +1 -0
- biolib/_internal/templates/init_template/run.py +12 -0
- biolib/_internal/templates/init_template/run.sh +4 -0
- biolib/_internal/templates/templates.py +25 -0
- biolib/_internal/tree_utils.py +106 -0
- biolib/_internal/utils/__init__.py +65 -0
- biolib/_internal/utils/auth.py +46 -0
- biolib/_internal/utils/job_url.py +33 -0
- biolib/_internal/utils/multinode.py +263 -0
- biolib/_runtime/runtime.py +157 -0
- biolib/_session/session.py +44 -0
- biolib/_shared/__init__.py +0 -0
- biolib/_shared/types/__init__.py +74 -0
- biolib/_shared/types/account.py +12 -0
- biolib/_shared/types/account_member.py +8 -0
- biolib/_shared/types/app.py +9 -0
- biolib/_shared/types/data_record.py +40 -0
- biolib/_shared/types/experiment.py +32 -0
- biolib/_shared/types/file_node.py +17 -0
- biolib/_shared/types/push.py +6 -0
- biolib/_shared/types/resource.py +37 -0
- biolib/_shared/types/resource_deploy_key.py +11 -0
- biolib/_shared/types/resource_permission.py +14 -0
- biolib/_shared/types/resource_version.py +19 -0
- biolib/_shared/types/result.py +14 -0
- biolib/_shared/types/typing.py +10 -0
- biolib/_shared/types/user.py +19 -0
- biolib/_shared/utils/__init__.py +7 -0
- biolib/_shared/utils/resource_uri.py +75 -0
- biolib/api/__init__.py +6 -0
- biolib/api/client.py +168 -0
- biolib/app/app.py +252 -49
- biolib/app/search_apps.py +45 -0
- biolib/biolib_api_client/api_client.py +126 -31
- biolib/biolib_api_client/app_types.py +24 -4
- biolib/biolib_api_client/auth.py +31 -8
- biolib/biolib_api_client/biolib_app_api.py +147 -52
- biolib/biolib_api_client/biolib_job_api.py +161 -141
- biolib/biolib_api_client/job_types.py +21 -5
- biolib/biolib_api_client/lfs_types.py +7 -23
- biolib/biolib_api_client/user_state.py +56 -0
- biolib/biolib_binary_format/__init__.py +1 -4
- biolib/biolib_binary_format/file_in_container.py +105 -0
- biolib/biolib_binary_format/module_input.py +24 -7
- biolib/biolib_binary_format/module_output_v2.py +149 -0
- biolib/biolib_binary_format/remote_endpoints.py +34 -0
- biolib/biolib_binary_format/remote_stream_seeker.py +59 -0
- biolib/biolib_binary_format/saved_job.py +3 -2
- biolib/biolib_binary_format/{attestation_document.py → stdout_and_stderr.py} +8 -8
- biolib/biolib_binary_format/system_status_update.py +3 -2
- biolib/biolib_binary_format/utils.py +175 -0
- biolib/biolib_docker_client/__init__.py +11 -2
- biolib/biolib_errors.py +36 -0
- biolib/biolib_logging.py +27 -10
- biolib/cli/__init__.py +38 -0
- biolib/cli/auth.py +46 -0
- biolib/cli/data_record.py +164 -0
- biolib/cli/index.py +32 -0
- biolib/cli/init.py +421 -0
- biolib/cli/lfs.py +101 -0
- biolib/cli/push.py +50 -0
- biolib/cli/run.py +63 -0
- biolib/cli/runtime.py +14 -0
- biolib/cli/sdk.py +16 -0
- biolib/cli/start.py +56 -0
- biolib/compute_node/cloud_utils/cloud_utils.py +110 -161
- biolib/compute_node/job_worker/cache_state.py +66 -88
- biolib/compute_node/job_worker/cache_types.py +1 -6
- biolib/compute_node/job_worker/docker_image_cache.py +112 -37
- biolib/compute_node/job_worker/executors/__init__.py +0 -3
- biolib/compute_node/job_worker/executors/docker_executor.py +532 -199
- biolib/compute_node/job_worker/executors/docker_types.py +9 -1
- biolib/compute_node/job_worker/executors/types.py +19 -9
- biolib/compute_node/job_worker/job_legacy_input_wait_timeout_thread.py +30 -0
- biolib/compute_node/job_worker/job_max_runtime_timer_thread.py +3 -5
- biolib/compute_node/job_worker/job_storage.py +108 -0
- biolib/compute_node/job_worker/job_worker.py +397 -212
- biolib/compute_node/job_worker/large_file_system.py +87 -38
- biolib/compute_node/job_worker/network_alloc.py +99 -0
- biolib/compute_node/job_worker/network_buffer.py +240 -0
- biolib/compute_node/job_worker/utilization_reporter_thread.py +197 -0
- biolib/compute_node/job_worker/utils.py +9 -24
- biolib/compute_node/remote_host_proxy.py +400 -98
- biolib/compute_node/utils.py +31 -9
- biolib/compute_node/webserver/compute_node_results_proxy.py +189 -0
- biolib/compute_node/webserver/proxy_utils.py +28 -0
- biolib/compute_node/webserver/webserver.py +130 -44
- biolib/compute_node/webserver/webserver_types.py +2 -6
- biolib/compute_node/webserver/webserver_utils.py +77 -12
- biolib/compute_node/webserver/worker_thread.py +183 -42
- biolib/experiments/__init__.py +0 -0
- biolib/experiments/experiment.py +356 -0
- biolib/jobs/__init__.py +1 -0
- biolib/jobs/job.py +741 -0
- biolib/jobs/job_result.py +185 -0
- biolib/jobs/types.py +50 -0
- biolib/py.typed +0 -0
- biolib/runtime/__init__.py +14 -0
- biolib/sdk/__init__.py +91 -0
- biolib/tables.py +34 -0
- biolib/typing_utils.py +2 -7
- biolib/user/__init__.py +1 -0
- biolib/user/sign_in.py +54 -0
- biolib/utils/__init__.py +162 -0
- biolib/utils/cache_state.py +94 -0
- biolib/utils/multipart_uploader.py +194 -0
- biolib/utils/seq_util.py +150 -0
- biolib/utils/zip/remote_zip.py +640 -0
- pybiolib-1.2.1890.dist-info/METADATA +41 -0
- pybiolib-1.2.1890.dist-info/RECORD +177 -0
- {pybiolib-0.2.951.dist-info → pybiolib-1.2.1890.dist-info}/WHEEL +1 -1
- pybiolib-1.2.1890.dist-info/entry_points.txt +2 -0
- README.md +0 -17
- biolib/app/app_result.py +0 -68
- biolib/app/utils.py +0 -62
- biolib/biolib-js/0-biolib.worker.js +0 -1
- biolib/biolib-js/1-biolib.worker.js +0 -1
- biolib/biolib-js/2-biolib.worker.js +0 -1
- biolib/biolib-js/3-biolib.worker.js +0 -1
- biolib/biolib-js/4-biolib.worker.js +0 -1
- biolib/biolib-js/5-biolib.worker.js +0 -1
- biolib/biolib-js/6-biolib.worker.js +0 -1
- biolib/biolib-js/index.html +0 -10
- biolib/biolib-js/main-biolib.js +0 -1
- biolib/biolib_api_client/biolib_account_api.py +0 -21
- biolib/biolib_api_client/biolib_large_file_system_api.py +0 -108
- biolib/biolib_binary_format/aes_encrypted_package.py +0 -42
- biolib/biolib_binary_format/module_output.py +0 -58
- biolib/biolib_binary_format/rsa_encrypted_aes_package.py +0 -57
- biolib/biolib_push.py +0 -114
- biolib/cli.py +0 -203
- biolib/cli_utils.py +0 -273
- biolib/compute_node/cloud_utils/enclave_parent_types.py +0 -7
- biolib/compute_node/enclave/__init__.py +0 -2
- biolib/compute_node/enclave/enclave_remote_hosts.py +0 -53
- biolib/compute_node/enclave/nitro_secure_module_utils.py +0 -64
- biolib/compute_node/job_worker/executors/base_executor.py +0 -18
- biolib/compute_node/job_worker/executors/pyppeteer_executor.py +0 -173
- biolib/compute_node/job_worker/executors/remote/__init__.py +0 -1
- biolib/compute_node/job_worker/executors/remote/nitro_enclave_utils.py +0 -81
- biolib/compute_node/job_worker/executors/remote/remote_executor.py +0 -51
- biolib/lfs.py +0 -196
- biolib/pyppeteer/.circleci/config.yml +0 -100
- biolib/pyppeteer/.coveragerc +0 -3
- biolib/pyppeteer/.gitignore +0 -89
- biolib/pyppeteer/.pre-commit-config.yaml +0 -28
- biolib/pyppeteer/CHANGES.md +0 -253
- biolib/pyppeteer/CONTRIBUTING.md +0 -26
- biolib/pyppeteer/LICENSE +0 -12
- biolib/pyppeteer/README.md +0 -137
- biolib/pyppeteer/docs/Makefile +0 -177
- biolib/pyppeteer/docs/_static/custom.css +0 -28
- biolib/pyppeteer/docs/_templates/layout.html +0 -10
- biolib/pyppeteer/docs/changes.md +0 -1
- biolib/pyppeteer/docs/conf.py +0 -299
- biolib/pyppeteer/docs/index.md +0 -21
- biolib/pyppeteer/docs/make.bat +0 -242
- biolib/pyppeteer/docs/reference.md +0 -211
- biolib/pyppeteer/docs/server.py +0 -60
- biolib/pyppeteer/poetry.lock +0 -1699
- biolib/pyppeteer/pyppeteer/__init__.py +0 -135
- biolib/pyppeteer/pyppeteer/accessibility.py +0 -286
- biolib/pyppeteer/pyppeteer/browser.py +0 -401
- biolib/pyppeteer/pyppeteer/browser_fetcher.py +0 -194
- biolib/pyppeteer/pyppeteer/command.py +0 -22
- biolib/pyppeteer/pyppeteer/connection/__init__.py +0 -242
- biolib/pyppeteer/pyppeteer/connection/cdpsession.py +0 -101
- biolib/pyppeteer/pyppeteer/coverage.py +0 -346
- biolib/pyppeteer/pyppeteer/device_descriptors.py +0 -787
- biolib/pyppeteer/pyppeteer/dialog.py +0 -79
- biolib/pyppeteer/pyppeteer/domworld.py +0 -597
- biolib/pyppeteer/pyppeteer/emulation_manager.py +0 -53
- biolib/pyppeteer/pyppeteer/errors.py +0 -48
- biolib/pyppeteer/pyppeteer/events.py +0 -63
- biolib/pyppeteer/pyppeteer/execution_context.py +0 -156
- biolib/pyppeteer/pyppeteer/frame/__init__.py +0 -299
- biolib/pyppeteer/pyppeteer/frame/frame_manager.py +0 -306
- biolib/pyppeteer/pyppeteer/helpers.py +0 -245
- biolib/pyppeteer/pyppeteer/input.py +0 -371
- biolib/pyppeteer/pyppeteer/jshandle.py +0 -598
- biolib/pyppeteer/pyppeteer/launcher.py +0 -683
- biolib/pyppeteer/pyppeteer/lifecycle_watcher.py +0 -169
- biolib/pyppeteer/pyppeteer/models/__init__.py +0 -103
- biolib/pyppeteer/pyppeteer/models/_protocol.py +0 -12460
- biolib/pyppeteer/pyppeteer/multimap.py +0 -82
- biolib/pyppeteer/pyppeteer/network_manager.py +0 -678
- biolib/pyppeteer/pyppeteer/options.py +0 -8
- biolib/pyppeteer/pyppeteer/page.py +0 -1728
- biolib/pyppeteer/pyppeteer/pipe_transport.py +0 -59
- biolib/pyppeteer/pyppeteer/target.py +0 -147
- biolib/pyppeteer/pyppeteer/task_queue.py +0 -24
- biolib/pyppeteer/pyppeteer/timeout_settings.py +0 -36
- biolib/pyppeteer/pyppeteer/tracing.py +0 -93
- biolib/pyppeteer/pyppeteer/us_keyboard_layout.py +0 -305
- biolib/pyppeteer/pyppeteer/util.py +0 -18
- biolib/pyppeteer/pyppeteer/websocket_transport.py +0 -47
- biolib/pyppeteer/pyppeteer/worker.py +0 -101
- biolib/pyppeteer/pyproject.toml +0 -97
- biolib/pyppeteer/spell.txt +0 -137
- biolib/pyppeteer/tox.ini +0 -72
- biolib/pyppeteer/utils/generate_protocol_types.py +0 -603
- biolib/start_cli.py +0 -7
- biolib/utils.py +0 -47
- biolib/validators/validate_app_version.py +0 -183
- biolib/validators/validate_argument.py +0 -134
- biolib/validators/validate_module.py +0 -323
- biolib/validators/validate_zip_file.py +0 -40
- biolib/validators/validator_utils.py +0 -103
- pybiolib-0.2.951.dist-info/LICENSE +0 -21
- pybiolib-0.2.951.dist-info/METADATA +0 -61
- pybiolib-0.2.951.dist-info/RECORD +0 -153
- pybiolib-0.2.951.dist-info/entry_points.txt +0 -3
- /LICENSE → /pybiolib-1.2.1890.dist-info/licenses/LICENSE +0 -0
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
API Reference
|
|
2
|
-
=============
|
|
3
|
-
|
|
4
|
-
Commands
|
|
5
|
-
--------
|
|
6
|
-
|
|
7
|
-
* ``pyppeteer-install``: Download and install chromium for pyppeteer.
|
|
8
|
-
|
|
9
|
-
Environment Variables
|
|
10
|
-
---------------------
|
|
11
|
-
|
|
12
|
-
* ``$PYPPETEER_HOME``: Specify the directory to be used by pyppeteer.
|
|
13
|
-
Pyppeteer uses this directory for extracting downloaded Chromium, and for
|
|
14
|
-
making temporary user data directory.
|
|
15
|
-
Default location depends on platform:
|
|
16
|
-
* Windows: `C:\Users\<username>\AppData\Local\pyppeteer`
|
|
17
|
-
* OS X: `/Users/<username>/Library/Application Support/pyppeteer`
|
|
18
|
-
* Linux: `/home/<username>/.local/share/pyppeteer`
|
|
19
|
-
* or in `$XDG_DATA_HOME/pyppeteer` if `$XDG_DATA_HOME` is defined.
|
|
20
|
-
|
|
21
|
-
Details see [appdirs](https://pypi.org/project/appdirs/)'s `user_data_dir`.
|
|
22
|
-
|
|
23
|
-
* ``$PYPPETEER_DOWNLOAD_HOST``: Overwrite host part of URL that is used to
|
|
24
|
-
download Chromium. Defaults to ``https://storage.googleapis.com``.
|
|
25
|
-
|
|
26
|
-
* ``$PYPPETEER_CHROMIUM_REVISION``: Specify a certain version of chromium you'd
|
|
27
|
-
like pyppeteer to use. Default value can be checked by
|
|
28
|
-
``pyppeteer.__chromium_revision__``.
|
|
29
|
-
|
|
30
|
-
* ``$PYPPETEER_NO_PROGRESS_BAR``: Suppress showing progress bar in chromium
|
|
31
|
-
download process. Acceptable values are ``1`` or ``true`` (case-insensitive).
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
Pyppeteer Main Module
|
|
35
|
-
---------------------
|
|
36
|
-
|
|
37
|
-
.. currentmodule:: pyppeteer
|
|
38
|
-
|
|
39
|
-
.. autofunction:: launch
|
|
40
|
-
.. autofunction:: connect
|
|
41
|
-
.. autofunction:: defaultArgs
|
|
42
|
-
.. autofunction:: executablePath
|
|
43
|
-
|
|
44
|
-
Browser Class
|
|
45
|
-
-------------
|
|
46
|
-
|
|
47
|
-
.. currentmodule:: pyppeteer.browser
|
|
48
|
-
|
|
49
|
-
.. autoclass:: pyppeteer.browser.Browser
|
|
50
|
-
:members:
|
|
51
|
-
:exclude-members: create
|
|
52
|
-
|
|
53
|
-
BrowserContext Class
|
|
54
|
-
--------------------
|
|
55
|
-
|
|
56
|
-
.. currentmodule:: pyppeteer.browser
|
|
57
|
-
|
|
58
|
-
.. autoclass:: pyppeteer.browser.BrowserContext
|
|
59
|
-
:members:
|
|
60
|
-
|
|
61
|
-
Page Class
|
|
62
|
-
----------
|
|
63
|
-
|
|
64
|
-
.. currentmodule:: pyppeteer.page
|
|
65
|
-
|
|
66
|
-
.. autoclass:: pyppeteer.page.Page
|
|
67
|
-
:members:
|
|
68
|
-
:exclude-members: create
|
|
69
|
-
|
|
70
|
-
Worker Class
|
|
71
|
-
------------
|
|
72
|
-
|
|
73
|
-
.. currentmodule:: pyppeteer.worker
|
|
74
|
-
|
|
75
|
-
.. autoclass:: pyppeteer.worker.Worker
|
|
76
|
-
:members:
|
|
77
|
-
|
|
78
|
-
Keyboard Class
|
|
79
|
-
--------------
|
|
80
|
-
|
|
81
|
-
.. currentmodule:: pyppeteer.input
|
|
82
|
-
|
|
83
|
-
.. autoclass:: pyppeteer.input.Keyboard
|
|
84
|
-
:members:
|
|
85
|
-
|
|
86
|
-
Mouse Class
|
|
87
|
-
-----------
|
|
88
|
-
|
|
89
|
-
.. currentmodule:: pyppeteer.input
|
|
90
|
-
|
|
91
|
-
.. autoclass:: pyppeteer.input.Mouse
|
|
92
|
-
:members:
|
|
93
|
-
|
|
94
|
-
Tracing Class
|
|
95
|
-
-------------
|
|
96
|
-
|
|
97
|
-
.. currentmodule:: pyppeteer.tracing
|
|
98
|
-
|
|
99
|
-
.. autoclass:: pyppeteer.tracing.Tracing
|
|
100
|
-
:members:
|
|
101
|
-
|
|
102
|
-
Dialog Class
|
|
103
|
-
------------
|
|
104
|
-
|
|
105
|
-
.. currentmodule:: pyppeteer.dialog
|
|
106
|
-
|
|
107
|
-
.. autoclass:: pyppeteer.dialog.Dialog
|
|
108
|
-
:members:
|
|
109
|
-
|
|
110
|
-
ConsoleMessage Class
|
|
111
|
-
--------------------
|
|
112
|
-
|
|
113
|
-
.. currentmodule:: pyppeteer.page
|
|
114
|
-
|
|
115
|
-
.. autoclass:: pyppeteer.page.ConsoleMessage
|
|
116
|
-
:members:
|
|
117
|
-
|
|
118
|
-
Frame Class
|
|
119
|
-
-----------
|
|
120
|
-
|
|
121
|
-
.. currentmodule:: pyppeteer.frame
|
|
122
|
-
|
|
123
|
-
.. autoclass:: pyppeteer.frame_manager.Frame
|
|
124
|
-
:members:
|
|
125
|
-
|
|
126
|
-
ExecutionContext Class
|
|
127
|
-
----------------------
|
|
128
|
-
|
|
129
|
-
.. currentmodule:: pyppeteer.execution_context
|
|
130
|
-
|
|
131
|
-
.. autoclass:: pyppeteer.execution_context.ExecutionContext
|
|
132
|
-
:members:
|
|
133
|
-
|
|
134
|
-
JSHandle Class
|
|
135
|
-
--------------
|
|
136
|
-
|
|
137
|
-
.. autoclass:: pyppeteer.execution_context.JSHandle
|
|
138
|
-
:members:
|
|
139
|
-
|
|
140
|
-
ElementHandle Class
|
|
141
|
-
-------------------
|
|
142
|
-
|
|
143
|
-
.. currentmodule:: pyppeteer.element_handle
|
|
144
|
-
|
|
145
|
-
.. autoclass:: pyppeteer.element_handle.ElementHandle
|
|
146
|
-
:members:
|
|
147
|
-
|
|
148
|
-
Request Class
|
|
149
|
-
-------------
|
|
150
|
-
|
|
151
|
-
.. currentmodule:: pyppeteer.network_manager
|
|
152
|
-
|
|
153
|
-
.. autoclass:: pyppeteer.network_manager.Request
|
|
154
|
-
:members:
|
|
155
|
-
|
|
156
|
-
Response Class
|
|
157
|
-
--------------
|
|
158
|
-
|
|
159
|
-
.. currentmodule:: pyppeteer.network_manager
|
|
160
|
-
|
|
161
|
-
.. autoclass:: pyppeteer.network_manager.Response
|
|
162
|
-
:members:
|
|
163
|
-
|
|
164
|
-
Target Class
|
|
165
|
-
------------
|
|
166
|
-
|
|
167
|
-
.. currentmodule:: pyppeteer.target
|
|
168
|
-
|
|
169
|
-
.. autoclass:: pyppeteer.target.Target
|
|
170
|
-
:members:
|
|
171
|
-
|
|
172
|
-
CDPSession Class
|
|
173
|
-
----------------
|
|
174
|
-
|
|
175
|
-
.. currentmodule:: pyppeteer.connection
|
|
176
|
-
|
|
177
|
-
.. autoclass:: pyppeteer.connection.CDPSession
|
|
178
|
-
:members:
|
|
179
|
-
|
|
180
|
-
Coverage Class
|
|
181
|
-
--------------
|
|
182
|
-
|
|
183
|
-
.. currentmodule:: pyppeteer.coverage
|
|
184
|
-
|
|
185
|
-
.. autoclass:: pyppeteer.coverage.Coverage
|
|
186
|
-
:members:
|
|
187
|
-
|
|
188
|
-
Debugging
|
|
189
|
-
---------
|
|
190
|
-
|
|
191
|
-
For debugging, you can set `logLevel` option to `logging.DEBUG` for
|
|
192
|
-
:func:`pyppeteer.launcher.launch` and :func:`pyppeteer.launcher.connect`
|
|
193
|
-
functions. However, this option prints too many logs including SEND/RECV
|
|
194
|
-
messages of pyppeteer. In order to only show suppressed error messages, you
|
|
195
|
-
should set ``pyppeteer.DEBUG`` to ``True``.
|
|
196
|
-
|
|
197
|
-
Example:
|
|
198
|
-
|
|
199
|
-
```python
|
|
200
|
-
import asyncio
|
|
201
|
-
import pyppeteer
|
|
202
|
-
from pyppeteer import launch
|
|
203
|
-
|
|
204
|
-
pyppeteer.DEBUG = True # print suppressed errors as error log
|
|
205
|
-
|
|
206
|
-
async def main():
|
|
207
|
-
browser = await launch()
|
|
208
|
-
... # do something
|
|
209
|
-
|
|
210
|
-
asyncio.get_event_loop().run_until_complete(main())
|
|
211
|
-
```
|
biolib/pyppeteer/docs/server.py
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
# -*- coding: utf-8 -*-
|
|
3
|
-
|
|
4
|
-
import subprocess
|
|
5
|
-
from os import path
|
|
6
|
-
|
|
7
|
-
from livereload import Server, watcher
|
|
8
|
-
|
|
9
|
-
watcher.pyinotify = None # disable pyinotify
|
|
10
|
-
|
|
11
|
-
docsdir = path.dirname(path.abspath(__file__))
|
|
12
|
-
builddir = path.join(docsdir, '_build')
|
|
13
|
-
build_cmd = [
|
|
14
|
-
'sphinx-build',
|
|
15
|
-
'-q',
|
|
16
|
-
'-j',
|
|
17
|
-
'auto',
|
|
18
|
-
'-b',
|
|
19
|
-
'html',
|
|
20
|
-
'-d',
|
|
21
|
-
path.join(builddir, 'doctrees'),
|
|
22
|
-
docsdir,
|
|
23
|
-
path.join(builddir, 'html'),
|
|
24
|
-
]
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
def cmd() -> None:
|
|
28
|
-
print('=== Sphinx Build Start ===')
|
|
29
|
-
subprocess.run(build_cmd, cwd=docsdir)
|
|
30
|
-
print('=== Sphinx Build done ===')
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
# subprocess.run(['make', 'clean'], cwd=docsdir)
|
|
34
|
-
cmd()
|
|
35
|
-
server = Server()
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
def docs(p: str) -> str:
|
|
39
|
-
return path.join(docsdir, p)
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
# Watch documents
|
|
43
|
-
server.watch(docs('*.py'), cmd, delay=1)
|
|
44
|
-
server.watch(docs('*.md'), cmd, delay=1)
|
|
45
|
-
server.watch(docs('../*.md'), cmd, delay=1)
|
|
46
|
-
server.watch(docs('*.md'), cmd, delay=1)
|
|
47
|
-
server.watch(docs('*/*.md'), cmd, delay=1)
|
|
48
|
-
server.watch(docs('*/*/*.md'), cmd, delay=1)
|
|
49
|
-
|
|
50
|
-
# Watch template/style
|
|
51
|
-
server.watch(docs('_templates/*.html'), cmd, delay=1)
|
|
52
|
-
server.watch(docs('_static/*.css'), cmd, delay=1)
|
|
53
|
-
server.watch(docs('_static/*.js'), cmd, delay=1)
|
|
54
|
-
|
|
55
|
-
# Watch package
|
|
56
|
-
server.watch(docs('../pyppeteer/*.py'), cmd, delay=1)
|
|
57
|
-
server.watch(docs('../pyppeteer/*/*.py'), cmd, delay=1)
|
|
58
|
-
server.watch(docs('../pyppeteer/*/*/*.py'), cmd, delay=1)
|
|
59
|
-
|
|
60
|
-
server.serve(port=8889, root=docs('_build/html'), debug=True, restart_delay=1)
|