netra-sdk 0.1.17__py3-none-any.whl → 0.1.18__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 netra-sdk might be problematic. Click here for more details.

@@ -8,7 +8,13 @@ texts while maintaining privacy.
8
8
 
9
9
  from typing import Callable, List, Optional
10
10
 
11
- from presidio_analyzer.recognizer_result import RecognizerResult
11
+ try:
12
+ from presidio_analyzer.recognizer_result import RecognizerResult
13
+ except Exception:
14
+ raise ImportError(
15
+ "PII Detetcion requires the 'presidio' packages: Install them explicitly as they are not available with the base SDK. Use pip install 'netra-sdk[presidio]' to install them."
16
+ )
17
+
12
18
 
13
19
  from .base import AnonymizationResult, BaseAnonymizer
14
20
  from .fp_anonymizer import FormatPreservingEmailAnonymizer
netra/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.1.17"
1
+ __version__ = "0.1.18"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: netra-sdk
3
- Version: 0.1.17
3
+ Version: 0.1.18
4
4
  Summary: A Python SDK for AI application observability that provides OpenTelemetry-based monitoring, tracing, and PII protection for LLM and vector database applications. Enables easy instrumentation, session tracking, and privacy-focused data collection for AI systems in production environments.
5
5
  License: Apache-2.0
6
6
  Keywords: netra,tracing,observability,sdk,ai,llm,vector,database
@@ -152,7 +152,7 @@ from netra import Netra
152
152
  from netra.instrumentation.instruments import InstrumentSet
153
153
 
154
154
  # Initialize with default settings
155
- Netra.init(app_name="Your application name")
155
+ Netra.init(app_name="Your application name", instruments={InstrumentSet.OPENAI, InstrumentSet.ANTHROPIC})
156
156
 
157
157
  # Or with custom configuration
158
158
  api_key = "Your API key"
@@ -394,9 +394,10 @@ Track user sessions and add custom context:
394
394
 
395
395
  ```python
396
396
  from netra import Netra
397
+ from netra.instrumentation.instruments import InstrumentSet
397
398
 
398
399
  # Initialize SDK
399
- Netra.init(app_name="My App")
400
+ Netra.init(app_name="My App", instruments={InstrumentSet.OPENAI})
400
401
 
401
402
  # Set session identification
402
403
  Netra.set_session_id("unique-session-id")
@@ -574,13 +575,15 @@ You can also configure the SDK programmatically when initializing:
574
575
 
575
576
  ```python
576
577
  from netra import Netra
578
+ from netra.instrumentation.instruments import InstrumentSet
577
579
 
578
580
  Netra.init(
579
581
  app_name="my-ai-service",
580
582
  environment="production",
581
583
  resource_attributes={"team": "ai", "version": "1.0.0"},
582
584
  trace_content=True,
583
- disable_batch=False
585
+ disable_batch=False,
586
+ instruments={InstrumentSet.OPENAI}
584
587
  )
585
588
  ```
586
589
 
@@ -1,6 +1,6 @@
1
1
  netra/__init__.py,sha256=49R2bZrVu30HhpE3gfpu0b5C5cNovC6WyNyUwHCOfQ8,5392
2
2
  netra/anonymizer/__init__.py,sha256=KeGPPZqKVZbtkbirEKYTYhj6aZHlakjdQhD7QHqBRio,133
3
- netra/anonymizer/anonymizer.py,sha256=1VeYAsFpF_tYDlqJF-Q82-ZXGOR4YWBqrKUsRw3qOrA,3539
3
+ netra/anonymizer/anonymizer.py,sha256=IcrYkdwWrFauGWUeAW-0RwrSUM8VSZCFNtoywZhvIqU,3778
4
4
  netra/anonymizer/base.py,sha256=ytPxHCUD2OXlEY6fNTuMmwImNdIjgj294I41FIgoXpU,5946
5
5
  netra/anonymizer/fp_anonymizer.py,sha256=_6svIYmE0eejdIMkhKBUWCNjGtGimtrGtbLvPSOp8W4,6493
6
6
  netra/config.py,sha256=S9GsCvwtakrmryAaV-AhyVB_wAQ6tjwPLLZQemLgXko,5006
@@ -39,8 +39,8 @@ netra/scanner.py,sha256=wqjMZnEbVvrGMiUSI352grUyHpkk94oBfHfMiXPhpGU,3866
39
39
  netra/session_manager.py,sha256=EVcnWcSj4NdkH--HmqHx0mmzivQiM4GCyFLu6lwi33M,6252
40
40
  netra/span_wrapper.py,sha256=DA5jjXkHBUJ8_mdlYP06rcZzFoSih4gdP71Wwr3btcQ,8104
41
41
  netra/tracer.py,sha256=In5QPVLz_6BxrolWpav9EuR9_hirD2UUIlyY75QUaKk,3450
42
- netra/version.py,sha256=BzIjnki8Bz3evNWo6bjGxxpLhy_tN9MRYhtM0MnDiWs,23
43
- netra_sdk-0.1.17.dist-info/LICENCE,sha256=8B_UoZ-BAl0AqiHAHUETCgd3I2B9yYJ1WEQtVb_qFMA,11359
44
- netra_sdk-0.1.17.dist-info/METADATA,sha256=BR_VdbI6-h6x9-z23F0uX8Z9HtVcxRduPXC6UBhsrw4,25876
45
- netra_sdk-0.1.17.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
46
- netra_sdk-0.1.17.dist-info/RECORD,,
42
+ netra/version.py,sha256=6BiuMUkhwQp6bzUZSF8np8F1NwCltEtK0sPBF__tepU,23
43
+ netra_sdk-0.1.18.dist-info/LICENCE,sha256=8B_UoZ-BAl0AqiHAHUETCgd3I2B9yYJ1WEQtVb_qFMA,11359
44
+ netra_sdk-0.1.18.dist-info/METADATA,sha256=xANrdroAsDTktKVUyaTO6-c6r9Pja6XIMda5-Zhn0Zo,26133
45
+ netra_sdk-0.1.18.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
46
+ netra_sdk-0.1.18.dist-info/RECORD,,