inpsNuGet 2.0.2
dotnet add package inpsNuGet --version 2.0.2
NuGet\Install-Package inpsNuGet -Version 2.0.2
<PackageReference Include="inpsNuGet" Version="2.0.2" />
<PackageVersion Include="inpsNuGet" Version="2.0.2" />
<PackageReference Include="inpsNuGet" />
paket add inpsNuGet --version 2.0.2
#r "nuget: inpsNuGet, 2.0.2"
#:package inpsNuGet@2.0.2
#addin nuget:?package=inpsNuGet&version=2.0.2
#tool nuget:?package=inpsNuGet&version=2.0.2
inpsNuGet
inpsNuGet is a multipurpose .NET utility library: an embedded Python runtime manager, process/thread helpers, Windows Forms controls, sorting algorithms, text ciphers, conversions, validation helpers and geometry formulas.
Namespace: inpsNuGet · Targets: net8.0, net8.0-windows · Version: 2.x
Installation
dotnet add package inpsNuGet
Python runtime (PyCS, Windows only)
The embedded runtime is extracted lazily on first use. Failures throw exceptions; results come back as ProcessResult.
using inpsNuGet;
var py = new PyCS(log: Console.Out); // extracts to ./Python
// var py = new PyCS(@"C:\CustomPython", Console.Out);
py.InstallPip();
py.Pip("requests", "numpy");
py.PipUpgrade("requests");
py.PipLocal(@"C:\wheels", "mypackage"); // offline install
ProcessResult r = py.Run("print('Hello from Embedded Python!')");
Console.WriteLine(r.StandardOutput);
string text = py.GetOutput("import math; print(math.sqrt(144))");
py.RunFile("script.py");
py.Stop(); // kill the running process tree
py.TrustPypiHosts = true adds --trusted-host for PyPI. It disables TLS verification for those hosts, so only use it behind a TLS-intercepting proxy.
Threading and processes (Actions)
new Actions(() => Console.WriteLine("thread pool")).Run();
new Actions(() => Console.WriteLine("own thread")).RunOnDedicatedThread(doInBackground: true);
// Run an executable and get the result (nothing is written to the console):
ProcessResult result = await Actions.ExecuteAsync("git", ["status", "--short"]);
Console.WriteLine($"{result.ExitCode}: {result.StandardOutput}");
// Or fire and track:
var a = new Actions().RunExe("git", "status");
await a.RunningTask!;
Windows Forms controls (net8.0-windows only)
var list = new VerticalList { Dock = DockStyle.Fill };
list.AddItem("Item 1");
list.AddItem("Item 2", () => MessageBox.Show("clicked"));
var toggle = new ClickableElement("Toggleable");
toggle.SetEvent(() => toggle.Toggle());
list.AddItem(toggle);
Controls.Add(list);
Ciphers
Output is upper-case; non-letters pass through.
Cipher.CaesarCipher("HELLO WORLD", 3); // "KHOOR ZRUOG" (negative shifts work too)
Cipher.KeywordCipher("HELLO WORLD", "KEYWORD"); // "AOGGJ UJNGW"
Cipher.GiovanniCipher("HELLO WORLD", "KEYWORD", "C"); // "RYCCH SHLCE"
Cipher.TranspositionCipher("HELLO WORLD"); // "HLOOLELWRD"
Sorting
Every method returns a new array and never modifies its input.
Sort method |
Notes |
|---|---|
BubbleSort, CocktailShakerSort, OddEvenSort, SelectionSort, InsertionSort, ShellSort |
simple / quadratic-ish |
QuickSort |
in-place 3-way, median-of-three |
MergeSort |
stable |
HeapSort |
in-place heap |
IntroSort |
quicksort + heapsort fallback + insertion sort |
FrameworkSort |
Array.Sort on a copy |
CountingSort |
negatives OK; value range capped at 2^24 |
BucketSortUniform(double[]) |
values in [0, 1) |
PatienceSort |
piles + k-way merge |
EducationalSort: BogoSort(arr, cancellationToken), BeadSort (non-negative), TreeSort (unbalanced BST).
int[] sorted = Sort.QuickSort([5, 2, 9, 1, 5, 6]);
Validation (Check, EmailDomainValidator)
var emails = new EmailDomainValidator()
.AddDomainName("gmail").AddDomainExtension("com");
emails.IsValid("test@gmail.com"); // true (case-insensitive)
var full = new EmailDomainValidator { UseFullDomain = true }.AddDomain("company.co.uk");
full.IsValid("user@company.co.uk"); // true
Check.IsAValidPhilippineMobileNumber("+639171234567");
Check.IsAllNumbers("12345"); Check.HasSymbols("price: $5"); Check.HasNoSpaces("abc");
Check.HowManyHoursLeft(DateTime.Now, DateTime.Now.AddHours(2.5));
bool online = await Check.HasInternetAsync(); // true only on HTTP 204
Conversions (StringConvert, Text)
StringConvert.Reverse("hello"); // "olleh"
StringConvert.ToBase64("Sample"); StringConvert.FromBase64(b64);
StringConvert.ToHex("hello"); // "68656C6C6F" (UTF-8 bytes)
StringConvert.ToBinary("hello"); // 8 bits per UTF-8 byte
StringConvert.ToDouble("3.1415"); // invariant culture
Text.GetTextFromDoubleQuotations("say \"hi\" now"); // "hi" (throws FormatException if no pair of quotes)
Text.TryGetTextFromDoubleQuotations(line, out var inner);
Geometry (AreaCalculator)
AreaCalculator.CircleArea(5.0); // 78.54
AreaCalculator.PolygonShoelaceArea([(0, 0), (4, 0), (4, 3), (0, 3)]); // 12.0
AreaCalculator.SphereSurfaceArea(3.0); // 113.10
Files and embedded resources (SimpleFileHandler)
SimpleFileHandler.Write("o.txt", "x"); SimpleFileHandler.Append("o.txt", "y"); SimpleFileHandler.Read("o.txt");
// Throws IOException on Zip Slip entries
SimpleFileHandler.ExtractZipSafe("archive.zip", @"C:\Out");
var asm = Assembly.GetExecutingAssembly();
SimpleFileHandler.ProjectToLocation(asm, "config.json", @"C:\AppConfig");
SimpleFileHandler.ExtractEmbeddedZip(asm, "payload.zip", @"C:\AppPayload"); // no temp file
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net8.0-windows7.0 is compatible. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- No dependencies.
-
net8.0-windows7.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.2 | 117 | 11/17/2026 |
| 2.0.1 | 101 | 11/10/2026 |
| 2.0.0 | 100 | 11/3/2026 |
| 1.2.18 | 138 | 9/8/2026 |
| 1.2.17 | 137 | 9/6/2026 |
| 1.2.16 | 127 | 9/4/2026 |
| 1.2.15 | 127 | 9/3/2026 |
| 1.2.14 | 116 | 9/2/2026 |
| 1.2.13 | 124 | 9/2/2026 |
| 1.2.12 | 123 | 9/1/2026 |
| 1.2.11 | 124 | 9/1/2026 |
| 1.2.10 | 113 | 8/31/2026 |
| 1.2.9 | 119 | 8/28/2026 |
| 1.2.8 | 117 | 8/28/2026 |
| 1.2.7 | 107 | 8/27/2026 |
| 1.2.6 | 120 | 8/27/2026 |
| 1.2.5 | 109 | 8/27/2026 |
| 1.2.4 | 122 | 8/27/2026 |
| 1.2.3 | 102 | 8/26/2026 |
| 1.2.2 | 109 | 8/26/2026 |