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.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.1-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: identify_sdk-0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 7548a8f33bb0b8e54d903792fbc5b6d88220e68229395384f49a352234da6bbe
MD5 4b9108101f22c37716051062e3e0d8d9
BLAKE2b-256 552b6cf65db1d40706a509f2dca32e480fec0fb6767cd60b443b6c42af7edec3

See more details on using hashes here.

Provenance

The following attestation bundles were made for identify_sdk-0.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: identify_sdk-0.1.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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b3938543e548f2869c4ee257d44514cd8f861a18ce224a56a16344f333ef059e
MD5 d1a6dda52511685525c8a9900dad0733
BLAKE2b-256 e25cf40fe8ec2492a87ac4b08bc127becb5461bfcded3f303d60572ea6fb46fa

See more details on using hashes here.

Provenance

The following attestation bundles were made for identify_sdk-0.1.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