|
1 | 1 | # Extension package for Azure Storage Python libraries |
2 | | -This package contains a set of C-Extension modules intended to be used with the other Azure Storage Python SDK libraries. |
3 | 2 |
|
4 | | -## Getting started |
| 3 | +**This package provides optional native extensions for Azure Storage Python SDK libraries and is not intended for direct use.** |
5 | 4 |
|
6 | | -### Prerequisites |
7 | | -* Python 3.9 or later is required to use this package. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/python_version_support_policy.md). |
| 5 | +This package contains native extension modules that provide performance-critical functionality for Azure Storage Python SDK libraries. It is designed exclusively for use with Azure Storage SDKs and must be explicitly installed to enable enhanced performance features. |
| 6 | + |
| 7 | +## Important Notes |
| 8 | + |
| 9 | +⚠️ **Not for standalone use**: This package is designed exclusively as an optional dependency for Azure Storage Python SDK libraries. The API surface is subject to change without following semantic versioning conventions—breaking changes may occur between minor versions. |
| 10 | + |
| 11 | +⚠️ **Implementation may change**: While this package currently uses C extensions, future versions may migrate to Rust extensions or other native implementations, which would require different build toolchains. |
| 12 | + |
| 13 | +## Installation |
| 14 | + |
| 15 | +**Recommended**: Install this package via extras when installing Azure Storage libraries: |
8 | 16 |
|
9 | | -### Install the package |
10 | | -This package is not meant to be used standalone and is meant to accompany other Azure Storage Python SDK libraries. However it can be installed and used standalone as well. |
| 17 | +```bash |
| 18 | +pip install azure-storage-blob[extensions] |
| 19 | +``` |
11 | 20 |
|
12 | | -Install the Azure Storage Extensions library for Python with [pip](https://pypi.org/project/pip/): |
| 21 | +This ensures you get compatible versions of both the SDK and the extensions package. |
| 22 | + |
| 23 | +You can also install it directly if needed: |
13 | 24 |
|
14 | 25 | ```bash |
15 | 26 | pip install azure-storage-extensions |
16 | 27 | ``` |
17 | 28 |
|
18 | | -Please note that this package contains [C-Extension modules](https://docs.python.org/3/extending/extending.html) and therefore you must install the correct wheel for your |
19 | | -particular platform. We distribute many pre-built wheels for a wide variety of platforms on PyPi and `pip` will attempt to install the wheel meant for your platform. If |
20 | | -however, a wheel is not available for your platform, we also distribute the source code on PyPi so `pip` will attempt to build the module at install time, assuming you have |
21 | | -a compiler available. If you encounter any issues installing this package, please feel to open an Issue. |
| 29 | +### Prerequisites |
| 30 | +* Python 3.9 or later is required to use this package. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/python_version_support_policy.md). |
22 | 31 |
|
23 | | -## Extensions |
24 | | -This section contains the list of available extensions and how to use them. |
| 32 | +### Troubleshooting Installation Issues |
25 | 33 |
|
26 | | -### Storage CRC64 |
27 | | -The `crc64` extension provides an implementation of the CRC64 algorithm, including the custom polynomial, that is used by the Azure Storage service. It can be used to compute |
28 | | -the crc64 hash of `bytes` data, including given an initial hash. |
| 34 | +This package contains native extension modules and requires platform-specific compiled binaries. We distribute pre-built wheels for common platforms (Windows, macOS, Linux) on PyPI, which `pip` will automatically install when available. |
29 | 35 |
|
30 | | -```py |
31 | | -from azure.storage.extensions import crc64 |
| 36 | +If a pre-built wheel is not available for your platform, `pip` will attempt to build the extensions from source. This requires: |
| 37 | +- A C compiler (e.g., gcc, clang, MSVC) |
| 38 | +- Python development headers |
32 | 39 |
|
33 | | -data = b'Hello World!' |
34 | | -result = crc64.compute_crc64(data, 0) |
| 40 | +**Common installation errors:** |
35 | 41 |
|
36 | | -# Chain together calculations |
37 | | -data2 = b'Goodbye World!` |
38 | | -result2 = crc64.compute_crc64(data2, result) |
39 | | -``` |
| 42 | +- **"error: Microsoft Visual C++ 14.0 or greater is required"** (Windows): Install [Microsoft C++ Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/) |
| 43 | +- **"error: command 'gcc' failed"** (Linux): Install build essentials: `sudo apt-get install build-essential python3-dev` (Debian/Ubuntu) or equivalent for your distribution |
| 44 | +- **"error: command 'clang' failed"** (macOS): Install Xcode Command Line Tools: `xcode-select --install` |
| 45 | + |
| 46 | +If you encounter installation issues, please open an issue in the [Azure SDK for Python repository](https://github.com/Azure/azure-sdk-for-python/issues). |
40 | 47 |
|
41 | 48 | ## Contributing |
42 | 49 | This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. |
|
0 commit comments