ics-wivi-analytics-ingest 0.1.1__py3-none-any.whl → 0.1.2__py3-none-any.whl

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.

Potentially problematic release.


This version of ics-wivi-analytics-ingest might be problematic. Click here for more details.

@@ -24,7 +24,5 @@ class IngestConfigSchema(BaseModel):
24
24
  @model_validator(mode="after")
25
25
  def validate_env_or_param(self):
26
26
  if not self.graphql_endpoint:
27
- raise ValueError(
28
- "Missing GraphQL endpoint. Set via param or GRAPH_ENDPOINT env."
29
- )
27
+ self.graphql_endpoint = "https://0.0.0.0:8092/graphql"
30
28
  return self
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ics-wivi-analytics-ingest
3
- Version: 0.1.1
4
- Summary: - JWT token added in the header.
3
+ Version: 0.1.2
4
+ Summary: - README Updated.
5
5
  Author-email: Haseeb Saif Ullah <hsaif@intrepidcs.com>, Scott VanDeWater <svandewater@intrepidcs.com>
6
6
  License: Copyright (c) 2018-2025 Intrepid Control Systems, Inc.
7
7
 
@@ -74,9 +74,19 @@ A lightweight Python library to batch and send automotive telemetry — like sig
74
74
  ```bash
75
75
  pip install ics-wivi-analytics-ingest
76
76
  ```
77
-
78
77
  ---
79
78
 
79
+ ## 🔑 Setting JWT & Endpoint via Environment Variables
80
+
81
+ You can avoid hardcoding sensitive values like JWT tokens and GraphQL endpoints by using environment variables.
82
+
83
+ ### Example (Linux / macOS)
84
+
85
+ ```bash
86
+ export SEC_AUTH_TOKEN="your-jwt-token-here"
87
+ export GRAPHQL_ENDPOINT="https://0.0.0.0:8092/graphql"
88
+ ```
89
+
80
90
  ## 🚀 Quick Usage
81
91
 
82
92
  ```python
@@ -87,7 +97,8 @@ client = IcsAnalytics(
87
97
  vehicle_id=456,
88
98
  fleet_id=789,
89
99
  org_id=1011,
90
- graphql_endpoint="https://your-backend/graphql",
100
+ graphql_endpoint="https://0.0.0.0:8092/graphql", #default endpoint
101
+ jwt_token="token",
91
102
  batch_size=100,
92
103
  batch_interval_seconds=10,
93
104
  max_signal_count=100
@@ -128,6 +139,10 @@ client.add_dtc({
128
139
  'description': 'Head-Up Display - Internal Electronic Failure',
129
140
  'status': '2F',
130
141
  'time': '2025-07-15T01:42:15.979524'
142
+ 'extended':[{'bytes':'3214"31241234123412'} # more bytes
143
+ ]
144
+ 'snapshot':[{'bytes':'3214"31241234123412'} # more bytes
145
+ ]
131
146
  }, # more data objects.
132
147
  ]
133
148
  })
@@ -151,17 +166,6 @@ client.add_gps({
151
166
  })
152
167
 
153
168
  # Add Network Stats
154
- client.add_network_stats({
155
- "name": "CAN1",
156
- "vehicleId": 456,
157
- "uploadId": 1,
158
- "totalMessages": 1000,
159
- "matchedMessages": 950,
160
- "unmatchedMessages": 50,
161
- "errorMessages": 0,
162
- "longMessageParts": 0,
163
- "rate": 500.0
164
- })
165
169
 
166
170
  client.add_network_stats({
167
171
  'name': 'jacobs',
@@ -198,6 +202,98 @@ Set through constructor or environment variables.
198
202
  | `batch_size` | Max items per batch | 100 |
199
203
  | `batch_interval_seconds` | Time-based flush interval | 10 |
200
204
  | `max_signal_count` | Max signals before flush | 100 |
205
+ | `jwt_token` | JWT token | '' |
206
+
207
+
208
+ ---
209
+
210
+ ---
211
+
212
+ ### 🔧 Payload Reference
213
+
214
+ #### `add_signal` Payload
215
+
216
+ | Key | Description | Required / Optional |
217
+ | ------------- | ---------------------------------- | ------------------- |
218
+ | `name` | Signal name | **Required** |
219
+ | `unit` | Measurement unit (e.g. °C, km/h) | **Required** |
220
+ | `messageName` | Message name in DB | **Required** |
221
+ | `networkName` | Network name | **Required** |
222
+ | `ecuName` | ECU name | Optional |
223
+ | `arbId` | Arbitration ID | Optional |
224
+ | `fileId` | File ID for trace reference | **Required** |
225
+ | `paramType` | Parameter type (`TEXT`, `NUMBER`, `ENCODED`, `RAW`, `STRING`) | Optional |
226
+ | `signalType` | Signal type (`DID`, `PID`, `DMR`, `SIGNAL`)| Optional |
227
+ | `messageDate` | Message timestamp (ISO 8601) | **Required** |
228
+ | `paramId` | Parameter ID (DID identifier) | Optional |
229
+ | `data` | List of data objects | **Required** |
230
+
231
+ **Inside `data`:**
232
+
233
+ | Key | Description | Required / Optional |
234
+ | -------- | ------------------------- | ------------------- |
235
+ | `value` | Numeric value | Optional |
236
+ | `time` | Timestamp (ISO 8601) | **Required** |
237
+ | `svalue` | String value (if textual) | Optional |
238
+
239
+ ---
240
+
241
+ #### `add_dtc` Payload
242
+
243
+ | Key | Description | Required / Optional |
244
+ | ------------- | ---------------------------- | ------------------- |
245
+ | `messageName` | DTC message name | **Required** |
246
+ | `name` | DTC display name | Optional |
247
+ | `networkName` | Network name | **Required** |
248
+ | `ecuName` | ECU name | Optional |
249
+ | `ecuId` | ECU ID | Optional |
250
+ | `messageDate` | Message timestamp (ISO 8601) | Optional |
251
+ | `fileId` | File ID for trace reference | Optional |
252
+ | `data` | List of DTC data objects | **Required** |
253
+
254
+ **Inside `data`:**
255
+
256
+ | Key | Description | Required / Optional |
257
+ | ------------- | -------------------------- | ------------------- |
258
+ | `dtcId` | DTC identifier | **Required** |
259
+ | `description` | Human-readable description | **Required** |
260
+ | `status` | Status code | **Required** |
261
+ | `time` | Timestamp (ISO 8601) | **Required** |
262
+ | `extended` | List of bytes's objects | Optional |
263
+ | `snapshot` | List of bytes's objects | Optional |
264
+
265
+ ---
266
+
267
+ #### `add_gps` Payload
268
+
269
+ | Key | Description | Required / Optional |
270
+ | ----------- | ---------------------------------- | ------------------- |
271
+ | `time` | Timestamp (ISO 8601) | **Required** |
272
+ | `latitude` | Latitude | Optional |
273
+ | `longitude` | Longitude | Optional |
274
+ | `accuracy` | GPS accuracy (meters) | Optional |
275
+ | `altitude` | Altitude (meters) | Optional |
276
+ | `speed` | Speed (m/s or chosen unit) | Optional |
277
+ | `bearing` | Bearing (degrees) | Optional |
278
+ | `available` | Object describing available fields, all of them are optional | Optional |
279
+
280
+ ---
281
+
282
+ #### `add_network_stats` Payload
283
+
284
+ | Key | Description | Required / Optional |
285
+ | ------------------- | ------------------------ | ------------------- |
286
+ | `name` | Network name | **Required** |
287
+ | `vehicleId` | Vehicle ID | **Required** |
288
+ | `uploadId` | Upload session ID | **Required** |
289
+ | `totalMessages` | Total number of messages | **Required** |
290
+ | `matchedMessages` | Number of matched msgs | **Required** |
291
+ | `unmatchedMessages` | Number of unmatched msgs | **Required** |
292
+ | `errorMessages` | Number of errors | **Required** |
293
+ | `longMessageParts` | Number of long msgs | **Required** |
294
+ | `rate` | Message rate | **Required** |
295
+ | `maxTime` | Max timestamp (ISO 8601) | Optional |
296
+ | `minTime` | Min timestamp (ISO 8601) | Optional |
201
297
 
202
298
  ---
203
299
 
@@ -5,7 +5,7 @@ analytics_ingest/internal/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeR
5
5
  analytics_ingest/internal/schemas/configuration_schema.py,sha256=u53vkAPBjEI6orcIxapiD983VrytyrSz1ZfwCymMvhc,451
6
6
  analytics_ingest/internal/schemas/dtc_schema.py,sha256=l-XeV0zj8fMwfbJH_V7SF29di4wBoMlglLwCer0tEmQ,491
7
7
  analytics_ingest/internal/schemas/gps_schema.py,sha256=4h7yvL8rf8jk_zdHvrCMjoVz6deidcGUvGASMMSrSdg,919
8
- analytics_ingest/internal/schemas/ingest_config_schema.py,sha256=4h3SMVrSljunh29ClTGQU7D8LuQEZWs1Fsstlpe34J8,946
8
+ analytics_ingest/internal/schemas/ingest_config_schema.py,sha256=KyBLJKdK492KDmDiK4EZhf3UZVDFJkXMQE8r74OIWik,888
9
9
  analytics_ingest/internal/schemas/message_schema.py,sha256=dtNwwjxVE0NHrsoJDiveKjus_ENZVyWj0guAGDlrW1Q,979
10
10
  analytics_ingest/internal/schemas/network_schema.py,sha256=d003Z5oAd5bT-KdBKBoKE0DI9owj0rR1951hrLoiml0,1023
11
11
  analytics_ingest/internal/schemas/signal_schema.py,sha256=vRklzKC4gaAnk-q8iafnPqP2Ch3NjpKKLW9GMK6ZA9U,3179
@@ -28,8 +28,8 @@ factories/init_schema_factory.py,sha256=1EnCD_IHoKTER2X6gbug0ZUsr9Iho9t3bbgABwLH
28
28
  factories/message.py,sha256=C7JorFPIrFzBSfsmRP2pIQ6MKS-1H9imDhm0PMe1YSc,722
29
29
  factories/network_stats.py,sha256=HCttDWOXPUDqJnh66DuwbtJEQmUzrPGYHmaxCVD6Bvo,813
30
30
  factories/signal.py,sha256=zsj1p13dbKDStNhW0GHOOf8Ru8bM-VHV1pW1mj5ZZFs,1513
31
- ics_wivi_analytics_ingest-0.1.1.dist-info/licenses/LICENSE,sha256=y8iihD3bEcObJaLI4FUKuGXa0Yr3BnOmQ3QUPuPvO90,1649
32
- ics_wivi_analytics_ingest-0.1.1.dist-info/METADATA,sha256=ZtyNII5ARbXiFa1q4zgSgXPRBi3BceweYW35vkIkkSo,7693
33
- ics_wivi_analytics_ingest-0.1.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
34
- ics_wivi_analytics_ingest-0.1.1.dist-info/top_level.txt,sha256=SSaHIk3V55_kvJGdVYLZUIP5tJVdSibTLt1rFtqKN00,27
35
- ics_wivi_analytics_ingest-0.1.1.dist-info/RECORD,,
31
+ ics_wivi_analytics_ingest-0.1.2.dist-info/licenses/LICENSE,sha256=y8iihD3bEcObJaLI4FUKuGXa0Yr3BnOmQ3QUPuPvO90,1649
32
+ ics_wivi_analytics_ingest-0.1.2.dist-info/METADATA,sha256=sXAQ9qMjDlzM8bl78me40jCpW4dUASoOcvw-4Gh2yA8,12609
33
+ ics_wivi_analytics_ingest-0.1.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
34
+ ics_wivi_analytics_ingest-0.1.2.dist-info/top_level.txt,sha256=SSaHIk3V55_kvJGdVYLZUIP5tJVdSibTLt1rFtqKN00,27
35
+ ics_wivi_analytics_ingest-0.1.2.dist-info/RECORD,,