DataNest 0.0.1
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package DataNest --version 0.0.1
NuGet\Install-Package DataNest -Version 0.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DataNest" Version="0.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DataNest" Version="0.0.1" />
<PackageReference Include="DataNest" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DataNest --version 0.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DataNest, 0.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DataNest@0.0.1
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DataNest&version=0.0.1
#tool nuget:?package=DataNest&version=0.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
DataNest
DataNest is a lightweight .NET wrapper for the Google Sheets and Google Drive APIs.
It simplifies authentication, data access, and file management in your applications while supporting Dependency Injection (DI) for clean integration.
✨ Features
- ✅ Easy Google Sheets read/write
- ✅ Google Drive file & folder management
- ✅ Strongly typed async APIs
- ✅ Supports Dependency Injection
- ✅ .NET 9 ready
📦 Installation
Install via NuGet:
dotnet add package CodeEvolveLabs.DataNest
🔧 Setup
- Enable the Google Sheets API and Google Drive API in Google Cloud Console.
- Download your
credentials.jsonfile. - Place it in your project (or a secure location).
🚀 Usage
1. Register DataNest with Dependency Injection
using DataNest;
using Microsoft.Extensions.DependencyInjection;
var services = new ServiceCollection();
// Register DataNest with DI
services.AddScoped<IDataNestService>(provider =>
new DataNestService(new DataNestOptions
{
CredentialsPath = "credentials.json", // path to your credentials file
ApplicationName = "MyApp"
})
);
// Build the service provider
var provider = services.BuildServiceProvider();
// Resolve the service
var dataNest = provider.GetRequiredService<IDataNestService>();
2. Working with Google Sheets
// Append a row
await dataNest.Sheets.AppendRowAsync(
spreadsheetId: "your-spreadsheet-id",
range: "Sheet1!A:D",
values: new[] { "Name", "Email", "Date" }
);
// Read rows
var rows = await dataNest.Sheets.ReadRowsAsync(
spreadsheetId: "your-spreadsheet-id",
range: "Sheet1!A:D"
);
foreach (var row in rows)
{
Console.WriteLine(string.Join(", ", row));
}
3. Working with Google Drive
// Create a folder
var folderId = await dataNest.Drive.CreateFolderAsync("Reports", parentFolderId: null);
// Upload a file
var fileId = await dataNest.Drive.UploadFileAsync(
localFilePath: "report.pdf",
folderId: folderId
);
// Move file to another folder
await dataNest.Drive.MoveFileAsync(fileId, newParentFolderId: "another-folder-id");
📖 Roadmap
- Batch update Google Sheets
- Drive file sharing permissions
- More DI-friendly typed clients (
ISheetsService,IDriveService)
📜 License
This project is licensed under the MIT License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net9.0
- Google.Apis.Auth (>= 1.70.0)
- Google.Apis.Drive.v3 (>= 1.70.0.3883)
- Google.Apis.Sheets.v4 (>= 1.70.0.3819)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.