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

Uploaded Python 3

File details

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

File metadata

  • Download URL: identify_sdk-0.1.0.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.tar.gz
Algorithm Hash digest
SHA256 725acaf2e961b3918f5613871774c3e2a584a236c69dfb8b2c9aa50e7cf2230d
MD5 46bfbf52665caa8f14a43213d9a6503a
BLAKE2b-256 b82225bacfdc1c3d3f3e339c371376437d47573f02c9d6086ffbdeacf90fb3d9

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: identify_sdk-0.1.0-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-py3-none-any.whl
Algorithm Hash digest
SHA256 2e4a25e348c3e8c6453d0dbf5e6ba3e64de16ebbcec834c979d741d62cd07b0f
MD5 d21a32ce803912c1750f1223761c7ae8
BLAKE2b-256 352e9a6f287dae35752ae1c5ee5d9c581f14cb2e4eb97876dc6a5deb280065a0

See more details on using hashes here.

Provenance

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