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

Uploaded Python 3

File details

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

File metadata

  • Download URL: identify_sdk-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 85eb5ea7a811a905d60a47fa483dbada43b7c713c371e816e24927aa74a875d5
MD5 af756e4b07fe457fdff9cf0b60dd8aa5
BLAKE2b-256 003231e633455888c2bf19fd59612c5967780d3950e1e38df5dea1daade524e1

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: identify_sdk-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9bd63d3d3d7847e7dec47592551a52815afd8b29c28177d31a05a78115031f9e
MD5 8459b7bfa5710e26f39f09e20de21170
BLAKE2b-256 7a6e0c3dda83525b527f193fb00003e6a411a2e56b4723ca3ffe1149eac21e90

See more details on using hashes here.

Provenance

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