This release is a pre-release and may not be stable for production use.
ppx-connectors
Outbound ingestion connectors for the Preference Profile Exchange (PPX).
Pull preference signals from services the user already uses, map them onto PPX claims, and propose updates through the provider — so writeback policy, review, and audit all apply uniformly.
Install
pip install ppx-connectors
Requires Python 3.11+. Published version: 0.1.0a1 (PyPI).
Alpha, tracking a draft specification. Expect breaking changes. The version is
0.1.0a1on PyPI and0.1.0-alpha.1on npm — the same release in each ecosystem's required format.
Ship your own connector in three methods
from ppx_connectors import Connector, ConnectorContext, ProposedClaim, SourceSignal
class MyConnector(Connector):
name = "my-source"
writes_namespaces = ["my-domain"]
interval_seconds = 60 * 60 * 12 # every 12h
def fetch(self, ctx: ConnectorContext) -> list[SourceSignal]:
# call the external API, return raw signals
...
def to_claims(self, signals: list[SourceSignal]) -> list[ProposedClaim]:
# map raw signals onto spec claims (pure function, no I/O)
return [ProposedClaim(
namespace="my-domain",
key="some_preference",
value=0.7,
confidence=0.8,
source={"kind": "imported", "origin": self.name},
)]
Run a connector once (manual / cron-friendly)
from ppx_client import PpxClient
from ppx_connectors import ConnectorContext, run_once
from ppx_connectors.connectors import SpotifyConnector
client = PpxClient("https://api.provider.app")
ctx = ConnectorContext(
client=client,
grant_token=writeback_scoped_grant_token,
credentials={"spotify_access_token": user_spotify_oauth_token},
)
result = run_once(SpotifyConnector(), ctx)
# → {"connector": "spotify", "signals": 150, "proposed": 6, "writeback": "proposal_created"}
Built-in connectors
| Name | Namespace | Claim keys | Status |
|---|---|---|---|
SpotifyConnector |
music |
genre_preference, energy_preference, tempo_preference, valence_preference, danceability_preference, acousticness_preference, listening_intensity |
shipping |
StravaConnector |
fitness |
activity_frequency, terrain_preference, cardio_load, pace_preference, outdoor_bias |
shipping |
GoogleCalendarConnector |
core |
social_energy_preference, pace_preference, morning_evening_skew, weekend_activity |
shipping |
Design notes
- Separation of concerns.
fetch()does I/O;to_claims()is pure. This makes claim-mapping testable without hitting external services, and reusable for replay / dry-run. - Spec-compliant writeback. All claims go through
/v1/profile/propose-updates, so the user'swriteback_policyis honored automatically. Underreview_requiredthe user sees every proposal before anything takes effect. - Confidence by volume. Pull-based inference has an inherent signal
count; the built-in
_conf_from_volumehelper scales confidence linearly with observation count. - Every claim is attributed.
source.kind = "imported"andsource.origin = <connector-name>on every proposal. The user always knows who learned each claim.
License
Apache-2.0.
Metadata
Release files for ppx-connectors 0.1.0a4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ppx_connectors-0.1.0a4.tar.gz | 14.2 kB | Without provenance | Details for ppx_connectors-0.1.0a4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ppx_connectors-0.1.0a4-py3-none-any.whl | Python 3 | none | any | Details for ppx_connectors-0.1.0a4-py3-none-any.whl |
Total release size: 32.8 kB
Release files / ppx_connectors-0.1.0a4.tar.gz
| Download URL | ppx_connectors-0.1.0a4.tar.gz |
|---|---|
| Size | 14.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5f7a74991825d59ac5eb7e27232550fb9672078cf9ac9dc75ab2b2780f0c483e
|
|
BLAKE2b-256 checksum How to use checksums |
5d59b59d73b1c3c815d2a033c9351dce9bda5ab6f3089552ff3922113a397c46
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / ppx_connectors-0.1.0a4-py3-none-any.whl
| Download URL | ppx_connectors-0.1.0a4-py3-none-any.whl |
|---|---|
| Size | 18.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
69c7d80a07d2210515853b35e2a33b84e4e47d503cbcd8fbcc0c14b9e3b17129
|
|
BLAKE2b-256 checksum How to use checksums |
9284621841e993645b213c67180d7fdfdec24d8aa132fcd455fb2d339b5f9e9e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for ppx-connectors 0.1.0a4
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.