At bunny.net, we're focused on helping developers build, innovate, and deploy faster. Today, we're excited to announce the Bunny Storage SDK, a new TypeScript library designed to simplify working with the Bunny Storage API. It makes integrating Bunny Storage into your TypeScript, JavaScript, or Edge Scripting projects smoother than ever.
This SDK joins our existing official libraries for PHP, .NET, and Java, along with community-supported versions for Python and Go.
A simpler way to work with Bunny Storage
While you could already use the Bunny Storage API to build amazing, ultra-fast applications, we wanted to make it even easier for developers. The Bunny Storage SDK removes the complexity of managing storage by offering a developer-friendly way to interact with the Bunny Storage API. Whether you're handling file uploads, creating folders, or managing files, the SDK simplifies your workflow so you can focus on innovation instead of authentication, API calls, or syntax.
Here's how easy it is now:
BunnyStorageSDK.file.createDirectory(yourZone, 'My Folder');
Hassle-free storage integration with Edge Scripting
Bunnies are developers at heart, just like you, and we love using Edge Scripting for all sorts of projects. But integrating Bunny Storage with edge scripts didn't feel quite "hoppy" enough, so we improved it. Now, the Bunny Storage SDK integrates seamlessly with Edge Scripting. Simply import the SDK, securely connect to a storage zone using your AccessKey stored in Edge Scripting Secrets, and hop away!
Here's a quick example demonstrating how easy it is to list the contents of a folder:
import * as BunnySDK from "@bunny.net/edgescript-sdk";
import * as BunnyStorageSDK from "@bunny.net/storage-sdk";
let sz_zone = process.env.STORAGE_ZONE!;
let access_key = process.env.STORAGE_ACCESS_KEY!;
let sz = BunnyStorageSDK.zone.connect_with_accesskey(BunnyStorageSDK.regions.StorageRegion.Falkenstein, sz_zone, access_key);
console.log("Starting server...");
BunnySDK.net.http.serve({ port: 8080, hostname: '127.0.0.1' }, async (req) => {
let list = await BunnyStorageSDK.file.list(sz, "/");
console.log(`[INFO]: ${req.method} - ${req.url}`);
return new Response(JSON.stringify(list));
});
What can you build with Bunny Storage SDK? Everything.
Need inspiration? Here are five exciting use cases to spark your creativity:
- Effortless Docker registry integration: Simplify container management by powering your Docker registry with Bunny Storage. Streamline deployments, speed up builds, and securely manage container images with reliable storage.
- Password-protected file sharing: Easily create secure file-sharing experiences by protecting shared files with passwords. Ensure only authorized users can access your content, enhancing security and privacy.
- AI model request auditing & logging: Automatically audit and log every request and response made by your AI models. Achieve compliance, maintain transparency, and keep thorough records effortlessly.
- Seamless multipart uploads: Simplify large file uploads by breaking them into manageable chunks, enabling efficient, robust multipart uploads integrated directly with Bunny Storage.
- High-performance file-sharing solutions: Quickly deploy secure, reliable file-sharing systems for your users or internal teams, ensuring fast delivery, global access, and seamless scalability.
Built by developers, for developers
At bunny.net, we believe infrastructure should empower you, not slow you down. The Bunny Storage SDK is just another way we help you build fast, scalable, and efficient applications with minimal overhead.
Ready to hop in? Get started today and explore the possibilities with the Bunny Storage SDK!