Skip to main content

account-connections

Python connection ownership, lifecycle, explicit sharing and per-call admission for authenticated applications. The library stores control records; applications keep their own credentials, provider clients, budgets and caches.

Owners offer access. Recipients choose in one action and can switch between owned and shared connections, including after disconnecting their own. Offers never change routing. Revoke, leave and scope changes never fall back. Reissued grants have new revisions; an old selection cannot regain access.

Modules

The original dependency-free rules and ui interfaces remain available. Optional people, subjects, controls, admission, migrations and testing modules add private POSIX control storage and an application conformance suite. Install account-connections[web] for Starlette management routes using signin-window >= 0.13.0. The base package does not import web, browser or identity dependencies.

See the adapter contract for the complete integration API, lock order, migration protocol and executable conformance fixture.

The v1 canonical storage and controls require POSIX. They use process-safe file locks, private ownership/mode checks, no-follow opens and durable directory writes. Applications supporting Windows must construct canonical authority only inside an explicit POSIX mode and retain their portable native authority elsewhere. Replacing file locks alone does not provide Windows support.

Optional module imports are portable; constructing canonical storage on an unqualified platform fails before creating authority state. The internal platform boundary includes durable removal as well as storage and process locks. A Windows backend remains unregistered pending native qualification.

Host contract

The host authenticates the actor, checks current application membership and selects the provider namespace. The library validates canonical records. The actor and owner come from those bindings, never an untrusted tool parameter. Only owners may acquire credentials, disconnect or offer access. Recipients cannot reshare.

Subjects optionally resolves verified issuer/subject pairs to retained person identifiers or isolated empty records, without per-person alias configuration. Enable it once using a complete reviewed migration of existing owner bindings; new installations require a proven empty local credential/authority census. Browser and trusted MCP callers use the same resolver, then People.contact with their current admission evidence. Resolution does not select an account, clear a departure or grant provider access. See subject resolution.

People serializes grant and selection transitions and persists them before success. The pure rules functions still require the application's transaction. Do not hold an authority lock across network/browser work. Capture immutable admission before protected I/O or cache access, then borrow credentials through Controls.admitted. Publication uses the final fenced Controls.publish callback. Admission never overrides provider generations, holds, budgets or leases.

Revoke durably before clearing a departing selection, holding the transaction lock throughout. A crash between writes leaves access denied. Never reuse revisions or repair missing adopted controls around retained credentials. Isolate damaged records so healthy management and revocation remain available.

resolve takes the selected owner's current grant to the authenticated actor in the current provider namespace. Owned selection uses no grant. Applications define capabilities and map the closed ConnectionError.code outcomes. This library cannot prove provider identity or entitlement for you.

account_connections.ui renders escaped native forms and selected-connection sections. Hosts supply local actions and independently authorize submissions: valid app-session identity, exact Origin, admission and expected revisions.

Saved content belongs to the recipient. Revocation stops new protected access; it does not erase saved content. Work admitted before revoke may finish on its captured connection subject to native barriers. Continuations must revalidate captured selection and cannot silently acquire another one.

Development

Run uv sync --locked, then make check. Tests are offline and synthetic. For real browser form and referrer checks, install Chromium with uv run --locked --group browser playwright install chromium, then run make check-browser. CI runs this gate separately with browser dependencies. CONNECTIONS_TEST_BROWSER may select an existing Chromium executable for local tests.

Metadata

Release files for account-connections 1.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for account-connections 1.6.0
File Size Uploaded Provenance Actions
account_connections-1.6.0.tar.gz 154.6 kB Without provenance Details for account_connections-1.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for account-connections 1.6.0
File Interpreter ABI Platform Actions
account_connections-1.6.0-py3-none-any.whl Python 3 none any Details for account_connections-1.6.0-py3-none-any.whl

Total release size: 204.7 kB

Release files / account_connections-1.6.0.tar.gz

Download URL account_connections-1.6.0.tar.gz
Size 154.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d8414185c8277e1e287e7939e297380246482178d601f359f814f8f79881337c
BLAKE2b-256 checksum
How to use checksums
7e0c7925f0c99d6ba8a3d8744ee3fa35f224bdfc935f54bb4e1ad1becddee104
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / account_connections-1.6.0-py3-none-any.whl

Download URL account_connections-1.6.0-py3-none-any.whl
Size 50.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ad7172dbe7baba70218b341b54f4ac997c7e44b966961f0348235c9ecec0c183
BLAKE2b-256 checksum
How to use checksums
41c4211d682d5767f0479371f64788be1f3359fafa85879b688ca1a881798d85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for account-connections 1.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page