Skip to main content

vercel_blob

A Python wrapper for the Vercel Blob Storage API

Installation

pip3 install vercel_blob

Getting Started

Python Version

This package (vercel_blob) was written using Python 3 in mind, and Python 2 will not work properly.

Set Environment Variable for Authorization

export BLOB_READ_WRITE_TOKEN="superssecretkey"

Add vercel_blob to your code

import vercel_blob
#or
import vercel_blob.blob_store
# or if you want to use an alias
import vercel_blob.blob_store as vb_store

Using vercel_blob

Currently only supports the basic list, put, delete and head(get file metadata) operations. Here's a quick overview:

List all files in the Blob Storage

The list method will return a list of all files in the blob storage. You can pass 'limit' to limit the returned number of blobs.

def list_all_blobs():
    blobs = vercel_blob.blob_store.list({
        'limit': '5',
    })

list() returns a JSON object in the following format:

blobs: {
  size: `number`;
  uploadedAt: `Date`;
  pathname: `string`;
  url: `string`;
  downloadUrl: `string`
}[]
cursor?: `string`;
hasMore: `boolean`;
folders?: `string[]`

For a long list of blob objects (the default list limit is 1000), you can use the cursor and hasMore parameters to paginate through the results as shown in the example below:

blobs = vercel_blob.blob_store.list({
        'limit': '4',
        'cursor': cursor,
    })

Upload File / Blob to the Storage


Delete a blob or a list of blobs from the Blob Storage


Get blob metadata


Metadata

Release files for vercel-blob 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vercel-blob 0.1.4
File Size Uploaded
vercel_blob-0.1.4.tar.gz 3.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vercel-blob 0.1.4
File Interpreter ABI Platform
vercel_blob-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 8.2 kB

Release files / vercel_blob-0.1.4.tar.gz

Download URL vercel_blob-0.1.4.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a57a9f59baea146cb9e24cabfeaac3ebbac58030f6cd216085165b62d5821dc1
BLAKE2b-256 checksum
How to use checksums
2c3aa5de12e8f8fde5f70037351ec68c979a14e79c2a490946a8ce0519ef39be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.1 Windows/10

Release files / vercel_blob-0.1.4-py3-none-any.whl

Download URL vercel_blob-0.1.4-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
309edcd79a9d34366ad289ee397120a9e71d29d7c69d6d4a3f8df5aa692c8dd7
BLAKE2b-256 checksum
How to use checksums
abdea3be7f43a8575a13e336b1e506827f291ed7ca93c1a42397114e9a3aaa18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.1 Windows/10

Release history Release notifications | RSS feed

0.5.0

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.2

2 release files

0.3.0

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page