Skip to main content

Python client SDK for the BPC (Bound Pair Credentials) request-signing protocol — device-bound cryptographic identity for APIs

Project description

bpc-client

Python client SDK for the BPC (Bound Pair Credentials) protocol — cryptographic device-binding and per-request signing for APIs.

BPC replaces static API keys with a multi-factor, per-request signing protocol. Every request is signed with an ECDSA P-256 device key, a user-chosen secret (HMAC-derived), a fresh nonce, and a timestamp. Stolen credentials are useless without the device key.

Install

pip install bpc-client

3-Line Integration

from bpc_client import BPCClient

# Register a new pair (development mode — auto-approved)
client = BPCClient.register(base_url="https://api.example.com", name="my-app", secret="MySecret1!")

# Every request is automatically signed
response = client.get("/api/data")
response = client.post("/api/items", json={"name": "test"})

CLI

bpc pair register --url https://api.example.com --name my-app --secret MySecret1!
bpc pair list
bpc status --name my-app
bpc audit --name my-app
bpc request GET /api/data --name my-app

MCP Server (Claude Desktop)

{
  "mcpServers": {
    "bpc": { "command": "bpc-mcp" }
  }
}

Protocol

BPC implements a 12-step server-side verification pipeline: device key (ECDSA P-256) + secret (HMAC-SHA-256) + nonce (UUID) + timestamp (60s window) + body hash (SHA-256) + scope enforcement.

See the full spec.

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

bpc_client-1.0.0.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

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

bpc_client-1.0.0-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file bpc_client-1.0.0.tar.gz.

File metadata

  • Download URL: bpc_client-1.0.0.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0rc1

File hashes

Hashes for bpc_client-1.0.0.tar.gz
Algorithm Hash digest
SHA256 2ea1e4844eea2d4541c01cbc7ff05b4fb8dbd345f00300edccfbac813af7bec6
MD5 9762febb89ade3559f402d326e9cd83c
BLAKE2b-256 96f9a2e961c67c0a8f1079c547de0c3758a792e7e31dfea9543470fea50f4bff

See more details on using hashes here.

File details

Details for the file bpc_client-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: bpc_client-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 14.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0rc1

File hashes

Hashes for bpc_client-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9723a8fb86c4c81f87f4fc6624323c93ce6b23bfad8dce375ce6c7e91997b6a1
MD5 4f8f1a74222ef9230bc0aa3830fbc46b
BLAKE2b-256 c4dd6c23c6285c0f6ba01080af2db0cac7f460873379e61e6c90c403e5beff50

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