Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

PermitPlane Python application client

Registry preview: 0.1.0a1, CPython 3.10+ on Windows x64. Other platform packages are not part of this preview. Use the documented staging download until registry publication is confirmed.

Install the permitplane-client wheel from your PermitPlane download. This package uses CPython 3.10 or later. The Microsoft Windows x64 binary wheel includes the native library and its protected default host. The Linux x64 binary wheel includes the native library and requires a custom host. Source installs require an explicit trusted native library.

  1. Bundle the public permitplane.json from your product's console with your application. Resolve it from an application-owned absolute location.
  2. Initialize the SDK and activate only in response to a user action.
  3. Check an entitlement by its configured feature code.
  4. Show the native status and persist trusted state during orderly shutdown.
from pathlib import Path
from permitplane import PPLicense, PermitPlaneError

PPLicense.initialize(config_path=Path(__file__).resolve().with_name("permitplane.json"))
try:
    # Call PPLicense.activate(user_entered_key) from your activation action.
    if PPLicense.is_licensed("export"):
        # Enable your app's export action here.
        pass
    print(PPLicense.status()["status"])
finally:
    PPLicense.shutdown()

Activation errors raise PermitPlaneError with native code and, when available, api_code, http_status, retry_after, request_id, and service_message. Feature checks return false when the licence cannot be checked. They may block for network I/O when the native schedule requests a refresh. Use await PPLicense.is_licensed_async("export") from an asyncio event loop. Cancellation stops waiting for the result. The already-started worker and its native request can complete under the configured transport timeout.

Full client

Use PPLicense.client() for the shared client, or construct a PermitPlaneClient(config, native_path=absolute_library_path, host=my_host) and manage it with a context manager. Direct clients can call persist() before closing to save the trusted-time high-water mark.

  • Hosted approval and trials use start_hosted_approval(), pending_approval(), and advance_approval(). Your app presents the verification URL and polls on the advertised interval. Use start_vendor_enrollment() to obtain a public vendor enrollment intent. cancel_approval() abandons the local flow.
  • For offline exchange, export create_offline_request(OfflineRequestKind.ACTIVATE) and pass the vendor's signed reply to import_offline_response(text). OfflineRequestKind.DEACTIVATE creates the release request and ends access locally.
  • Call checkout_seat() for an online seat or supply borrow_hours for a borrow. Use the native status()["heartbeat_in_seconds"] to schedule renew_seat() during your process lifecycle. Return an online seat with release_seat(). Call deactivate() for installation release.
  • has_feature() and feature_value() read the native decision without network I/O. Direct clients own any refresh scheduling and may use status()["refresh_in_seconds"].
  • SignedLicenseFile(keys, text, context) verifies an issued signed file. Grant(keys, token, context) verifies a grant and exposes its authenticated commercial deadline. Supply trusted UTC time, pinned keys and application scope from your configuration. Signed-file consumers own the trusted clock and persisted high-water mark. Both handle types support context managers.

Native and host services

The Windows default host uses DPAPI-protected storage and signing keys and WinHTTP. For a Windows service, select scope=StoreScope.MACHINE explicitly. On other platforms supply a Host adapter for protected state, protected P-256 signing, a trustworthy suspend-inclusive clock and verified HTTPS with timeouts and redirects disabled. See the public Host protocol for callback contracts. Provide adapters that are safe to call from different application threads. Keep callbacks bounded and avoid calls into the SDK from a callback.

Supply an absolute native_path when using a trusted external native artifact. Protect the application, native library, configuration and their parent directories from untrusted writes. The SDK never searches the working directory for native libraries or product configuration. A child process must create its own installation client and host after fork. Use a fresh interpreter for the process-wide facade.

Development

Run python -m unittest discover -s tests from this directory with PERMITPLANE_TEST_NATIVE set to the absolute release library path. The scripted custom-host tests also use PERMITPLANE_TEST_SIGNER_NATIVE for a separate native library with test signing enabled.

Metadata

Release files for permitplane-client 0.1.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for permitplane-client 0.1.0a1
File Interpreter ABI Platform Actions
permitplane_client-0.1.0a1-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for permitplane_client-0.1.0a1-py3-none-win_amd64.whl

Release files / permitplane_client-0.1.0a1-py3-none-win_amd64.whl

Download URL permitplane_client-0.1.0a1-py3-none-win_amd64.whl
Size 522.3 kB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
c736c95b8377a63df19d7b9832e671b5ab9653e2a77c31d71dfad16dab0012cf
BLAKE2b-256 checksum
How to use checksums
fbc140e2227cd99d7fdf488b173a35bff174183bc3d37fc81d96b8225f4cae80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Security for permitplane-client 0.1.0a1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page