Skip to main content

Azure Blob

Installation

pip install blob-az

Authorization

The required connection string can be obtained from the Azure Portal, within the Storage account, "Access keys" tab

Environment (.env)

For convenience, you can set os.environ["BLOB_CONN_STR"]. If you do, you can skip specifying it on every call.

E.g., create a .env file:

BLOB_CONN_STR="<BLOB_CONN_STR>"

Then load it before importing

from dotenv import load_dotenv
load_dotenv()
import blob_az as bz

bz.client() # just works!

API

  • Asynchronous (everything is a coroutine)
  • Single calls or multiple using a same client:
    # single call
    await bz.list.containers(conn_str=CONN_STR) # ain't necessary with a .env file
    
    # multiple calls
    async with bz.client() as client: # idem.
        await bz.container.create("<container-name>", client=client)
        cs = await bz.list.containers(client=client)
    

Functions

blob_az
    def client(...) -> BlobServiceClient
    list
        async def containers(...) -> list[dict]
        async def blobs(...) -> list[dict]
    container
        async def create(...)
        async def delete(...)
    blob
        async def upload(...)
        async def download(...) -> bytes
        def url(...) -> str # generate SAS url for blob

Metadata

Release files for blob-az 0.2.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 blob-az 0.2.4
File Size Uploaded
blob-az-0.2.4.tar.gz 4.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for blob-az 0.2.4
File Interpreter ABI Platform
blob_az-0.2.4-py3-none-any.whl Python 3 none any Details

Total release size: 11.0 kB

Release files / blob-az-0.2.4.tar.gz

Download URL blob-az-0.2.4.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
fb02cd40d95a5d212b40fdca33b358bef81752e3c1d8f5592797c40680103158
BLAKE2b-256 checksum
How to use checksums
6fde2dfb203dc5f6f78835c1b952b1e8f5c5e581bf0451b4d755af25a987ece9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.6

Release files / blob_az-0.2.4-py3-none-any.whl

Download URL blob_az-0.2.4-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9c2e3f94cd6a8f6d3c18cc2e4f5034e79a86c8badcfa3afb292ebd8e67e06295
BLAKE2b-256 checksum
How to use checksums
4babf0fef6a1149b4441752e31e5ce24e3c9de19d589f78c7de9e60f9f0a9eee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.6

Release history Release notifications | RSS feed

This release

0.2.4 This release

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

1 release file

0.1.10

1 release file

0.1.9

1 release file

0.1.8

1 release file

0.1.7

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

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