https://github.com/stefh/presidio.sdk
Unofficial RestEase C# Client for Microsoft Presidio
https://github.com/stefh/presidio.sdk
Last synced: 3 months ago
JSON representation
Unofficial RestEase C# Client for Microsoft Presidio
- Host: GitHub
- URL: https://github.com/stefh/presidio.sdk
- Owner: StefH
- License: mit
- Created: 2025-05-27T20:15:44.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-10T12:57:55.000Z (about 1 year ago)
- Last Synced: 2025-09-10T20:51:18.926Z (9 months ago)
- Language: C#
- Size: 45.9 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#  Presidio .NET SDK
Unofficial [RestEase](https://github.com/canton7/RestEase) C# Client for [Microsoft Presidio](https://microsoft.github.io/presidio/).
## 📦 Presidio.SDK
[](https://www.nuget.org/packages/Presidio.SDK)
## 📦 Presidio.SDK.Extensions
[](https://www.nuget.org/packages/Presidio.SDK.Extensions)
### Extensions
#### `nl` language
- NlPostCodeRecognizer (*example: 1000 AA*)
- NlStreetRecognizer (*example: Hoofdstraat 12a*)
- NlDateRecognizer (*example: 25 maart 2024*)
- NlBSNRecognizer (*example: 123456782*)
## ⭐ Usage
### Register
``` c#
var configuration = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json")
.AddJsonFile("appsettings.Development.json", optional: true)
.Build();
services.AddPresidioSDK(configuration);
var serviceProvider = services.BuildServiceProvider();
```
### Use Analyzer
``` c#
IPresidioAnalyzer analyzerService = serviceProvider.GetRequiredService();
var text =
"""
Date1: January 04, 2025 at 06:38 PM
John Smith (john@test.com) lives in 127.0.0.1 and his drivers license is AC432223.
And for Jane it's AC439999
""";
// Analyze text for PII
var analyzeRequest = new AnalyzeRequest
{
Text = text,
Language = "en",
CorrelationId = Guid.NewGuid().ToString()
};
var analysisResults = await analyzerService.AnalyzeAsync(analyzeRequest, cancellationToken);
```