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.
- Bundle the public
permitplane.jsonfrom your product's console with your application. Resolve it from an application-owned absolute location. - Initialize the SDK and activate only in response to a user action.
- Check an entitlement by its configured feature code.
- 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(), andadvance_approval(). Your app presents the verification URL and polls on the advertised interval. Usestart_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 toimport_offline_response(text).OfflineRequestKind.DEACTIVATEcreates the release request and ends access locally. - Call
checkout_seat()for an online seat or supplyborrow_hoursfor a borrow. Use the nativestatus()["heartbeat_in_seconds"]to schedulerenew_seat()during your process lifecycle. Return an online seat withrelease_seat(). Calldeactivate()for installation release. has_feature()andfeature_value()read the native decision without network I/O. Direct clients own any refresh scheduling and may usestatus()["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)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| 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.