lucos-loganne-pythonclient 1.0.37__tar.gz → 2.0.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lucos_loganne_pythonclient
3
- Version: 1.0.37
3
+ Version: 2.0.0
4
4
  Summary: A python client for sending events to lucos_loganne
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Requires-Python: >=3.8
@@ -19,11 +19,16 @@ The following environment variables must be set for the package to function:
19
19
  ## API
20
20
  The package exposes a single function:
21
21
 
22
- ### `updateLoganne(type, humanReadable, url=None, **extra_data)`
22
+ ### `updateLoganne(type, humanReadable, level, url=None, **extra_data)`
23
23
  Sends an event to the Loganne service.
24
24
 
25
25
  * **type** (str, required): The type of event being logged.
26
26
  * **humanReadable** (str, required): A description of the event that is easy for humans to understand.
27
+ * **level** (str, required): The editorial prominence of the event. Must be one of:
28
+ * `detail` — mechanical/low-interest churn, hidden from the default feed.
29
+ * `routine` — regular estate activity (the most common level).
30
+ * `notable` — worth emphasising in-feed.
31
+ * `headline` — estate-significant, suitable for a homepage glance.
27
32
  * **url** (str, optional): A link to a human-readable page regarding the item the event pertains to. Defaults to `None`.
28
33
  * **\*\*extra_data** (optional): Any additional keyword arguments are forwarded as extra fields in the event payload. Useful for attaching structured data to events (e.g. multiple URIs, identifiers, or other context).
29
34
 
@@ -35,6 +40,7 @@ from loganne import updateLoganne
35
40
  updateLoganne(
36
41
  type="contactUpdated",
37
42
  humanReadable="The Contact \"John Doe\" has been updated",
43
+ level="routine",
38
44
  url="https://contacts.example.com/contact/123456"
39
45
  )
40
46
 
@@ -42,6 +48,7 @@ updateLoganne(
42
48
  updateLoganne(
43
49
  type="entityMerged",
44
50
  humanReadable="Contact \"Old Name\" merged into \"New Name\"",
51
+ level="notable",
45
52
  url="https://contacts.example.com/contact/789",
46
53
  sourceUri="https://contacts.example.com/contact/123",
47
54
  targetUri="https://contacts.example.com/contact/789",
@@ -10,11 +10,16 @@ The following environment variables must be set for the package to function:
10
10
  ## API
11
11
  The package exposes a single function:
12
12
 
13
- ### `updateLoganne(type, humanReadable, url=None, **extra_data)`
13
+ ### `updateLoganne(type, humanReadable, level, url=None, **extra_data)`
14
14
  Sends an event to the Loganne service.
15
15
 
16
16
  * **type** (str, required): The type of event being logged.
17
17
  * **humanReadable** (str, required): A description of the event that is easy for humans to understand.
18
+ * **level** (str, required): The editorial prominence of the event. Must be one of:
19
+ * `detail` — mechanical/low-interest churn, hidden from the default feed.
20
+ * `routine` — regular estate activity (the most common level).
21
+ * `notable` — worth emphasising in-feed.
22
+ * `headline` — estate-significant, suitable for a homepage glance.
18
23
  * **url** (str, optional): A link to a human-readable page regarding the item the event pertains to. Defaults to `None`.
19
24
  * **\*\*extra_data** (optional): Any additional keyword arguments are forwarded as extra fields in the event payload. Useful for attaching structured data to events (e.g. multiple URIs, identifiers, or other context).
20
25
 
@@ -26,6 +31,7 @@ from loganne import updateLoganne
26
31
  updateLoganne(
27
32
  type="contactUpdated",
28
33
  humanReadable="The Contact \"John Doe\" has been updated",
34
+ level="routine",
29
35
  url="https://contacts.example.com/contact/123456"
30
36
  )
31
37
 
@@ -33,6 +39,7 @@ updateLoganne(
33
39
  updateLoganne(
34
40
  type="entityMerged",
35
41
  humanReadable="Contact \"Old Name\" merged into \"New Name\"",
42
+ level="notable",
36
43
  url="https://contacts.example.com/contact/789",
37
44
  sourceUri="https://contacts.example.com/contact/123",
38
45
  targetUri="https://contacts.example.com/contact/789",
@@ -16,11 +16,16 @@ session.headers.update({
16
16
  "Content-Type": "application/json",
17
17
  })
18
18
 
19
- def updateLoganne(type: str, humanReadable: str, url: str = None, **extra_data):
19
+ VALID_LEVELS = {"detail", "routine", "notable", "headline"}
20
+
21
+ def updateLoganne(type: str, humanReadable: str, level: str, url: str = None, **extra_data):
22
+ if level not in VALID_LEVELS:
23
+ raise ValueError(f"Invalid level '{level}'. Must be one of: {', '.join(sorted(VALID_LEVELS))}")
20
24
  payload = {
21
25
  "type": type,
22
26
  "source": SYSTEM,
23
27
  "humanReadable": humanReadable,
28
+ "level": level,
24
29
  }
25
30
  if url:
26
31
  payload["url"] = url
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lucos_loganne_pythonclient
3
- Version: 1.0.37
3
+ Version: 2.0.0
4
4
  Summary: A python client for sending events to lucos_loganne
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Requires-Python: >=3.8
@@ -19,11 +19,16 @@ The following environment variables must be set for the package to function:
19
19
  ## API
20
20
  The package exposes a single function:
21
21
 
22
- ### `updateLoganne(type, humanReadable, url=None, **extra_data)`
22
+ ### `updateLoganne(type, humanReadable, level, url=None, **extra_data)`
23
23
  Sends an event to the Loganne service.
24
24
 
25
25
  * **type** (str, required): The type of event being logged.
26
26
  * **humanReadable** (str, required): A description of the event that is easy for humans to understand.
27
+ * **level** (str, required): The editorial prominence of the event. Must be one of:
28
+ * `detail` — mechanical/low-interest churn, hidden from the default feed.
29
+ * `routine` — regular estate activity (the most common level).
30
+ * `notable` — worth emphasising in-feed.
31
+ * `headline` — estate-significant, suitable for a homepage glance.
27
32
  * **url** (str, optional): A link to a human-readable page regarding the item the event pertains to. Defaults to `None`.
28
33
  * **\*\*extra_data** (optional): Any additional keyword arguments are forwarded as extra fields in the event payload. Useful for attaching structured data to events (e.g. multiple URIs, identifiers, or other context).
29
34
 
@@ -35,6 +40,7 @@ from loganne import updateLoganne
35
40
  updateLoganne(
36
41
  type="contactUpdated",
37
42
  humanReadable="The Contact \"John Doe\" has been updated",
43
+ level="routine",
38
44
  url="https://contacts.example.com/contact/123456"
39
45
  )
40
46
 
@@ -42,6 +48,7 @@ updateLoganne(
42
48
  updateLoganne(
43
49
  type="entityMerged",
44
50
  humanReadable="Contact \"Old Name\" merged into \"New Name\"",
51
+ level="notable",
45
52
  url="https://contacts.example.com/contact/789",
46
53
  sourceUri="https://contacts.example.com/contact/123",
47
54
  targetUri="https://contacts.example.com/contact/789",
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "lucos_loganne_pythonclient"
7
- version = "1.0.37"
7
+ version = "2.0.0"
8
8
  description = "A python client for sending events to lucos_loganne"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"