Pingera Python SDK
The official Python SDK for the Pingera monitoring and status page platform API. It is generated from the Pingera OpenAPI specification, so it covers every endpoint and ships typed Pydantic models for all requests and responses.
Installation
pip install pingera-sdk
Requires Python 3.10 or newer.
Quick start
Create an API token in the Pingera app under Settings → API tokens and export it:
export PINGERA_API_KEY="your_api_token"
import os
from pingera import ApiClient, ChecksApi, Configuration, StatusPagesApi, StatusPagesComponentsApi
configuration = Configuration() # defaults to https://api.pingera.ru
configuration.api_key["apiKeyAuth"] = os.environ["PINGERA_API_KEY"]
with ApiClient(configuration) as api_client:
pages = StatusPagesApi(api_client).v1_pages_get()
print(f"Found {len(pages.pages)} status pages")
checks = ChecksApi(api_client).v1_checks_get(page=1, page_size=10)
for check in checks.checks:
print(check.name, check.type, check.status)
components = StatusPagesComponentsApi(api_client).v1_pages_page_id_components_get("your_page_id")
print(f"Found {len(components)} components")
Authentication
Use an API token (recommended for scripts and integrations):
configuration.api_key["apiKeyAuth"] = "your_api_token"
Or a JWT access token obtained by logging in:
configuration = Configuration(access_token="your_jwt")
Available APIs
All API classes can be imported from pingera or pingera.api. Method names follow the endpoint
path and HTTP method, e.g. GET /v1/checks/{check_id} is ChecksApi.v1_checks_check_id_get.
| API class | Purpose |
|---|---|
ChecksApi |
Monitoring checks, results, regions, uptime and status history |
CheckGroupsApi |
Group checks together |
CheckSecretsApi / SecretsApi |
Secrets and their assignment to checks |
ChecksUnifiedResultsApi |
Unified results across checks |
ExecutionGroupsApi |
Multi-region execution results |
OnDemandChecksApi |
Run checks on demand and poll for results |
HeartbeatsApi |
Heartbeat (cron job) monitoring |
PrivateLocationsApi |
Private locations and runner tokens for self-hosted runners |
AlertsApi |
Alerts, alert rules and notification channels |
StatusPagesApi |
Status pages, custom sender email domains |
StatusPagesComponentsApi |
Status page components and their uptime |
StatusPagesIncidentsApi |
Incidents, maintenance and postmortems |
PagePasswordsApi |
Password protection for status pages |
ReportsApi |
PDF report generation |
AuditApi |
Organization audit trail |
OrganizationsApi / UsageApi |
Organization settings, plans, subscriptions and usage |
UsersApi / AuthEnhancedApi / OAuthApi / WebauthnApi |
Users, API tokens and authentication |
The full reference for every method and model is in client/README.md and client/docs/.
Working with models
from pingera import StatusPagesIncidentsApi
from pingera.models import IncidentCreate, IncidentUpdateCreate
incidents_api = StatusPagesIncidentsApi(api_client)
incident = incidents_api.v1_pages_page_id_incidents_post(
"your_page_id",
IncidentCreate(
name="Database connectivity issues",
body="We are investigating connectivity issues",
status="investigating",
impact="major",
),
)
incidents_api.v1_pages_page_id_incidents_incident_id_incident_updates_post(
"your_page_id",
incident.id,
IncidentUpdateCreate(status="identified", body="The cause has been found"),
)
Models can be converted with to_dict() / to_json() and created with from_dict() / from_json().
Error handling
Failed requests raise pingera.ApiException, or a subclass for common statuses
(BadRequestException, UnauthorizedException, ForbiddenException, NotFoundException,
ServiceException):
from pingera.exceptions import ApiException, NotFoundException
try:
check = ChecksApi(api_client).v1_checks_check_id_get("missing")
except NotFoundException:
print("Check not found")
except ApiException as e:
print(f"API error {e.status}: {e.body}")
Examples
See the examples/ directory:
basic_usage.py- client setup and basic callsstatus_pages_management.py- status page CRUDcomponent_management.py- component CRUDincident_management.py- incidents and maintenancelist_regions.py- available check regionson_demand_synthetic_check.py- run a Playwright check on demand and wait for the resultcomprehensive_sdk_usage.pyandgenerated_client_usage.py- tours of most APIs
The examples read PINGERA_API_KEY (or PINGERA_BEARER_TOKEN) and, where needed, PINGERA_PAGE_ID.
Development
pip install -e ".[dev]"
pytest
Regenerating the client
The SDK is generated with OpenAPI Generator, run through Docker:
python generate_client.py # fetch https://api.pingera.ru/openapi.json and regenerate
python generate_client.py --spec spec.json # regenerate from a local spec file
python generate_client.py --check # only check whether the SDK matches the live API
The script stores the spec in openapi/openapi.json and rewrites
client/pingera/, client/docs/ and client/README.md. Don't edit those generated files by hand.
Use --runner local to call a locally installed openapi-generator-cli instead of Docker.
A scheduled workflow runs --check against the live API every
day, so new endpoints, fields and enum values are noticed quickly.
Releasing
Releases are published to PyPI by the Release workflow when a
vX.Y.Z tag is pushed:
-
Bump
versionin pyproject.toml (the only place it is defined) and runpython generate_client.py --spec openapi/openapi.jsonso the generated code picks up the new version (usepython generate_client.pyinstead to also pull the latest API spec). -
Add a
## X.Y.Zsection to CHANGELOG.md; it becomes the GitHub release notes. -
Merge to
main, then tag the merge commit and push the tag:git switch main && git pull git tag v1.2.0 git push origin v1.2.0
The workflow checks that the tag matches the package version, runs the tests, builds the package, publishes it to PyPI with Trusted Publishing (no API tokens), and creates a GitHub release with the changelog section and the built files attached.
License
MIT, see LICENSE.
Links
Metadata
Release files for pingera-sdk 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pingera_sdk-1.1.0.tar.gz | 172.6 kB | With provenance | Details for pingera_sdk-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pingera_sdk-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for pingera_sdk-1.1.0-py3-none-any.whl |
Total release size: 592.2 kB
Release files / pingera_sdk-1.1.0.tar.gz
| Download URL | pingera_sdk-1.1.0.tar.gz |
|---|---|
| Size | 172.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8cb7400ec7dc9ee282f13bf6364f19b2fc54855f132b43ec1e71a97dd4cba870
|
|
BLAKE2b-256 checksum How to use checksums |
102594e88d9e32c8a0ac8ddbb202e1222c17b595b25617b62508527d2460e570
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.
Transparency logRelease files / pingera_sdk-1.1.0-py3-none-any.whl
| Download URL | pingera_sdk-1.1.0-py3-none-any.whl |
|---|---|
| Size | 419.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0d8e09afbd636da5189c9685e5ead7f199931cf1c08a7d5131f74458e75d985d
|
|
BLAKE2b-256 checksum How to use checksums |
e0ff1f3879e28a5120c097adf785a9ccecc6e158b07761d023fe6de704887b32
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.
Transparency logSecurity for pingera-sdk 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for pingera_sdk-1.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.