Skip to main content

A Python SDK for OAuth 2.0 functionality implementing multiple OAuth 2.0 standards

Project description

Keycard OAuth SDK

A comprehensive Python SDK for OAuth 2.0 functionality implementing multiple OAuth 2.0 standards for enterprise-grade token management.

Requirements

  • Python 3.9 or greater
  • Virtual environment (recommended)

Setup Guide

Option 1: Using uv (Recommended)

If you have uv installed:

# Create a new project with uv
uv init my-oauth-project
cd my-oauth-project

# Create and activate virtual environment
uv venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

Option 2: Using Standard Python

# Create project directory
mkdir my-oauth-project
cd my-oauth-project

# Create and activate virtual environment
python3 -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Upgrade pip (recommended)
pip install --upgrade pip

Installation

uv add keycardai-oauth

Quick Start

from keycardai.oauth import Client

with Client("https://oauth.example.com/token") as client:
    response = await client.exchange_token(
        subject_token="original_token",
        subject_token_type=TokenTypes.ACCESS_TOKEN,
        resource="https://api.example.com"
    )

Development

This package is part of the Keycard Python SDK workspace.

To develop:

# From workspace root
uv sync
uv run --package keycardai-oauth pytest

License

MIT License - see LICENSE file for details.

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

keycardai_oauth-0.6.0.tar.gz (69.3 kB view details)

Uploaded Source

Built Distribution

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

keycardai_oauth-0.6.0-py3-none-any.whl (40.0 kB view details)

Uploaded Python 3

File details

Details for the file keycardai_oauth-0.6.0.tar.gz.

File metadata

  • Download URL: keycardai_oauth-0.6.0.tar.gz
  • Upload date:
  • Size: 69.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for keycardai_oauth-0.6.0.tar.gz
Algorithm Hash digest
SHA256 bf01ad87f9044170fd8a370f9c1764142c9d31bfb3cbc5b062381286547db8f1
MD5 3a8c69ccbadb265e971c2408cb2058ff
BLAKE2b-256 77e03d71787a38024122b835588bfb2b2de141e03cb9c0e50941b02f0c43602e

See more details on using hashes here.

File details

Details for the file keycardai_oauth-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: keycardai_oauth-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 40.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for keycardai_oauth-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 299f36e04fc160d29a8f85efadc0b03227697daf56251efd4aca3a23abc44f79
MD5 2dbe62066cf4eba1c2046fb014048049
BLAKE2b-256 7e2dd3d7e57aa5f963e58b8c7a7d8cf2a5978db0d034f9f97c7e62d94b608968

See more details on using hashes here.

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