All Projects → jchristn → BlobHelper

jchristn / BlobHelper

Licence: MIT license
BlobHelper is a common, consistent storage interface for Microsoft Azure, Amazon S3, Komodo, Kvpbase, and local filesystem written in C#.

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to BlobHelper

Goofys
a high-performance, POSIX-ish Amazon S3 file system written in Go
Stars: ✭ 3,932 (+16995.65%)
Mutual labels:  aws-s3, s3, s3-bucket, azure-storage
Less3
Less3 is an S3-compatible object storage server that runs on your laptop, servers, just about anywhere!
Stars: ✭ 16 (-30.43%)
Mutual labels:  storage, restful, s3, blob
simply-static-deploy
WordPress plugin to deploy static sites easily to an AWS S3 bucket.
Stars: ✭ 48 (+108.7%)
Mutual labels:  aws-s3, s3, s3-bucket
Minio Hs
MinIO Client SDK for Haskell
Stars: ✭ 39 (+69.57%)
Mutual labels:  aws-s3, s3, s3-bucket
awesome-storage
A curated list of storage open source tools. Backups, redundancy, sharing, distribution, encryption, etc.
Stars: ✭ 324 (+1308.7%)
Mutual labels:  storage, s3, s3-bucket
Bucket-Flaws
Bucket Flaws ( S3 Bucket Mass Scanner ): A Simple Lightweight Script to Check for Common S3 Bucket Misconfigurations
Stars: ✭ 43 (+86.96%)
Mutual labels:  aws-s3, s3, s3-bucket
ionic-image-upload
Ionic Plugin for Uploading Images to Amazon S3
Stars: ✭ 26 (+13.04%)
Mutual labels:  aws-s3, s3, s3-bucket
0x4447 product s3 email
📫 A serverless email server on AWS using S3 and SES
Stars: ✭ 2,905 (+12530.43%)
Mutual labels:  aws-s3, s3, s3-bucket
Kvpbase
Scalable, simple RESTful object storage platform, written in C#
Stars: ✭ 43 (+86.96%)
Mutual labels:  storage, restful, kvpbase
Storage
💿 Storage abstractions with implementations for .NET/.NET Standard
Stars: ✭ 380 (+1552.17%)
Mutual labels:  storage, aws-s3, azure-storage
flask-drive
A simple Flask app to upload and download files off Amazon's S3
Stars: ✭ 23 (+0%)
Mutual labels:  aws-s3, s3, s3-bucket
Mc
MinIO Client is a replacement for ls, cp, mkdir, diff and rsync commands for filesystems and object storage.
Stars: ✭ 1,962 (+8430.43%)
Mutual labels:  storage, aws-s3, s3
Sbt S3 Resolver
☁️Amazon S3-based resolver for sbt
Stars: ✭ 112 (+386.96%)
Mutual labels:  aws-s3, s3, s3-bucket
storage-abstraction
Provides an abstraction layer for interacting with a storage; the storage can be local or in the cloud.
Stars: ✭ 36 (+56.52%)
Mutual labels:  storage, aws-s3, blob-storage
Radosgw Admin4j
A Ceph Object Storage Admin SDK / Client Library for Java ✨🍰✨
Stars: ✭ 50 (+117.39%)
Mutual labels:  storage, aws-s3, s3
Cloudexplorer
Cloud Explorer
Stars: ✭ 170 (+639.13%)
Mutual labels:  storage, s3, s3-bucket
Node Disk Manager
Kubernetes Storage Device Management
Stars: ✭ 128 (+456.52%)
Mutual labels:  disk, storage
Binaryprefs
Rapidly fast and lightweight re-implementation of SharedPreferences which stores each preference in files separately, performs disk operations via NIO with memory mapped byte buffers and works IPC (between processes). Written from scratch.
Stars: ✭ 484 (+2004.35%)
Mutual labels:  disk, storage
kafka-connect-fs
Kafka Connect FileSystem Connector
Stars: ✭ 107 (+365.22%)
Mutual labels:  s3, azure-storage
image-uploader
JavaScript Image Uploader Library for use with Amazon S3
Stars: ✭ 19 (-17.39%)
Mutual labels:  aws-s3, s3-bucket

BlobHelper

BlobHelper is a common, consistent storage interface for Microsoft Azure, Amazon S3, S3 compatible storage (i.e. Minio, Less3), Kvpbase, and local filesystem written in C#.

NuGet Version NuGet

Help, Feedback, Contribute

If you have any issues or feedback, please file an issue here in Github. We'd love to have you help by contributing code for new features, optimization to the existing codebase, ideas for future releases, or fixes!

Overview

This project was built to provide a simple interface over external storage to help support projects that need to work with potentially multiple storage providers. It is by no means a comprehensive interface, rather, it supports core methods for creation, retrieval, deletion, metadata, and enumeration.

Contributors

Many thanks to @phpfui for adding the original code for BLOB copy functionality!

New in v2.2.0

  • BlobCopy class to copy objects from one repository to another (thank you @phpfui!)

Example Project

Refer to the Test project for exercising the library.

Getting Started - AWS S3

using BlobHelper;

AwsSettings settings = new AwsSettings(
	accessKey, 
	secretKey, 
	AwsRegion.USWest1,
	bucket);

Blobs blobs = new Blobs(settings); 

Getting Started - AWS S3 Compatible Storage (Minio, Less3, etc)

using BlobHelper;

AwsSettings settings = new AwsSettings(
	endpoint,      // http://localhost:8000/
	true,          // enable or disable SSL
	accessKey, 
	secretKey, 
	AwsRegion.USWest1,
	bucket,
	baseUrl        // i.e. http://localhost:8000/{bucket}/{key}
	);

Blobs blobs = new Blobs(settings); 

Getting Started - Azure

using BlobHelper;

AzureSettings settings = new AzureSettings(
	accountName, 
	accessKey, 
	"https://[accountName].blob.core.windows.net/", 
	containerName);

Blobs blobs = new Blobs(settings); 

Getting Started - Komodo

using BlobHelper;

KomodoSettings settings = new KomodoSettings(
	"http://localhost:9090/", 
	indexGuid, 
	apiKey);

Blobs blobs = new Blobs(settings); 

Getting Started - Kvpbase

using BlobHelper;

KvpbaseSettings settings = new KvpbaseSettings(
	"http://localhost:8000/", 
	userGuid, 
	containerName, 
	apiKey);

Blobs blobs = new Blobs(settings); 

Getting Started - Disk

using BlobHelper;

DiskSettings settings = new DiskSettings("blobs"); 

Blobs blobs = new Blobs(settings);

Getting Started (Byte Arrays for Smaller Objects)

await blobs.Write("test", "text/plain", "This is some data");  // throws IOException
byte[] data = await blobs.Get("test");                         // throws IOException
bool exists = await blobs.Exists("test");
await blobs.Delete("test");

Getting Started (Streams for Larger Objects)

// Writing a file using a stream
FileInfo fi = new FileInfo(inputFile);
long contentLength = fi.Length;

using (FileStream fs = new FileStream(inputFile, FileMode.Open))
{
    await _Blobs.Write("key", "content-type", contentLength, fs);  // throws IOException
}

// Downloading to a stream
BlobData blob = await _Blobs.GetStream(key);
// read blob.ContentLength bytes from blob.Data

Metadata and Enumeration

// Get BLOB metadata
BlobMetadata md = await _Blobs.GetMetadata("key");

// Enumerate BLOBs
EnumerationResult result = await _Blobs.Enumerate();
// list of BlobMetadata contained in result.Blobs
// continuation token in result.NextContinuationToken

Copying BLOBs from Repository to Repository

If you have multiple storage repositories and wish to move BLOBs from one repository to another, use the BlobCopy class (refer to the Test.Copy project for a full working example).

Thanks to @phpfui for contributing code and the idea for this enhancement!

Blobs from    = new Blobs(new DiskSettings("./disk1/")); // assume some files are here
Blobs to      = new Blobs(new DiskSettings("./disk2/"));
BlobCopy copy = new BlobCopy(from, to);
CopyStatistics stats = copy.Start();
/*
	{
	  "Success": true,
	  "Time": {
	    "Start": "2021-12-22T18:44:42.9098249Z",
	    "End": "2021-12-22T18:44:42.9379215Z",
	    "TotalMs": 28.1
	  },
	  "ContinuationTokens": 0,
	  "BlobsEnumerated": 12,
	  "BytesEnumerated": 1371041,
	  "BlobsRead": 12,
	  "BytesRead": 1371041,
	  "BlobsWritten": 12,
	  "BytesWritten": 1371041,
	  "Keys": [
	    "filename.txt",
	    ...
	  ]
	}
 */

Version History

Refer to CHANGELOG.md for version history.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].