Skip to main content

absu: Azure Blob Storage Updater

What is it?

absu is a tool that helps you syncing a local folder to the $web container of an Azure Blob Storage. This is useful if you want to host a website that was generated with a static website generator like hugo, mkdocs, Jekyll, next.js and so on on Azure Blob Storage...

absu does the following things:

  • create a resource group in Azure (if not existing)
  • create a Storage Account within that resource group (if not existing)
  • create a $web container within that storage (if not existing)
  • delete all files in that container
  • upload all data from a local folder into that container

You can skip the first two steps by providing a connection string for an existing Azure Blob Storage.

How to install

You will need these tools installed:

Use the following commands to make sure your installations works.

Python:

python --version

Pip:

pip --version

Az:

az --version

Then install the absu package with pip:

pip install absu

How to use

Show help:

python -m absu -h
usage: __main__.py [-h] [-c CONNECTIONSTRING] [-s STORAGE] [-r RESOURCEGROUP] [-f FOLDER] [-v]       

Please provide at least one of the following: 1) a Azure Blob Storage name OR 2) a connection string.

optional arguments:
  -h, --help            show this help message and exit
  -c CONNECTIONSTRING, --connectionstring CONNECTIONSTRING
                        Azure Blob Storage connection string.
  -s STORAGE, --storage STORAGE
                        Azure Blob Storage resource name. Creates new one if not existing.
  -r RESOURCEGROUP, --resourcegroup RESOURCEGROUP
                        The Azure Blob Storage is in this resource group. Default: blogs-rg
  -f FOLDER, --folder FOLDER
                        Folder with static website data. Will be pushed to the storage.
  -v, --verbose         Verbose, use this flag for debugging.

Execute the tool with default parameters:

python -m absu

absu will ask you for the Azure Blob Storage name and for the local folder in the command line. If you have access to multiple subscriptions, then it will also ask you which subscription you want to use.

The resource group will be called "blob-rg" per default. It can be changed with the --resourcegroup parameter.


Provide a connection string:

python -m absu --connectionstring "DefaultEndpointsProtocol=https;AccountName=STORAGENAME;AccountKey=PASSWORD;EndpointSuffix=core.windows.net"

Provide a local folder (mywebsite) a storage account name (mystorage01) and a resource group (mybloggroup):

python -m absu --folder mywebsite --resourcegroup mybloggroup --storage mystorage01

Debugging:

python -m absu --verbose

Build this project

Build locally:

pip install .

Build dist files:

python setup.py sdist

Upload to https://test.pypi.org:

twine upload --repository-url https://test.pypi.org/legacy/ dist/*

Upload to https://pypi.org:

twine upload dist/*

Metadata

Release files for absu 1.1.1

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

Source distribution (sdist)

Source distribution for absu 1.1.1
File Size Uploaded
absu-1.1.1.tar.gz 12.4 kB Details

Release files / absu-1.1.1.tar.gz

Download URL absu-1.1.1.tar.gz
Size 12.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b4e6c2cd24edde8bc9cae0352ed6fed630089d70358fd0d4795d199ab0dd53cd
BLAKE2b-256 checksum
How to use checksums
2f582cf3c1b1cc6fdbc519871964612578fd3333cc7fc115243e9c1426eb6709
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.1

Release history Release notifications | RSS feed

This release

1.1.1 This release

1 release file

1.1.0

1 release file

1.0.0

1 release file

0.0.1

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