Skip to main content

trimble-id

Trimble Identity SDK for Python

Getting Started

Installation

You can install with pip:

pip install trimble-id

Configure Trimble Identity

Create a new application in the Trimble Developer Console portal and configure the following settings:

To register your application in Trimble Developer Console:

  1. On the left pane select "Applications".

  2. On the Applications home page, in the top right corner select + NEW APPLICATION. The Create Application page displays.

  3. Select Continue to enter the applications details.

    Field Description
    Name Name of your application
    Description Provide a description for the application.
  4. Configure OAuth application grant types Client Credentials in order to use this SDK.

  5. Select "Create Application" to save changes.

Take note of the Client ID and URLs under the "Basic Information" section. You'll need these values to configure the SDK.

Scopes

Trimble Identity uses scopes to determine the aud claim in the returned access token. Scope is mandatory for the application to work. You can use the scope as the application name registered in the Trimble Developer Console. For example, if you have registered an application with the name "test", then it must be registered in the format {some_uuid}-"test". For eg., 12345678-1234-1234-1234-123456789012-test.

For more information, see Authentication documentation.

Usage Reference

Well-Known URL endpoint

The well-known URL endpoint is used to retrieve the authorization, token and user info endpoints for a given environment. The following endpoints are available for the staging and production environments:

Endpoint https://id.trimble.com/.well-known/openid-configuration

OpenID Endpoint Provider

This endpoint provider is used to retrieve the endpoints from a well-known URL endpoint.

Usage

from trimble.id import OpenIdEndpointProvider

endpoint_provider = OpenIdEndpointProvider("https://id.trimble.com/.well-known/openid-configuration")
auth_endpoint = await endpoint_provider.retrieve_authorization_endpoint()
token_endpoint = await endpoint_provider.retrieve_token_endpoint()

Fixed Endpoint Provider

This endpoint provider is used to provide a fixed set of endpoints.

Usage

from trimble.id import FixedEndpointProvider

endpoint_provider = FixedEndpointProvider("https://authorization.url", "https://token.url", "https://userinfo.url")
endpoint = await endpoint_provider.retrieve_authorization_endpoint()

Client Credential Token Provider

This token provider is used to retrieve an access token using the client credentials grant type.

Usage

from trimble.id import ClientCredentialTokenProvider

token_provider = ClientCredentialTokenProvider(endpoint_provider, "client_id", "client_secret").with_scopes(["scope"])

access_token = await token_provider.retrieve_token()

NOTE: Refer samples for better understanding.

Sample Code

See here for Sample Code for reference.

Release notes

See here for releases

Raise an issue

To provide feedback or report a bug, please raise an issue on our issue tracker.

Support

Send email to support@trimble.com

Metadata

Release files for trimble-id 0.1.1

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

Source distribution (sdist)

Source distribution for trimble-id 0.1.1
File Size Uploaded Provenance
trimble_id-0.1.1.tar.gz 11.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for trimble-id 0.1.1
File Interpreter ABI Platform
trimble_id-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 27.0 kB

Release files / trimble_id-0.1.1.tar.gz

Download URL trimble_id-0.1.1.tar.gz
Size 11.8 kB
Tags Source
SHA-256 checksum
How to use checksums
713f5679add8b736a53f53f76175c201a3155be53ae8549a13617bb7f5941767
BLAKE2b-256 checksum
How to use checksums
714fa7b64fe97006e7c158408ff13949e1015c2ed01332ecf98f71ff15a786f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.20

Release files / trimble_id-0.1.1-py3-none-any.whl

Download URL trimble_id-0.1.1-py3-none-any.whl
Size 15.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c32ef561e412965ca6b34c3d6803e6440e426888cece1becbb81884d149cfd37
BLAKE2b-256 checksum
How to use checksums
7149d24edab165c46691a39a939ac28127e0f3671ad8302616be960bd82edd62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.20

Security for trimble-id 0.1.1

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.

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