cortexdb-connectors 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cortexdb_connectors-0.2.0/PKG-INFO +207 -0
- cortexdb_connectors-0.2.0/README.md +129 -0
- cortexdb_connectors-0.2.0/cortexdb_connectors/__init__.py +40 -0
- cortexdb_connectors-0.2.0/cortexdb_connectors/base.py +364 -0
- cortexdb_connectors-0.2.0/cortexdb_connectors/cli.py +476 -0
- cortexdb_connectors-0.2.0/cortexdb_connectors/confluence/__init__.py +359 -0
- cortexdb_connectors-0.2.0/cortexdb_connectors/discord/__init__.py +646 -0
- cortexdb_connectors-0.2.0/cortexdb_connectors/github/__init__.py +309 -0
- cortexdb_connectors-0.2.0/cortexdb_connectors/gitlab/__init__.py +749 -0
- cortexdb_connectors-0.2.0/cortexdb_connectors/google_workspace/__init__.py +1033 -0
- cortexdb_connectors-0.2.0/cortexdb_connectors/hubspot/__init__.py +489 -0
- cortexdb_connectors-0.2.0/cortexdb_connectors/insights/__init__.py +40 -0
- cortexdb_connectors-0.2.0/cortexdb_connectors/insights/api.py +252 -0
- cortexdb_connectors-0.2.0/cortexdb_connectors/insights/detectors.py +771 -0
- cortexdb_connectors-0.2.0/cortexdb_connectors/insights/engine.py +308 -0
- cortexdb_connectors-0.2.0/cortexdb_connectors/intercom/__init__.py +631 -0
- cortexdb_connectors-0.2.0/cortexdb_connectors/jira/__init__.py +298 -0
- cortexdb_connectors-0.2.0/cortexdb_connectors/linear/__init__.py +705 -0
- cortexdb_connectors-0.2.0/cortexdb_connectors/notion/__init__.py +702 -0
- cortexdb_connectors-0.2.0/cortexdb_connectors/pagerduty/__init__.py +298 -0
- cortexdb_connectors-0.2.0/cortexdb_connectors/salesforce/__init__.py +399 -0
- cortexdb_connectors-0.2.0/cortexdb_connectors/servicenow/__init__.py +460 -0
- cortexdb_connectors-0.2.0/cortexdb_connectors/slack/__init__.py +331 -0
- cortexdb_connectors-0.2.0/cortexdb_connectors/state.py +145 -0
- cortexdb_connectors-0.2.0/cortexdb_connectors/teams/__init__.py +656 -0
- cortexdb_connectors-0.2.0/cortexdb_connectors/webhooks.py +672 -0
- cortexdb_connectors-0.2.0/cortexdb_connectors/worker.py +192 -0
- cortexdb_connectors-0.2.0/cortexdb_connectors/zendesk/__init__.py +496 -0
- cortexdb_connectors-0.2.0/cortexdb_connectors.egg-info/PKG-INFO +207 -0
- cortexdb_connectors-0.2.0/cortexdb_connectors.egg-info/SOURCES.txt +38 -0
- cortexdb_connectors-0.2.0/cortexdb_connectors.egg-info/dependency_links.txt +1 -0
- cortexdb_connectors-0.2.0/cortexdb_connectors.egg-info/entry_points.txt +2 -0
- cortexdb_connectors-0.2.0/cortexdb_connectors.egg-info/requires.txt +72 -0
- cortexdb_connectors-0.2.0/cortexdb_connectors.egg-info/top_level.txt +1 -0
- cortexdb_connectors-0.2.0/pyproject.toml +87 -0
- cortexdb_connectors-0.2.0/setup.cfg +4 -0
- cortexdb_connectors-0.2.0/tests/test_base.py +257 -0
- cortexdb_connectors-0.2.0/tests/test_github.py +338 -0
- cortexdb_connectors-0.2.0/tests/test_slack.py +197 -0
- cortexdb_connectors-0.2.0/tests/test_webhooks.py +525 -0
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cortexdb-connectors
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Data connectors for CortexDB — ingest from Slack, GitHub, GitLab, Jira, Linear, Confluence, Notion, PagerDuty, Discord, Teams, Google Workspace, Salesforce, HubSpot, Zendesk, Intercom, and ServiceNow into the v1 memory API.
|
|
5
|
+
Author-email: CortexDB Team <team@cortexdb.ai>
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://cortexdb.ai
|
|
8
|
+
Project-URL: Documentation, https://cortexdb.ai/docs/connectors/slack
|
|
9
|
+
Project-URL: Repository, https://github.com/cortexdb/cortexdb
|
|
10
|
+
Project-URL: Issues, https://github.com/cortexdb/cortexdb/issues
|
|
11
|
+
Keywords: ai,memory,connectors,etl,slack,github,jira,cortexdb
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Topic :: Database
|
|
21
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
22
|
+
Requires-Python: >=3.10
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
Requires-Dist: httpx>=0.27
|
|
25
|
+
Requires-Dist: pydantic>=2.0
|
|
26
|
+
Requires-Dist: croniter>=2.0
|
|
27
|
+
Provides-Extra: slack
|
|
28
|
+
Requires-Dist: slack-sdk>=3.0; extra == "slack"
|
|
29
|
+
Provides-Extra: github
|
|
30
|
+
Requires-Dist: pygithub>=2.0; extra == "github"
|
|
31
|
+
Provides-Extra: pagerduty
|
|
32
|
+
Requires-Dist: pdpyras>=5.0; extra == "pagerduty"
|
|
33
|
+
Provides-Extra: jira
|
|
34
|
+
Requires-Dist: jira>=3.0; extra == "jira"
|
|
35
|
+
Provides-Extra: confluence
|
|
36
|
+
Requires-Dist: atlassian-python-api>=3.0; extra == "confluence"
|
|
37
|
+
Provides-Extra: notion
|
|
38
|
+
Requires-Dist: notion-client>=2.0; extra == "notion"
|
|
39
|
+
Provides-Extra: linear
|
|
40
|
+
Provides-Extra: discord
|
|
41
|
+
Requires-Dist: aiohttp>=3.9; extra == "discord"
|
|
42
|
+
Provides-Extra: teams
|
|
43
|
+
Requires-Dist: msal>=1.28; extra == "teams"
|
|
44
|
+
Provides-Extra: google-workspace
|
|
45
|
+
Requires-Dist: google-api-python-client>=2.0; extra == "google-workspace"
|
|
46
|
+
Requires-Dist: google-auth>=2.0; extra == "google-workspace"
|
|
47
|
+
Provides-Extra: salesforce
|
|
48
|
+
Requires-Dist: simple-salesforce>=1.12; extra == "salesforce"
|
|
49
|
+
Provides-Extra: hubspot
|
|
50
|
+
Requires-Dist: hubspot-api-client>=9.0; extra == "hubspot"
|
|
51
|
+
Provides-Extra: zendesk
|
|
52
|
+
Provides-Extra: intercom
|
|
53
|
+
Provides-Extra: servicenow
|
|
54
|
+
Provides-Extra: gitlab
|
|
55
|
+
Requires-Dist: python-gitlab>=4.0; extra == "gitlab"
|
|
56
|
+
Provides-Extra: webhooks
|
|
57
|
+
Requires-Dist: starlette>=0.37; extra == "webhooks"
|
|
58
|
+
Requires-Dist: uvicorn>=0.29; extra == "webhooks"
|
|
59
|
+
Requires-Dist: python-multipart>=0.0.9; extra == "webhooks"
|
|
60
|
+
Provides-Extra: all
|
|
61
|
+
Requires-Dist: slack-sdk>=3.0; extra == "all"
|
|
62
|
+
Requires-Dist: pygithub>=2.0; extra == "all"
|
|
63
|
+
Requires-Dist: pdpyras>=5.0; extra == "all"
|
|
64
|
+
Requires-Dist: jira>=3.0; extra == "all"
|
|
65
|
+
Requires-Dist: atlassian-python-api>=3.0; extra == "all"
|
|
66
|
+
Requires-Dist: notion-client>=2.0; extra == "all"
|
|
67
|
+
Requires-Dist: aiohttp>=3.9; extra == "all"
|
|
68
|
+
Requires-Dist: msal>=1.28; extra == "all"
|
|
69
|
+
Requires-Dist: google-api-python-client>=2.0; extra == "all"
|
|
70
|
+
Requires-Dist: google-auth>=2.0; extra == "all"
|
|
71
|
+
Requires-Dist: simple-salesforce>=1.12; extra == "all"
|
|
72
|
+
Requires-Dist: hubspot-api-client>=9.0; extra == "all"
|
|
73
|
+
Requires-Dist: python-gitlab>=4.0; extra == "all"
|
|
74
|
+
Requires-Dist: PyYAML>=6.0; extra == "all"
|
|
75
|
+
Requires-Dist: starlette>=0.37; extra == "all"
|
|
76
|
+
Requires-Dist: uvicorn>=0.29; extra == "all"
|
|
77
|
+
Requires-Dist: python-multipart>=0.0.9; extra == "all"
|
|
78
|
+
|
|
79
|
+
# cortexdb-connectors
|
|
80
|
+
|
|
81
|
+
Managed data connectors for [CortexDB](https://cortexdb.ai). Run them yourself, or let CortexDB host them for you on the [Starter tier](https://cortexdb.ai/pricing).
|
|
82
|
+
|
|
83
|
+
Each connector pulls from a third-party system (Slack, GitHub, Jira, …) and writes every event into CortexDB as a v1 experience.
|
|
84
|
+
|
|
85
|
+
## Install
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# core only — no third-party SDK dependencies
|
|
89
|
+
pip install cortexdb-connectors
|
|
90
|
+
|
|
91
|
+
# with one source's SDK
|
|
92
|
+
pip install 'cortexdb-connectors[slack]'
|
|
93
|
+
|
|
94
|
+
# everything
|
|
95
|
+
pip install 'cortexdb-connectors[all]'
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Requires Python 3.10+.
|
|
99
|
+
|
|
100
|
+
## Auth
|
|
101
|
+
|
|
102
|
+
The connectors talk to the CortexDB v1 API. Two things you need:
|
|
103
|
+
|
|
104
|
+
- **A PASETO bearer token** (`Authorization: Bearer …`)
|
|
105
|
+
- **An actor id** that matches the token's `sub` claim (`X-Cortex-Actor: …`)
|
|
106
|
+
|
|
107
|
+
The fastest way to get both is to install [`cortexdb-cli`](https://pypi.org/project/cortexdb-cli/) and run `cortexdb init` — anonymous signup, no email or card, 7-day free-tier token. The connectors read `~/.cortexdb/state.json` automatically.
|
|
108
|
+
|
|
109
|
+
Or set env vars:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
export CORTEXDB_URL=https://api-v1.cortexdb.ai
|
|
113
|
+
export CORTEXDB_API_KEY=v4.public...
|
|
114
|
+
export CORTEXDB_ACTOR=user:u_019e...
|
|
115
|
+
export CORTEXDB_SCOPE_TEMPLATE='org:acme/source:{source}' # optional
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
`{source}` (and `{tenant}`, `{namespace}`, `{actor}`, `{entity.<type>}`) get filled in per event.
|
|
119
|
+
|
|
120
|
+
## Run
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
# one shot
|
|
124
|
+
cortexdb-sync sync slack
|
|
125
|
+
|
|
126
|
+
# poll loop, 60s between cycles
|
|
127
|
+
cortexdb-sync watch slack --interval 60
|
|
128
|
+
|
|
129
|
+
# resume from a specific point
|
|
130
|
+
cortexdb-sync sync github --since 2026-05-01T00:00:00Z
|
|
131
|
+
|
|
132
|
+
# see what's available
|
|
133
|
+
cortexdb-sync list
|
|
134
|
+
|
|
135
|
+
# check resolved CortexDB creds
|
|
136
|
+
cortexdb-sync auth
|
|
137
|
+
|
|
138
|
+
# cursor state across every connector
|
|
139
|
+
cortexdb-sync status
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Available connectors
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
slack SLACK_BOT_TOKEN
|
|
146
|
+
github GITHUB_TOKEN
|
|
147
|
+
gitlab GITLAB_TOKEN
|
|
148
|
+
jira JIRA_URL, JIRA_EMAIL, JIRA_API_TOKEN
|
|
149
|
+
linear LINEAR_API_KEY
|
|
150
|
+
confluence CONFLUENCE_URL, CONFLUENCE_EMAIL, CONFLUENCE_API_TOKEN
|
|
151
|
+
notion NOTION_TOKEN
|
|
152
|
+
pagerduty PAGERDUTY_API_KEY
|
|
153
|
+
discord DISCORD_BOT_TOKEN
|
|
154
|
+
teams TEAMS_TENANT_ID, TEAMS_CLIENT_ID, TEAMS_CLIENT_SECRET
|
|
155
|
+
google-workspace GW_SERVICE_ACCOUNT_KEY, GW_DELEGATED_USER
|
|
156
|
+
salesforce SF_INSTANCE_URL, SF_CLIENT_ID, SF_CLIENT_SECRET, SF_USERNAME, SF_PASSWORD
|
|
157
|
+
hubspot HUBSPOT_TOKEN
|
|
158
|
+
zendesk ZENDESK_SUBDOMAIN, ZENDESK_EMAIL, ZENDESK_TOKEN
|
|
159
|
+
intercom INTERCOM_TOKEN
|
|
160
|
+
servicenow SNOW_INSTANCE, SNOW_USERNAME, SNOW_PASSWORD
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Per-connector setup pages live at https://cortexdb.ai/docs/connectors/ (e.g. [Slack](https://cortexdb.ai/docs/connectors/slack)).
|
|
164
|
+
|
|
165
|
+
## YAML config
|
|
166
|
+
|
|
167
|
+
If env vars get unwieldy, drop a `cortexdb-connectors.yaml` next to your sync invocation:
|
|
168
|
+
|
|
169
|
+
```yaml
|
|
170
|
+
slack:
|
|
171
|
+
slack_bot_token: xoxb-...
|
|
172
|
+
channels: [C01ABCDEF, C02GHIJKL]
|
|
173
|
+
|
|
174
|
+
github:
|
|
175
|
+
github_token: ghp_...
|
|
176
|
+
repos: [acme/api, acme/web]
|
|
177
|
+
events: [pull_request, issue_comment]
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
## Programmatic use
|
|
181
|
+
|
|
182
|
+
Skip the CLI entirely:
|
|
183
|
+
|
|
184
|
+
```python
|
|
185
|
+
import asyncio
|
|
186
|
+
from cortexdb_connectors.slack import SlackConnector
|
|
187
|
+
|
|
188
|
+
connector = SlackConnector(
|
|
189
|
+
cortex_url="https://api-v1.cortexdb.ai",
|
|
190
|
+
cortex_api_key="v4.public...",
|
|
191
|
+
actor="user:u_019e...",
|
|
192
|
+
scope_template="org:acme/source:slack/channel:{entity.channel}",
|
|
193
|
+
slack_bot_token="xoxb-...",
|
|
194
|
+
channels=["C01ABC", "C02DEF"],
|
|
195
|
+
)
|
|
196
|
+
|
|
197
|
+
result = asyncio.run(connector.sync())
|
|
198
|
+
print(result.episodes_ingested, "ingested,", len(result.errors), "errors")
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
## Webhooks
|
|
202
|
+
|
|
203
|
+
The `cortexdb-connectors[webhooks]` extra ships a Starlette-based webhook receiver for sources that push (Slack Events API, GitHub Apps, Jira webhooks, …) instead of polling. See `cortexdb_connectors/webhooks.py`.
|
|
204
|
+
|
|
205
|
+
## License
|
|
206
|
+
|
|
207
|
+
Apache-2.0
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# cortexdb-connectors
|
|
2
|
+
|
|
3
|
+
Managed data connectors for [CortexDB](https://cortexdb.ai). Run them yourself, or let CortexDB host them for you on the [Starter tier](https://cortexdb.ai/pricing).
|
|
4
|
+
|
|
5
|
+
Each connector pulls from a third-party system (Slack, GitHub, Jira, …) and writes every event into CortexDB as a v1 experience.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# core only — no third-party SDK dependencies
|
|
11
|
+
pip install cortexdb-connectors
|
|
12
|
+
|
|
13
|
+
# with one source's SDK
|
|
14
|
+
pip install 'cortexdb-connectors[slack]'
|
|
15
|
+
|
|
16
|
+
# everything
|
|
17
|
+
pip install 'cortexdb-connectors[all]'
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Requires Python 3.10+.
|
|
21
|
+
|
|
22
|
+
## Auth
|
|
23
|
+
|
|
24
|
+
The connectors talk to the CortexDB v1 API. Two things you need:
|
|
25
|
+
|
|
26
|
+
- **A PASETO bearer token** (`Authorization: Bearer …`)
|
|
27
|
+
- **An actor id** that matches the token's `sub` claim (`X-Cortex-Actor: …`)
|
|
28
|
+
|
|
29
|
+
The fastest way to get both is to install [`cortexdb-cli`](https://pypi.org/project/cortexdb-cli/) and run `cortexdb init` — anonymous signup, no email or card, 7-day free-tier token. The connectors read `~/.cortexdb/state.json` automatically.
|
|
30
|
+
|
|
31
|
+
Or set env vars:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
export CORTEXDB_URL=https://api-v1.cortexdb.ai
|
|
35
|
+
export CORTEXDB_API_KEY=v4.public...
|
|
36
|
+
export CORTEXDB_ACTOR=user:u_019e...
|
|
37
|
+
export CORTEXDB_SCOPE_TEMPLATE='org:acme/source:{source}' # optional
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
`{source}` (and `{tenant}`, `{namespace}`, `{actor}`, `{entity.<type>}`) get filled in per event.
|
|
41
|
+
|
|
42
|
+
## Run
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# one shot
|
|
46
|
+
cortexdb-sync sync slack
|
|
47
|
+
|
|
48
|
+
# poll loop, 60s between cycles
|
|
49
|
+
cortexdb-sync watch slack --interval 60
|
|
50
|
+
|
|
51
|
+
# resume from a specific point
|
|
52
|
+
cortexdb-sync sync github --since 2026-05-01T00:00:00Z
|
|
53
|
+
|
|
54
|
+
# see what's available
|
|
55
|
+
cortexdb-sync list
|
|
56
|
+
|
|
57
|
+
# check resolved CortexDB creds
|
|
58
|
+
cortexdb-sync auth
|
|
59
|
+
|
|
60
|
+
# cursor state across every connector
|
|
61
|
+
cortexdb-sync status
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Available connectors
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
slack SLACK_BOT_TOKEN
|
|
68
|
+
github GITHUB_TOKEN
|
|
69
|
+
gitlab GITLAB_TOKEN
|
|
70
|
+
jira JIRA_URL, JIRA_EMAIL, JIRA_API_TOKEN
|
|
71
|
+
linear LINEAR_API_KEY
|
|
72
|
+
confluence CONFLUENCE_URL, CONFLUENCE_EMAIL, CONFLUENCE_API_TOKEN
|
|
73
|
+
notion NOTION_TOKEN
|
|
74
|
+
pagerduty PAGERDUTY_API_KEY
|
|
75
|
+
discord DISCORD_BOT_TOKEN
|
|
76
|
+
teams TEAMS_TENANT_ID, TEAMS_CLIENT_ID, TEAMS_CLIENT_SECRET
|
|
77
|
+
google-workspace GW_SERVICE_ACCOUNT_KEY, GW_DELEGATED_USER
|
|
78
|
+
salesforce SF_INSTANCE_URL, SF_CLIENT_ID, SF_CLIENT_SECRET, SF_USERNAME, SF_PASSWORD
|
|
79
|
+
hubspot HUBSPOT_TOKEN
|
|
80
|
+
zendesk ZENDESK_SUBDOMAIN, ZENDESK_EMAIL, ZENDESK_TOKEN
|
|
81
|
+
intercom INTERCOM_TOKEN
|
|
82
|
+
servicenow SNOW_INSTANCE, SNOW_USERNAME, SNOW_PASSWORD
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Per-connector setup pages live at https://cortexdb.ai/docs/connectors/ (e.g. [Slack](https://cortexdb.ai/docs/connectors/slack)).
|
|
86
|
+
|
|
87
|
+
## YAML config
|
|
88
|
+
|
|
89
|
+
If env vars get unwieldy, drop a `cortexdb-connectors.yaml` next to your sync invocation:
|
|
90
|
+
|
|
91
|
+
```yaml
|
|
92
|
+
slack:
|
|
93
|
+
slack_bot_token: xoxb-...
|
|
94
|
+
channels: [C01ABCDEF, C02GHIJKL]
|
|
95
|
+
|
|
96
|
+
github:
|
|
97
|
+
github_token: ghp_...
|
|
98
|
+
repos: [acme/api, acme/web]
|
|
99
|
+
events: [pull_request, issue_comment]
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Programmatic use
|
|
103
|
+
|
|
104
|
+
Skip the CLI entirely:
|
|
105
|
+
|
|
106
|
+
```python
|
|
107
|
+
import asyncio
|
|
108
|
+
from cortexdb_connectors.slack import SlackConnector
|
|
109
|
+
|
|
110
|
+
connector = SlackConnector(
|
|
111
|
+
cortex_url="https://api-v1.cortexdb.ai",
|
|
112
|
+
cortex_api_key="v4.public...",
|
|
113
|
+
actor="user:u_019e...",
|
|
114
|
+
scope_template="org:acme/source:slack/channel:{entity.channel}",
|
|
115
|
+
slack_bot_token="xoxb-...",
|
|
116
|
+
channels=["C01ABC", "C02DEF"],
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
result = asyncio.run(connector.sync())
|
|
120
|
+
print(result.episodes_ingested, "ingested,", len(result.errors), "errors")
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Webhooks
|
|
124
|
+
|
|
125
|
+
The `cortexdb-connectors[webhooks]` extra ships a Starlette-based webhook receiver for sources that push (Slack Events API, GitHub Apps, Jira webhooks, …) instead of polling. See `cortexdb_connectors/webhooks.py`.
|
|
126
|
+
|
|
127
|
+
## License
|
|
128
|
+
|
|
129
|
+
Apache-2.0
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"""cortexdb_connectors — data connector SDK for the CortexDB v1 API.
|
|
2
|
+
|
|
3
|
+
Each connector subclass implements `fetch_events`, `normalize`, and
|
|
4
|
+
`map_permissions`; the base class POSTs every normalised Episode to
|
|
5
|
+
`/v1/experience` with the required Authorization + X-Cortex-Actor
|
|
6
|
+
headers. Use the `cortexdb-sync` CLI to run a connector once or in a
|
|
7
|
+
poll loop; or `from cortexdb_connectors.slack import SlackConnector`
|
|
8
|
+
to drive it programmatically.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
__version__ = "0.2.0"
|
|
12
|
+
|
|
13
|
+
from cortexdb_connectors.base import (
|
|
14
|
+
Actor,
|
|
15
|
+
CortexConnector,
|
|
16
|
+
EntityRef,
|
|
17
|
+
Episode,
|
|
18
|
+
EpisodeType,
|
|
19
|
+
RawEvent,
|
|
20
|
+
Source,
|
|
21
|
+
SyncResult,
|
|
22
|
+
SyncState,
|
|
23
|
+
Visibility,
|
|
24
|
+
VisibilityLevel,
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
__all__ = [
|
|
28
|
+
"__version__",
|
|
29
|
+
"Actor",
|
|
30
|
+
"CortexConnector",
|
|
31
|
+
"EntityRef",
|
|
32
|
+
"Episode",
|
|
33
|
+
"EpisodeType",
|
|
34
|
+
"RawEvent",
|
|
35
|
+
"Source",
|
|
36
|
+
"SyncResult",
|
|
37
|
+
"SyncState",
|
|
38
|
+
"Visibility",
|
|
39
|
+
"VisibilityLevel",
|
|
40
|
+
]
|