Generated from the public API implemented by https://api.allscreenshots.com. Visit https://allscreenshots.com for an account and API key.
The package is at this repository root. The browser demo is in sample-app. Run python3 tools/verify.py --build --fixture to build and check quota, sync/async capture, binary downloads, replay safety, and error handling without spending credits.
Capture and download operations with mixed content types return raw bodies (python native bytes/blob/file/response). This avoids corrupting binary images through JSON decoding. For responseType URL or BASE64, decode the raw JSON into the generated ScreenshotJsonResponse model; the demo shows URL capture and a download through the same SDK. Other endpoints return generated typed models.
sdk-provenance.json records the canonical contract, generator, configuration, template, dependency, and toolchain hashes. Do not edit generated sources; update the backend contract or generation inputs in api.allscreenshots.com/sdk-generation.
Capture websites, manage jobs, compose images, schedule captures, crawl sites, and read usage.
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 1.0.0
- Package version: 2.0.0
- Generator version: 7.25.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
Python 3.10+
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/allscreenshots/allscreenshots-sdk-python.git(you may need to run pip with root permission: sudo pip install git+https://github.com/allscreenshots/allscreenshots-sdk-python.git)
Then import the package:
import allscreenshots_sdkInstall via Setuptools.
python setup.py install --user(or sudo python setup.py install to install the package for all users)
Then import the package:
import allscreenshots_sdkExecute pytest to run the tests.
Please follow the installation procedure and then run the following:
import allscreenshots_sdk
from allscreenshots_sdk.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.allscreenshots.com
# See configuration.py for a list of all supported configuration parameters.
configuration = allscreenshots_sdk.Configuration(
host = "https://api.allscreenshots.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKey
configuration.api_key['ApiKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'
# Enter a context with an instance of the API client
with allscreenshots_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = allscreenshots_sdk.BulkApi(api_client)
id = 'id_example' # str |
try:
api_response = api_instance.cancel_bulk_job(id)
print("The response of BulkApi->cancel_bulk_job:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling BulkApi->cancel_bulk_job: %s\n" % e)All URIs are relative to https://api.allscreenshots.com
| Class | Method | HTTP request | Description |
|---|---|---|---|
| BulkApi | cancel_bulk_job | POST /v1/screenshots/bulk/{id}/cancel | |
| BulkApi | create_bulk_job | POST /v1/screenshots/bulk | |
| BulkApi | get_bulk_job_status | GET /v1/screenshots/bulk/{id} | |
| BulkApi | list_bulk_jobs | GET /v1/screenshots/bulk | |
| ComposeApi | compose | POST /v1/screenshots/compose | |
| ComposeApi | get_compose_job_status | GET /v1/screenshots/compose/jobs/{jobId} | |
| ComposeApi | get_layout_preview | GET /v1/screenshots/compose/preview | |
| ComposeApi | list_compose_jobs | GET /v1/screenshots/compose/jobs | |
| CrawlApi | cancel | POST /v1/crawls/{id}/cancel | |
| CrawlApi | create | POST /v1/crawls | |
| CrawlApi | delete | DELETE /v1/crawls/{id} | |
| CrawlApi | get | GET /v1/crawls/{id} | |
| CrawlApi | list | GET /v1/crawls | |
| CrawlApi | output | GET /v1/crawls/{id}/pages/{pageId}/outputs/{output} | |
| CrawlApi | pages | GET /v1/crawls/{id}/pages | |
| JobApi | cancel_job | POST /v1/screenshots/jobs/{id}/cancel | |
| JobApi | create_async_job | POST /v1/screenshots/async | |
| JobApi | get_job_output_result | GET /v1/screenshots/jobs/{id}/result/{outputId} | |
| JobApi | get_job_result | GET /v1/screenshots/jobs/{id}/result | |
| JobApi | get_job_status | GET /v1/screenshots/jobs/{id} | |
| JobApi | list_jobs | GET /v1/screenshots/jobs | |
| ScheduleApi | create_schedule | POST /v1/schedules | |
| ScheduleApi | delete_schedule | DELETE /v1/schedules/{id} | |
| ScheduleApi | get_execution_history | GET /v1/schedules/{id}/history | |
| ScheduleApi | get_schedule | GET /v1/schedules/{id} | |
| ScheduleApi | list_schedules | GET /v1/schedules | |
| ScheduleApi | pause_schedule | POST /v1/schedules/{id}/pause | |
| ScheduleApi | resume_schedule | POST /v1/schedules/{id}/resume | |
| ScheduleApi | trigger_schedule | POST /v1/schedules/{id}/trigger | |
| ScheduleApi | update_schedule | PUT /v1/schedules/{id} | |
| ScreenshotApi | capture_sync | POST /v1/screenshots | |
| ScreenshotApi | get_sync_capture_output_result | GET /v1/screenshots/captures/{id}/result/{outputId} | |
| ScreenshotApi | get_sync_capture_result | GET /v1/screenshots/captures/{id}/result | |
| ScreenshotApi | submission_status | GET /v1/screenshots/submissions/{key} | |
| UsageApi | get_activity | GET /v1/usage/activity | |
| UsageApi | get_quota | GET /v1/usage/quota | |
| UsageApi | get_usage | GET /v1/usage | |
| UsageApi | get_usage_by_key | GET /v1/usage/keys |
- ApiKeyUsageDetail
- ApiKeyUsageResponse
- AsyncJobCreatedResponse
- BandwidthQuotaResponse
- BorderConfig
- BrowserCookieRequest
- BrowserHeaderRequest
- BrowserSessionRequest
- BrowserStorageOriginRequest
- BulkDefaults
- BulkJobDetailInfo
- BulkJobInfo
- BulkJobSummary
- BulkRequest
- BulkResponse
- BulkStatusResponse
- BulkUrlOptions
- BulkUrlRequest
- CaptureDefaults
- CaptureInfo
- CaptureItem
- CaptureUsageCounts
- ClickAction
- ComposeJobCreatedResponse
- ComposeJobStatusResponse
- ComposeJobSummaryResponse
- ComposeMetadata
- ComposeOutputConfig
- ComposeRequest
- ComposeResponse
- CrawlCreatedResponse
- CrawlListResponse
- CrawlPageOutputResponse
- CrawlPageResponse
- CrawlPagesResponse
- CrawlProgressResponse
- CrawlRequest
- CrawlResponse
- CreateScheduleRequest
- CreditBalanceResponse
- DailyCaptureCountResponse
- DeliveryDestination
- EmailDestination
- ErrorDetail
- ErrorResponse
- HoverAction
- HtmlOutputSpec
- JobResponse
- JsonFieldSpec
- JsonOutputSpec
- LabelConfig
- LayoutPreviewResponse
- MarkdownOutputSpec
- MultiOutputResponse
- OutputInfo
- OutputSpec
- PageAction
- PdfOutputSpec
- PeriodUsageResponse
- PlacementPreview
- PressAction
- QuotaDetailResponse
- QuotaResponse
- QuotaStatusResponse
- ScheduleExecutionResponse
- ScheduleHistoryResponse
- ScheduleListResponse
- ScheduleResponse
- ScheduleScreenshotOptions
- ScreenshotJsonResponse
- ScreenshotOutputSpec
- ScreenshotRequest
- ScrollAction
- SelectAction
- ShadowConfig
- TotalsResponse
- TypeAction
- UpdateScheduleRequest
- UsageOrganizationResponse
- UsageResponse
- VariantConfig
- ViewportConfig
- WaitAction
- WebhookDestination
Authentication schemes defined for the API:
- Type: API key
- API key parameter name: X-API-Key
- Location: HTTP header