offprint 0.0.0__tar.gz → 0.0.3__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.
- {offprint-0.0.0 → offprint-0.0.3}/LICENSE +1 -1
- offprint-0.0.3/PKG-INFO +108 -0
- offprint-0.0.3/README.md +84 -0
- offprint-0.0.3/THIRD_PARTY_NOTICES.txt +12930 -0
- offprint-0.0.3/offprint-rs/Cargo.lock +3898 -0
- offprint-0.0.3/offprint-rs/Cargo.toml +137 -0
- offprint-0.0.3/offprint-rs/artifact/Cargo.toml +27 -0
- offprint-0.0.3/offprint-rs/artifact/LICENSE +21 -0
- offprint-0.0.3/offprint-rs/artifact/src/filename.rs +86 -0
- offprint-0.0.3/offprint-rs/artifact/src/lib.rs +23 -0
- offprint-0.0.3/offprint-rs/artifact/src/memory.rs +117 -0
- offprint-0.0.3/offprint-rs/artifact/src/multi_output/commit.rs +323 -0
- offprint-0.0.3/offprint-rs/artifact/src/multi_output/durable.rs +277 -0
- offprint-0.0.3/offprint-rs/artifact/src/multi_output/fault.rs +82 -0
- offprint-0.0.3/offprint-rs/artifact/src/multi_output/journal.rs +493 -0
- offprint-0.0.3/offprint-rs/artifact/src/multi_output/payload.rs +322 -0
- offprint-0.0.3/offprint-rs/artifact/src/multi_output/plan.rs +781 -0
- offprint-0.0.3/offprint-rs/artifact/src/multi_output/recovery.rs +450 -0
- offprint-0.0.3/offprint-rs/artifact/src/multi_output/tests.rs +630 -0
- offprint-0.0.3/offprint-rs/artifact/src/multi_output.rs +166 -0
- offprint-0.0.3/offprint-rs/artifact/src/transaction.rs +834 -0
- offprint-0.0.3/offprint-rs/artifact/tests/relative_output.rs +85 -0
- offprint-0.0.3/offprint-rs/browser/Cargo.toml +21 -0
- offprint-0.0.3/offprint-rs/browser/LICENSE +21 -0
- offprint-0.0.3/offprint-rs/browser/src/backend.rs +339 -0
- offprint-0.0.3/offprint-rs/browser/src/lib.rs +24 -0
- offprint-0.0.3/offprint-rs/browser/src/network/tests.rs +424 -0
- offprint-0.0.3/offprint-rs/browser/src/network.rs +286 -0
- offprint-0.0.3/offprint-rs/browser/src/observation.rs +116 -0
- offprint-0.0.3/offprint-rs/capture/Cargo.toml +22 -0
- offprint-0.0.3/offprint-rs/capture/LICENSE +21 -0
- offprint-0.0.3/offprint-rs/capture/src/budget.rs +301 -0
- offprint-0.0.3/offprint-rs/capture/src/cancellation.rs +87 -0
- offprint-0.0.3/offprint-rs/capture/src/content_store.rs +421 -0
- offprint-0.0.3/offprint-rs/capture/src/lib.rs +20 -0
- offprint-0.0.3/offprint-rs/capture/src/state.rs +157 -0
- offprint-0.0.3/offprint-rs/capture/src/validated.rs +21 -0
- offprint-0.0.3/offprint-rs/chromium/Cargo.toml +37 -0
- offprint-0.0.3/offprint-rs/chromium/LICENSE +21 -0
- offprint-0.0.3/offprint-rs/chromium/NOTICE +32 -0
- offprint-0.0.3/offprint-rs/chromium/generated/collector.js +2583 -0
- offprint-0.0.3/offprint-rs/chromium/generated/collector.sha256 +1 -0
- offprint-0.0.3/offprint-rs/chromium/src/backend/tests.rs +125 -0
- offprint-0.0.3/offprint-rs/chromium/src/backend.rs +666 -0
- offprint-0.0.3/offprint-rs/chromium/src/cdp/generated/cdp_browser.rs +125 -0
- offprint-0.0.3/offprint-rs/chromium/src/cdp/generated/cdp_page.rs +16 -0
- offprint-0.0.3/offprint-rs/chromium/src/cdp/generated/cdp_target.rs +234 -0
- offprint-0.0.3/offprint-rs/chromium/src/cdp/generated/mod.rs +7 -0
- offprint-0.0.3/offprint-rs/chromium/src/cdp.rs +15 -0
- offprint-0.0.3/offprint-rs/chromium/src/collector.rs +388 -0
- offprint-0.0.3/offprint-rs/chromium/src/discovery.rs +520 -0
- offprint-0.0.3/offprint-rs/chromium/src/launch.rs +524 -0
- offprint-0.0.3/offprint-rs/chromium/src/lib.rs +39 -0
- offprint-0.0.3/offprint-rs/chromium/src/managed/archive.rs +450 -0
- offprint-0.0.3/offprint-rs/chromium/src/managed/cache.rs +232 -0
- offprint-0.0.3/offprint-rs/chromium/src/managed/catalog.rs +180 -0
- offprint-0.0.3/offprint-rs/chromium/src/managed/download.rs +154 -0
- offprint-0.0.3/offprint-rs/chromium/src/managed/installed.rs +209 -0
- offprint-0.0.3/offprint-rs/chromium/src/managed/leases.rs +152 -0
- offprint-0.0.3/offprint-rs/chromium/src/managed.rs +261 -0
- offprint-0.0.3/offprint-rs/chromium/src/offline.rs +698 -0
- offprint-0.0.3/offprint-rs/chromium/src/page/activity.rs +319 -0
- offprint-0.0.3/offprint-rs/chromium/src/page/frame_owner.rs +239 -0
- offprint-0.0.3/offprint-rs/chromium/src/page/interception/paused.rs +478 -0
- offprint-0.0.3/offprint-rs/chromium/src/page/interception.rs +422 -0
- offprint-0.0.3/offprint-rs/chromium/src/page/lifecycle.rs +387 -0
- offprint-0.0.3/offprint-rs/chromium/src/page/navigation.rs +277 -0
- offprint-0.0.3/offprint-rs/chromium/src/page/offline.rs +60 -0
- offprint-0.0.3/offprint-rs/chromium/src/page/resource.rs +152 -0
- offprint-0.0.3/offprint-rs/chromium/src/page/tests.rs +431 -0
- offprint-0.0.3/offprint-rs/chromium/src/page/visual_fallback.rs +492 -0
- offprint-0.0.3/offprint-rs/chromium/src/page.rs +786 -0
- offprint-0.0.3/offprint-rs/chromium/src/pdf.rs +217 -0
- offprint-0.0.3/offprint-rs/chromium/src/proxy.rs +617 -0
- offprint-0.0.3/offprint-rs/chromium/src/remote.rs +487 -0
- offprint-0.0.3/offprint-rs/chromium/src/resources/identity.rs +724 -0
- offprint-0.0.3/offprint-rs/chromium/src/resources/normalization.rs +159 -0
- offprint-0.0.3/offprint-rs/chromium/src/resources/storage.rs +693 -0
- offprint-0.0.3/offprint-rs/chromium/src/resources/stream.rs +219 -0
- offprint-0.0.3/offprint-rs/chromium/src/resources/tasks.rs +207 -0
- offprint-0.0.3/offprint-rs/chromium/src/resources/test_support.rs +144 -0
- offprint-0.0.3/offprint-rs/chromium/src/resources.rs +749 -0
- offprint-0.0.3/offprint-rs/chromium/src/targets/tests.rs +608 -0
- offprint-0.0.3/offprint-rs/chromium/src/targets.rs +825 -0
- offprint-0.0.3/offprint-rs/chromium/src/transport/tests.rs +547 -0
- offprint-0.0.3/offprint-rs/chromium/src/transport.rs +849 -0
- offprint-0.0.3/offprint-rs/chromium/tests/browser_smoke.rs +2694 -0
- offprint-0.0.3/offprint-rs/cli/Cargo.toml +36 -0
- offprint-0.0.3/offprint-rs/cli/LICENSE +21 -0
- offprint-0.0.3/offprint-rs/cli/src/command.rs +834 -0
- offprint-0.0.3/offprint-rs/cli/src/config/browser.rs +130 -0
- offprint-0.0.3/offprint-rs/cli/src/config/document.rs +112 -0
- offprint-0.0.3/offprint-rs/cli/src/config/environment.rs +171 -0
- offprint-0.0.3/offprint-rs/cli/src/config/profile.rs +368 -0
- offprint-0.0.3/offprint-rs/cli/src/config/resolve.rs +246 -0
- offprint-0.0.3/offprint-rs/cli/src/config/tests.rs +747 -0
- offprint-0.0.3/offprint-rs/cli/src/config/value.rs +88 -0
- offprint-0.0.3/offprint-rs/cli/src/config.rs +183 -0
- offprint-0.0.3/offprint-rs/cli/src/credentials.rs +251 -0
- offprint-0.0.3/offprint-rs/cli/src/lib.rs +23 -0
- offprint-0.0.3/offprint-rs/cli/src/main.rs +5 -0
- offprint-0.0.3/offprint-rs/cli/src/output.rs +365 -0
- offprint-0.0.3/offprint-rs/cli/src/process.rs +66 -0
- offprint-0.0.3/offprint-rs/cli/src/runner/arguments.rs +185 -0
- offprint-0.0.3/offprint-rs/cli/src/runner/artifacts.rs +146 -0
- offprint-0.0.3/offprint-rs/cli/src/runner/batch.rs +56 -0
- offprint-0.0.3/offprint-rs/cli/src/runner/browser.rs +82 -0
- offprint-0.0.3/offprint-rs/cli/src/runner/capture/execute.rs +83 -0
- offprint-0.0.3/offprint-rs/cli/src/runner/capture/finish.rs +33 -0
- offprint-0.0.3/offprint-rs/cli/src/runner/capture/plan.rs +44 -0
- offprint-0.0.3/offprint-rs/cli/src/runner/capture.rs +7 -0
- offprint-0.0.3/offprint-rs/cli/src/runner/crawl.rs +72 -0
- offprint-0.0.3/offprint-rs/cli/src/runner/diagnostics.rs +335 -0
- offprint-0.0.3/offprint-rs/cli/src/runner/dispatch.rs +70 -0
- offprint-0.0.3/offprint-rs/cli/src/runner/export.rs +83 -0
- offprint-0.0.3/offprint-rs/cli/src/runner/input.rs +131 -0
- offprint-0.0.3/offprint-rs/cli/src/runner/scheduler.rs +157 -0
- offprint-0.0.3/offprint-rs/cli/src/runner/tests.rs +1104 -0
- offprint-0.0.3/offprint-rs/cli/src/runner.rs +103 -0
- offprint-0.0.3/offprint-rs/cli/tests/metadata_cli.rs +22 -0
- offprint-0.0.3/offprint-rs/cli/tests/release_archive_smoke.rs +148 -0
- offprint-0.0.3/offprint-rs/cli/tests/staging_error_cli.rs +65 -0
- offprint-0.0.3/offprint-rs/core/Cargo.toml +48 -0
- offprint-0.0.3/offprint-rs/core/LICENSE +21 -0
- offprint-0.0.3/offprint-rs/core/README.md +39 -0
- offprint-0.0.3/offprint-rs/core/examples/capture_file.rs +14 -0
- offprint-0.0.3/offprint-rs/core/examples/capture_memory.rs +23 -0
- offprint-0.0.3/offprint-rs/core/examples/custom_network.rs +20 -0
- offprint-0.0.3/offprint-rs/core/src/artifact_service/export.rs +535 -0
- offprint-0.0.3/offprint-rs/core/src/artifact_service/markdown_bundle.rs +303 -0
- offprint-0.0.3/offprint-rs/core/src/artifact_service.rs +635 -0
- offprint-0.0.3/offprint-rs/core/src/browser_service.rs +754 -0
- offprint-0.0.3/offprint-rs/core/src/capture_builder.rs +349 -0
- offprint-0.0.3/offprint-rs/core/src/capture_service/diagnostics.rs +70 -0
- offprint-0.0.3/offprint-rs/core/src/capture_service/events.rs +340 -0
- offprint-0.0.3/offprint-rs/core/src/capture_service.rs +467 -0
- offprint-0.0.3/offprint-rs/core/src/dependencies.rs +44 -0
- offprint-0.0.3/offprint-rs/core/src/diagnostics.rs +388 -0
- offprint-0.0.3/offprint-rs/core/src/lib.rs +336 -0
- offprint-0.0.3/offprint-rs/core/src/pipeline/artifact.rs +347 -0
- offprint-0.0.3/offprint-rs/core/src/pipeline/frames.rs +692 -0
- offprint-0.0.3/offprint-rs/core/src/pipeline/offline.rs +184 -0
- offprint-0.0.3/offprint-rs/core/src/pipeline/render.rs +857 -0
- offprint-0.0.3/offprint-rs/core/src/pipeline/resource_materialization.rs +679 -0
- offprint-0.0.3/offprint-rs/core/src/pipeline.rs +221 -0
- offprint-0.0.3/offprint-rs/core/src/runtime/browser/tests.rs +147 -0
- offprint-0.0.3/offprint-rs/core/src/runtime/browser.rs +217 -0
- offprint-0.0.3/offprint-rs/core/src/runtime/configuration.rs +159 -0
- offprint-0.0.3/offprint-rs/core/src/runtime/context.rs +250 -0
- offprint-0.0.3/offprint-rs/core/src/runtime/lifecycle.rs +73 -0
- offprint-0.0.3/offprint-rs/core/src/runtime.rs +498 -0
- offprint-0.0.3/offprint-rs/core/src/scheduler/job.rs +92 -0
- offprint-0.0.3/offprint-rs/core/src/scheduler/resume.rs +682 -0
- offprint-0.0.3/offprint-rs/core/src/scheduler.rs +789 -0
- offprint-0.0.3/offprint-rs/core/src/verified_html.rs +36 -0
- offprint-0.0.3/offprint-rs/core/tests/artifact_exports.rs +478 -0
- offprint-0.0.3/offprint-rs/core/tests/capture_regressions.rs +657 -0
- offprint-0.0.3/offprint-rs/core/tests/custom_backend.rs +1139 -0
- offprint-0.0.3/offprint-rs/core/tests/diagnostics.rs +65 -0
- offprint-0.0.3/offprint-rs/core/tests/differential.rs +386 -0
- offprint-0.0.3/offprint-rs/core/tests/fixture_matrix.rs +1789 -0
- offprint-0.0.3/offprint-rs/core/tests/remote_browser.rs +263 -0
- offprint-0.0.3/offprint-rs/core/tests/repeated_capture.rs +375 -0
- offprint-0.0.3/offprint-rs/core/tests/request_api.rs +65 -0
- offprint-0.0.3/offprint-rs/document/Cargo.toml +22 -0
- offprint-0.0.3/offprint-rs/document/LICENSE +21 -0
- offprint-0.0.3/offprint-rs/document/src/discover/css.rs +458 -0
- offprint-0.0.3/offprint-rs/document/src/discover/html.rs +111 -0
- offprint-0.0.3/offprint-rs/document/src/discover/svg.rs +27 -0
- offprint-0.0.3/offprint-rs/document/src/discover.rs +776 -0
- offprint-0.0.3/offprint-rs/document/src/document/frame.rs +346 -0
- offprint-0.0.3/offprint-rs/document/src/document/mod.rs +216 -0
- offprint-0.0.3/offprint-rs/document/src/document/parse.rs +396 -0
- offprint-0.0.3/offprint-rs/document/src/document/tests.rs +95 -0
- offprint-0.0.3/offprint-rs/document/src/lib.rs +33 -0
- offprint-0.0.3/offprint-rs/document/src/policy.rs +208 -0
- offprint-0.0.3/offprint-rs/document/src/resource.rs +122 -0
- offprint-0.0.3/offprint-rs/document/src/sanitize.rs +292 -0
- offprint-0.0.3/offprint-rs/document/src/serialize.rs +348 -0
- offprint-0.0.3/offprint-rs/document/src/state.rs +63 -0
- offprint-0.0.3/offprint-rs/export/Cargo.toml +28 -0
- offprint-0.0.3/offprint-rs/export/LICENSE +21 -0
- offprint-0.0.3/offprint-rs/export/src/lib.rs +181 -0
- offprint-0.0.3/offprint-rs/export/src/markdown/output.rs +108 -0
- offprint-0.0.3/offprint-rs/export/src/markdown.rs +907 -0
- offprint-0.0.3/offprint-rs/export/src/mhtml.rs +305 -0
- offprint-0.0.3/offprint-rs/export/src/pdf/metadata/apply.rs +64 -0
- offprint-0.0.3/offprint-rs/export/src/pdf/metadata/model.rs +345 -0
- offprint-0.0.3/offprint-rs/export/src/pdf/metadata/source.rs +282 -0
- offprint-0.0.3/offprint-rs/export/src/pdf/metadata/tests.rs +339 -0
- offprint-0.0.3/offprint-rs/export/src/pdf/metadata/verify.rs +117 -0
- offprint-0.0.3/offprint-rs/export/src/pdf/metadata/xmp.rs +767 -0
- offprint-0.0.3/offprint-rs/export/src/pdf/metadata.rs +99 -0
- offprint-0.0.3/offprint-rs/export/src/pdf/semantics.rs +132 -0
- offprint-0.0.3/offprint-rs/export/src/pdf.rs +613 -0
- offprint-0.0.3/offprint-rs/export/src/self_extracting.rs +175 -0
- offprint-0.0.3/offprint-rs/export/src/support.rs +89 -0
- offprint-0.0.3/offprint-rs/export/src/zip.rs +240 -0
- offprint-0.0.3/offprint-rs/html/Cargo.toml +24 -0
- offprint-0.0.3/offprint-rs/html/LICENSE +21 -0
- offprint-0.0.3/offprint-rs/html/src/csp.rs +54 -0
- offprint-0.0.3/offprint-rs/html/src/encode.rs +208 -0
- offprint-0.0.3/offprint-rs/html/src/fallback.rs +67 -0
- offprint-0.0.3/offprint-rs/html/src/lib.rs +38 -0
- offprint-0.0.3/offprint-rs/html/src/repair.rs +304 -0
- offprint-0.0.3/offprint-rs/html/src/sandbox.rs +142 -0
- offprint-0.0.3/offprint-rs/html/src/state.rs +161 -0
- offprint-0.0.3/offprint-rs/html/src/verified.rs +130 -0
- offprint-0.0.3/offprint-rs/html/src/verify/active_content.rs +130 -0
- offprint-0.0.3/offprint-rs/html/src/verify/manifest.rs +217 -0
- offprint-0.0.3/offprint-rs/html/src/verify/resource.rs +152 -0
- offprint-0.0.3/offprint-rs/html/src/verify/structure.rs +584 -0
- offprint-0.0.3/offprint-rs/html/src/verify.rs +775 -0
- offprint-0.0.3/offprint-rs/model/Cargo.toml +26 -0
- offprint-0.0.3/offprint-rs/model/LICENSE +21 -0
- offprint-0.0.3/offprint-rs/model/src/artifact.rs +198 -0
- offprint-0.0.3/offprint-rs/model/src/browser.rs +191 -0
- offprint-0.0.3/offprint-rs/model/src/credentials.rs +119 -0
- offprint-0.0.3/offprint-rs/model/src/error/catalog/definitions.rs +257 -0
- offprint-0.0.3/offprint-rs/model/src/error/catalog.rs +20 -0
- offprint-0.0.3/offprint-rs/model/src/error/mod.rs +161 -0
- offprint-0.0.3/offprint-rs/model/src/error/tests.rs +211 -0
- offprint-0.0.3/offprint-rs/model/src/event.rs +160 -0
- offprint-0.0.3/offprint-rs/model/src/export.rs +105 -0
- offprint-0.0.3/offprint-rs/model/src/id.rs +218 -0
- offprint-0.0.3/offprint-rs/model/src/lib.rs +75 -0
- offprint-0.0.3/offprint-rs/model/src/path.rs +87 -0
- offprint-0.0.3/offprint-rs/model/src/policy.rs +411 -0
- offprint-0.0.3/offprint-rs/model/src/request.rs +670 -0
- offprint-0.0.3/offprint-rs/model/src/resource.rs +142 -0
- offprint-0.0.3/offprint-rs/model/src/result.rs +103 -0
- offprint-0.0.3/offprint-rs/model/src/schedule.rs +261 -0
- offprint-0.0.3/offprint-rs/model/src/structural.rs +34 -0
- offprint-0.0.3/offprint-rs/model/src/url_value.rs +184 -0
- offprint-0.0.3/offprint-rs/protocol/Cargo.toml +20 -0
- offprint-0.0.3/offprint-rs/protocol/LICENSE +21 -0
- offprint-0.0.3/offprint-rs/protocol/fixtures/collector-responses.json +47 -0
- offprint-0.0.3/offprint-rs/protocol/src/chunk.rs +108 -0
- offprint-0.0.3/offprint-rs/protocol/src/handshake.rs +224 -0
- offprint-0.0.3/offprint-rs/protocol/src/lib.rs +44 -0
- offprint-0.0.3/offprint-rs/protocol/src/message.rs +174 -0
- offprint-0.0.3/offprint-rs/protocol/src/transfer.rs +401 -0
- offprint-0.0.3/offprint-rs/python/Cargo.toml +28 -0
- offprint-0.0.3/offprint-rs/python/src/lib.rs +683 -0
- offprint-0.0.3/offprint-rs/test-support/Cargo.toml +29 -0
- offprint-0.0.3/offprint-rs/test-support/src/lib.rs +19 -0
- offprint-0.0.3/offprint-rs/test-support/src/manifest/model.rs +137 -0
- offprint-0.0.3/offprint-rs/test-support/src/manifest.rs +870 -0
- offprint-0.0.3/offprint-rs/test-support/src/server/http.rs +515 -0
- offprint-0.0.3/offprint-rs/test-support/src/server/tests.rs +258 -0
- offprint-0.0.3/offprint-rs/test-support/src/server.rs +473 -0
- offprint-0.0.3/offprint-rs/transform/Cargo.toml +19 -0
- offprint-0.0.3/offprint-rs/transform/LICENSE +21 -0
- offprint-0.0.3/offprint-rs/transform/src/lib.rs +297 -0
- offprint-0.0.3/pyproject.toml +78 -0
- offprint-0.0.3/src/offprint/__init__.py +119 -0
- offprint-0.0.3/src/offprint/__init__.pyi +275 -0
- offprint-0.0.3/src/offprint/__main__.py +3 -0
- offprint-0.0.3/src/offprint/_api.py +384 -0
- offprint-0.0.3/src/offprint/_cli.py +10 -0
- offprint-0.0.3/src/offprint/_native.pyi +55 -0
- offprint-0.0.3/src/offprint/contracts.py +1516 -0
- offprint-0.0.3/src/offprint/exceptions.py +92 -0
- offprint-0.0.3/src/offprint/py.typed +1 -0
- offprint-0.0.0/PKG-INFO +0 -12
- offprint-0.0.0/README.md +0 -3
- offprint-0.0.0/pyproject.toml +0 -13
- offprint-0.0.0/pyproject.toml.orig +0 -17
- offprint-0.0.0/src/offprint/__init__.py +0 -3
offprint-0.0.3/PKG-INFO
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: offprint
|
|
3
|
+
Version: 0.0.3
|
|
4
|
+
Classifier: Development Status :: 3 - Alpha
|
|
5
|
+
Classifier: Programming Language :: Python
|
|
6
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
7
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
12
|
+
Classifier: Programming Language :: Rust
|
|
13
|
+
Classifier: Typing :: Typed
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
License-File: THIRD_PARTY_NOTICES.txt
|
|
16
|
+
Summary: Capture rendered web pages as verified self-contained artifacts
|
|
17
|
+
License-Expression: MIT
|
|
18
|
+
Requires-Python: >=3.10, <3.15
|
|
19
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
20
|
+
Project-URL: Documentation, https://peter-gy.github.io/offprint/
|
|
21
|
+
Project-URL: Issues, https://github.com/peter-gy/offprint/issues
|
|
22
|
+
Project-URL: Source, https://github.com/peter-gy/offprint
|
|
23
|
+
|
|
24
|
+
# `offprint` for Python
|
|
25
|
+
|
|
26
|
+
The `offprint` package captures rendered pages through the native Offprint
|
|
27
|
+
service and returns canonical capture records as dictionaries.
|
|
28
|
+
|
|
29
|
+
It supports Python 3.10 through 3.14 on Linux x86-64 with glibc, macOS arm64
|
|
30
|
+
and x86-64, and Windows x86-64.
|
|
31
|
+
|
|
32
|
+
Linux hosts also need Chromium's
|
|
33
|
+
[shared runtime libraries](https://peter-gy.github.io/offprint/start/install.html#linux-runtime-libraries).
|
|
34
|
+
|
|
35
|
+
## Capture from the command line
|
|
36
|
+
|
|
37
|
+
Run with [`uvx`](https://docs.astral.sh/uv/guides/tools/), uv's Python command runner:
|
|
38
|
+
|
|
39
|
+
```console
|
|
40
|
+
uvx offprint capture https://example.com --output example.html --quiet
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Use in an application
|
|
44
|
+
|
|
45
|
+
Install version 0.0.3:
|
|
46
|
+
|
|
47
|
+
```console
|
|
48
|
+
python -m pip install offprint==0.0.3
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
```python
|
|
52
|
+
import asyncio
|
|
53
|
+
|
|
54
|
+
from offprint import Offprint
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
async def main() -> None:
|
|
58
|
+
async with Offprint() as offprint:
|
|
59
|
+
receipt = await offprint.capture(
|
|
60
|
+
"https://example.com",
|
|
61
|
+
output="example.html",
|
|
62
|
+
)
|
|
63
|
+
artifact = receipt["artifact"]
|
|
64
|
+
assert artifact["kind"] == "file"
|
|
65
|
+
print(artifact["path"])
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
asyncio.run(main())
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
The first capture discovers a compatible Chrome, Chromium, or Microsoft Edge
|
|
72
|
+
installation. When discovery and the managed cache are empty, Offprint
|
|
73
|
+
downloads and verifies its pinned
|
|
74
|
+
[Chrome for Testing](https://googlechromelabs.github.io/chrome-for-testing/)
|
|
75
|
+
build.
|
|
76
|
+
|
|
77
|
+
## Requests and jobs
|
|
78
|
+
|
|
79
|
+
Inside the service context, create a request with native defaults, choose
|
|
80
|
+
memory output, and start a job:
|
|
81
|
+
|
|
82
|
+
```python
|
|
83
|
+
request = offprint.captures.request("https://example.com")
|
|
84
|
+
request["output"] = {"kind": "memory", "maxBytes": 16 * 1024 * 1024}
|
|
85
|
+
job = await offprint.captures.start(request)
|
|
86
|
+
receipt = await job.result()
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Use `job.events()` for progress and `job.cancel()` to request cancellation.
|
|
90
|
+
Use `async with` for a bounded lifetime, or await `close()` during shutdown.
|
|
91
|
+
`offprint.artifacts` inspects, verifies, and exports saved captures.
|
|
92
|
+
`offprint.browsers` manages browser discovery and installations.
|
|
93
|
+
|
|
94
|
+
Methods and keyword arguments use snake_case. Request and result dictionaries
|
|
95
|
+
use camelCase. Failures raise `OffprintError` subclasses with a stable `code`,
|
|
96
|
+
`stage`, and `retryable` flag.
|
|
97
|
+
|
|
98
|
+
Read the complete [Python integration guide](https://peter-gy.github.io/offprint/integrations/python.html),
|
|
99
|
+
[record reference](https://peter-gy.github.io/offprint/reference/records.html),
|
|
100
|
+
and [troubleshooting guide](https://peter-gy.github.io/offprint/operations/troubleshooting.html).
|
|
101
|
+
|
|
102
|
+
[`src/offprint/__init__.pyi`](./src/offprint/__init__.pyi) owns exact host
|
|
103
|
+
signatures. [`src/offprint/contracts.py`](./src/offprint/contracts.py)
|
|
104
|
+
owns importable generated canonical dictionary shapes.
|
|
105
|
+
|
|
106
|
+
Source contributors can follow the
|
|
107
|
+
[contributor setup](https://github.com/peter-gy/offprint/blob/main/development_docs/setup.md).
|
|
108
|
+
|
offprint-0.0.3/README.md
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# `offprint` for Python
|
|
2
|
+
|
|
3
|
+
The `offprint` package captures rendered pages through the native Offprint
|
|
4
|
+
service and returns canonical capture records as dictionaries.
|
|
5
|
+
|
|
6
|
+
It supports Python 3.10 through 3.14 on Linux x86-64 with glibc, macOS arm64
|
|
7
|
+
and x86-64, and Windows x86-64.
|
|
8
|
+
|
|
9
|
+
Linux hosts also need Chromium's
|
|
10
|
+
[shared runtime libraries](https://peter-gy.github.io/offprint/start/install.html#linux-runtime-libraries).
|
|
11
|
+
|
|
12
|
+
## Capture from the command line
|
|
13
|
+
|
|
14
|
+
Run with [`uvx`](https://docs.astral.sh/uv/guides/tools/), uv's Python command runner:
|
|
15
|
+
|
|
16
|
+
```console
|
|
17
|
+
uvx offprint capture https://example.com --output example.html --quiet
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Use in an application
|
|
21
|
+
|
|
22
|
+
Install version 0.0.3:
|
|
23
|
+
|
|
24
|
+
```console
|
|
25
|
+
python -m pip install offprint==0.0.3
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
```python
|
|
29
|
+
import asyncio
|
|
30
|
+
|
|
31
|
+
from offprint import Offprint
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
async def main() -> None:
|
|
35
|
+
async with Offprint() as offprint:
|
|
36
|
+
receipt = await offprint.capture(
|
|
37
|
+
"https://example.com",
|
|
38
|
+
output="example.html",
|
|
39
|
+
)
|
|
40
|
+
artifact = receipt["artifact"]
|
|
41
|
+
assert artifact["kind"] == "file"
|
|
42
|
+
print(artifact["path"])
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
asyncio.run(main())
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
The first capture discovers a compatible Chrome, Chromium, or Microsoft Edge
|
|
49
|
+
installation. When discovery and the managed cache are empty, Offprint
|
|
50
|
+
downloads and verifies its pinned
|
|
51
|
+
[Chrome for Testing](https://googlechromelabs.github.io/chrome-for-testing/)
|
|
52
|
+
build.
|
|
53
|
+
|
|
54
|
+
## Requests and jobs
|
|
55
|
+
|
|
56
|
+
Inside the service context, create a request with native defaults, choose
|
|
57
|
+
memory output, and start a job:
|
|
58
|
+
|
|
59
|
+
```python
|
|
60
|
+
request = offprint.captures.request("https://example.com")
|
|
61
|
+
request["output"] = {"kind": "memory", "maxBytes": 16 * 1024 * 1024}
|
|
62
|
+
job = await offprint.captures.start(request)
|
|
63
|
+
receipt = await job.result()
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Use `job.events()` for progress and `job.cancel()` to request cancellation.
|
|
67
|
+
Use `async with` for a bounded lifetime, or await `close()` during shutdown.
|
|
68
|
+
`offprint.artifacts` inspects, verifies, and exports saved captures.
|
|
69
|
+
`offprint.browsers` manages browser discovery and installations.
|
|
70
|
+
|
|
71
|
+
Methods and keyword arguments use snake_case. Request and result dictionaries
|
|
72
|
+
use camelCase. Failures raise `OffprintError` subclasses with a stable `code`,
|
|
73
|
+
`stage`, and `retryable` flag.
|
|
74
|
+
|
|
75
|
+
Read the complete [Python integration guide](https://peter-gy.github.io/offprint/integrations/python.html),
|
|
76
|
+
[record reference](https://peter-gy.github.io/offprint/reference/records.html),
|
|
77
|
+
and [troubleshooting guide](https://peter-gy.github.io/offprint/operations/troubleshooting.html).
|
|
78
|
+
|
|
79
|
+
[`src/offprint/__init__.pyi`](./src/offprint/__init__.pyi) owns exact host
|
|
80
|
+
signatures. [`src/offprint/contracts.py`](./src/offprint/contracts.py)
|
|
81
|
+
owns importable generated canonical dictionary shapes.
|
|
82
|
+
|
|
83
|
+
Source contributors can follow the
|
|
84
|
+
[contributor setup](https://github.com/peter-gy/offprint/blob/main/development_docs/setup.md).
|