.NET Comparison
Both the Python and .NET clients expose the same API surface with idiomatic naming for their respective language.
Side-by-Side
| Concept |
.NET (AccordionQ2Client) |
Python (AccordionQ2Client) |
| Lifecycle |
IDisposable / using |
Context manager / with |
| Methods |
GetValueAsync(name) |
get_value(name) |
| Concurrency |
async / await |
Synchronous (thread-safe) |
| Nullability |
string? |
None |
| Config |
ChannelConfigRequest.Enabled = true |
ChannelConfigRequest(enabled=True) |
| Enums |
ChannelTypes.Analog |
ChannelTypes.ANALOG |
| Errors |
AccordionQ2ApiException |
AccordionQ2ApiError |
| Type annotations |
Full (Nullable Reference Types) |
Full (PEP 484, mypy strict) |
| Dependencies |
Newtonsoft.Json |
None (stdlib only) |
| Install |
dotnet add package AccordionQ2.WebApiClient |
pip install accordionq2 |
| Package |
NuGet |
PyPI |
Code Examples
When to Use Which
| Scenario |
Recommended Client |
| Test automation scripts |
Python |
| Raspberry Pi / embedded Linux |
Python or .NET |
| ASP.NET services / Azure |
.NET |
| Jupyter notebooks / data analysis |
Python |
| Desktop applications (WPF, WinForms) |
.NET |
| CI/CD pipelines |
Either |