Metadata-Version: 2.5
Name: segmentstream-connections
Version: 0.1.0
Summary: Connection declarations for SegmentStream workspaces
Project-URL: Homepage, https://segmentstream.com
Author: SegmentStream
License-Expression: Apache-2.0
License-File: LICENSE
License-File: NOTICE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: <3.14,>=3.12
Requires-Dist: pydantic<3,>=2.10
Description-Content-Type: text/markdown

# SegmentStream connections SDK

`segmentstream-connections` holds the classes a workspace declares its connections with in
`connections/connections.py`, and the inspection that turns them into the connections manifest
Cloud reads at deploy. It depends only on pydantic: declaring a connection installs no pipeline
runtime.

```python
from segmentstream_connections import GoogleAdsConnection, TelegramBotConnection, secret_ref

connections = (
    GoogleAdsConnection(key="google_ads"),
    TelegramBotConnection(key="telegram", token=secret_ref("agent-telegram-token")),
)
```

Pipelines, the ontology and the agent refer to a connection by its key. Pipeline code reaches a
connection through `segmentstream.get_connection(key).get_http_client()` from the pipeline SDK;
credentials stay in Cloud and are added to each request by its connection proxy.

`python -I -m segmentstream_connections inspect OUTPUT` writes the manifest of the
`connections.py` in the current directory. Cloud runs it in an isolated build of the
`connections/` project; it never runs against credentials.

See [connections](../../docs/connections.md) for every preset, custom OAuth2, API-key and
client-credentials connections, and authorization.

## Compatibility

The pipeline SDK depends on this package and still re-exports its classes from
`segmentstream.connections` and `segmentstream`, so workspaces that import them from there keep
deploying. Import them from `segmentstream_connections` instead; the re-export will be removed.
