Neoxack.S3Kira 0.7.0

dotnet add package Neoxack.S3Kira --version 0.7.0
NuGet\Install-Package Neoxack.S3Kira -Version 0.7.0
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="Neoxack.S3Kira" Version="0.7.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Neoxack.S3Kira --version 0.7.0
#r "nuget: Neoxack.S3Kira, 0.7.0"
#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.
// Install Neoxack.S3Kira as a Cake Addin
#addin nuget:?package=Neoxack.S3Kira&version=0.7.0

// Install Neoxack.S3Kira as a Cake Tool
#tool nuget:?package=Neoxack.S3Kira&version=0.7.0

.NET NuGet NuGet CodeFactor

S3Kira 🪓

S3Kira is a lightweight C# library that provides a simple interface to interact with Amazon S3-like services. The library supports basic operations such as creating, deleting, and managing buckets and files.

Features

  • Simple interface for managing buckets and files
  • Low memory footprint
  • Force delete buckets with files in Minio S3
  • Configured PooledConnectionLifetime for reflect the DNS or other network changes

Getting Started

Prerequisites

  • .NET SDK

Installation

To use S3Kira in your project, add the library as a dependency using your preferred method (e.g., NuGet).

Usage

Here's an example of how to use S3Kira:

using s3kira;
using System.Threading;

var settings = new S3KiraSettings
{
    AccessKey = "your-access-key",
    SecretKey = "your-secret-key",
    Endpoint = "your-s3-endpoint",
    Region = "your-region"
};

var s3Kira = new S3Kira(settings);

// Check if a bucket exists
var bucketExists = await s3Kira.IsBucketExistsAsync("my-bucket", CancellationToken.None);

// Create a new bucket
await s3Kira.CreateBucketAsync("new-bucket", CancellationToken.None);

// Upload a file
using (var fileStream = File.OpenRead("path/to/your/file"))
{
    var uploadFileCommand = new UploadFileCommand
    {
        Bucket = "new-bucket",
        FileName = "your-file-name",
        Size = fileStream.Length,
        ContentType = "your-content-type",
        Stream = fileStream
    };
    await s3Kira.UploadFileAsync(uploadFileCommand, CancellationToken.None);
}

Methods

  • IsBucketExistsAsync: Checks if a bucket exists
  • CreateBucketAsync: Creates a new bucket
  • DeleteBucketAsync: Deletes an existing bucket
  • UploadFileAsync: Uploads a file to a specified bucket
  • DeleteFileAsync: Deletes a file from a specified bucket
  • IsFileExistsAsync: Checks if a file exists in a specified bucket
  • GetFileStreamAsync: Retrieves a file stream for a file in a specified bucket

Benchmarks

BenchmarkDotNet v0.13.7, macOS Ventura 13.4.1 (c) (22F770820d) [Darwin 22.5.0]
Apple M2 Pro, 1 CPU, 12 logical and 12 physical cores
.NET SDK 7.0.306
 [Host]     : .NET 7.0.9 (7.0.923.32018), Arm64 RyuJIT AdvSIMD
 DefaultJob : .NET 7.0.9 (7.0.923.32018), Arm64 RyuJIT AdvSIMD
Method Mean Error StdDev Ratio RatioSD Allocated Alloc Ratio
minio-dotnet 101.78 ms 1.821 ms 1.703 ms 1.20 0.02 6463.49 KB 114.26
AmazonAwsSdk 88.13 ms 1.356 ms 1.269 ms 1.06 0.02 9491.12 KB 167.776
S3Kira 84.79 ms 1.122 ms 1.050 ms 1.00 0.00 56.57 KB 1.00

Contributing

Contributions are welcome! Please feel free to submit issues or pull requests.

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net7.0

    • No dependencies.
  • net8.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Neoxack.S3Kira:

Package Downloads
Neoxack.S3Kira.AspNetCore

ASP.NET extensions for S3Kira S3 client

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.7.0 192 4/6/2024
0.6.0 337 8/13/2023
0.5.0 153 8/12/2023
0.2.0 142 8/5/2023
0.1.0 149 5/15/2023