Skip to main content

Python client for the Identify auth service

Project description

identify-sdk (Python)

Python client for identify — a self-hosted modular authentication service.

Installation

pip install identify-sdk

Usage

from identify_sdk import IdentifyClient, IdentifyError

client = IdentifyClient(base_url="http://localhost:8080")

# Exchange username + password for a JWT
resp = client.login_with_password("user@example.com", "secret")
token = resp.token

# Validate a JWT
result = client.validate_token(token)
print(result.valid, result.identity.primary_identifier)

# Get identity for an authenticated token
identity = client.get_me(token)

Error handling

try:
    resp = client.login_with_password("user@example.com", "wrong")
except IdentifyError as e:
    print(e.status_code, str(e))  # 401, "HTTP 401: ..."

Full documentation: github.com/1909-pramod/identify-sdk

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

identify_sdk-0.1.0.1.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

identify_sdk-0.1.0.1-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file identify_sdk-0.1.0.1.tar.gz.

File metadata

  • Download URL: identify_sdk-0.1.0.1.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for identify_sdk-0.1.0.1.tar.gz
Algorithm Hash digest
SHA256 e28d3ff0db53af2bff7151e8a17e6f78d6482da85cda11ab8b7df6bda4d3fa37
MD5 a6477647780552124b7cfabfe71c52ed
BLAKE2b-256 8d2f2aed0f40aa3c7bcb33cb4407269beae96b8e02c2cdb64634a41df3c166b2

See more details on using hashes here.

Provenance

The following attestation bundles were made for identify_sdk-0.1.0.1.tar.gz:

Publisher: publish-pypi.yml on 1909-pramod/identify-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file identify_sdk-0.1.0.1-py3-none-any.whl.

File metadata

  • Download URL: identify_sdk-0.1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for identify_sdk-0.1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0bd891545db5dbd76e096b96180b6861b0787d2594b459816c64967b8fe81919
MD5 41e3592a5610e9ff1b336e5e4a3e420a
BLAKE2b-256 fcceadf6ef8403078780fa0dcbf4dd4e6f8a23debcc5950121fd9deef77a1134

See more details on using hashes here.

Provenance

The following attestation bundles were made for identify_sdk-0.1.0.1-py3-none-any.whl:

Publisher: publish-pypi.yml on 1909-pramod/identify-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page