Skip to main content

A native Python interface wrapping AzCopy for bulk data transfer to and from Azure Blob Storage.

Project description

Azpype

Azpype is intended to primarily be an easy-to-use lightweight native Python interface to the already excellent AzCopy command line tool.

The secondary aim is for it to extend the functionality with some additional scaffolding and functionality such as

Python enhanced logging

-- INFO HERE --

Config driven defaults

-- INFO HERE --

Out-of-the-box and custom Validation Checks

-- INFO HERE --


Installation

📢 Important: For both convenience and the purpose of behaving as a python native library; installing azpype will additionally download the platform appropriate precompiled azcopy binary (v10.18.1) and store it under ~/.azpype/. This will be bundled in as part of the package distributuion and not as a separate installation script.

Install via pip

pip install azpype

📝 Housekeeping TODOs

  • 📘 Add back in unittests for other modules
  • 📚 Update readme with better articulated out line of 'why'
  • 📖 Add Usage section
  • 📖 Add instructions on how to create the application service principal, grant it permissions and create the client secret.
  • ⏱️ Update readme with timed examples of Azpype/AzCopy along with azure-blob-storage synchronous and async
  • 📘 Add example notebooks

Authentication

Currently, Azpype only accepts authenticating via Application Service Principal set via the following Azcopy environment variables:

  • AZCOPY_TENANT_ID
  • AZCOPY_SPA_APPLICATION_ID
  • AZCOPY_SPA_CLIENT_SECRET
  • AZCOPY_AUTO_LOGIN_TYPE

These can be injected/overriden at runtime into the python process via

import os
os.environ["AZCOPY_TENANT_ID"] = <TenantID>
# ...

Please follow good practices when handling these environment variables and client credentials.

Going forward Azpype aims to use a default precedence order for authentication, starting with MSI, then SPA, then SAS. Ideally using, or following the pattern of DefaultAzureCredential().


🚧 In-Development: FS Monitor

I'd love to get some feedback on this feature but my thought is for azpype to be as simple as possible I may create an 'agent' mode for it which takes advantage of the watchdog package. Agent mode will allow Azpype to be deployed as a long-running background process, triggering actions based on file system events. For instance, poll every 5 minutes and run Copy() when a new file is detected. Then user code can do the appropriate stage clearing/archiving etc.

🚧 Status: Not yet in development


🧪 Benchmark Grid Search

Currently, Azcopy provides a useful benchmarking utility which helps determine optimal concurrency for a given network, machine (assuming default settings of auto tuning to cores), number of files and size per file.

The Benchmark grid search feature - will leverage this and create small grid search through various combinations of file count and file size, outputting plots/data to reflect the expected range of performance for Azcopy in that execution environment.

🚧 Status: Not yet in development

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

azpype-0.2-py2.py3-none-win_amd64.whl (35.9 kB view details)

Uploaded Python 2Python 3Windows x86-64

azpype-0.2-py2.py3-none-win32.whl (35.9 kB view details)

Uploaded Python 2Python 3Windows x86

azpype-0.2-py2.py3-none-macosx_11_0_arm64.whl (35.2 kB view details)

Uploaded Python 2Python 3macOS 11.0+ ARM64

azpype-0.2-py2.py3-none-macosx_10_9_x86_64.whl (35.2 kB view details)

Uploaded Python 2Python 3macOS 10.9+ x86-64

File details

Details for the file azpype-0.2-py2.py3-none-win_amd64.whl.

File metadata

  • Download URL: azpype-0.2-py2.py3-none-win_amd64.whl
  • Upload date:
  • Size: 35.9 kB
  • Tags: Python 2, Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.16

File hashes

Hashes for azpype-0.2-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 624e5d339ca81bba7723895c4dbdeaf55ded6bb40fa2a23caf6e3df447691c0b
MD5 3d546bc70222d8968ef608db01b63dae
BLAKE2b-256 59a27d2d74df129cb1ea16a9023a3444690fd85bc97c085a1534af37ad1539a1

See more details on using hashes here.

File details

Details for the file azpype-0.2-py2.py3-none-win32.whl.

File metadata

  • Download URL: azpype-0.2-py2.py3-none-win32.whl
  • Upload date:
  • Size: 35.9 kB
  • Tags: Python 2, Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.16

File hashes

Hashes for azpype-0.2-py2.py3-none-win32.whl
Algorithm Hash digest
SHA256 78963d02181d84ea69786a0caa840226fcf4a35141b877f3d7f77f7503a8778d
MD5 e30aaf6951c9fbee2cc3542fcb45154e
BLAKE2b-256 06e6e4a45ba28714d271612e9b8538294d85ad7702bedce7015b18e01972caaa

See more details on using hashes here.

File details

Details for the file azpype-0.2-py2.py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for azpype-0.2-py2.py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fd3fb6fd5ae12422bcc96263694d433aee08586d50c2da5c3c14c29ae03b7303
MD5 fb5bf1c7ca14139d1c6efb2df2feb360
BLAKE2b-256 5ee80574951e33305a394d56bbb1340199067647599f10c5874309e860f36ff3

See more details on using hashes here.

File details

Details for the file azpype-0.2-py2.py3-none-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for azpype-0.2-py2.py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f5ad69f7640febbbcde3511b306a5b5f4cddbc401c2688493ee82ec17fbae755
MD5 6a355bd4c8f3837838c030fcca0d323d
BLAKE2b-256 c72d7172771ae203ba8280041eebb6e4b34535267004635a39a79d9dd9c3d1c0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page