Skip to content

Commit

Permalink
Modernize azure-storage-blob (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
byjott authored and fmarczin committed Mar 9, 2018
1 parent 2716c43 commit 5dfaa2f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions docs/azure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Microsoft Azure Blob Storage

Simplekv supports storing data in `Microsoft Azure Block Blob Storage <https://azure.microsoft.com/en-us/services/storage/blobs/>`_.

The backend uses the `azure-storage <https://github.com/Azure/azure-storage-python>`_ python module to access the azure blob storage.
Note that azure-storage is not a dependency for simplekv. You need to install it
manually, otherwise you will see an :exc:`~exceptions.ImportError`.
The backend uses the `azure-storage-blob <https://github.com/Azure/azure-storage-python/tree/master/azure-storage-blob>`_
python distribution to access the azure blob storage. Note that `azure-storage-blob` is not
a dependency for simplekv. You need to install it manually, otherwise you will see an :exc:`~exceptions.ImportError`.

Here is a short example:

Expand Down
6 changes: 3 additions & 3 deletions tests/test_azure_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from conftest import ExtendedKeyspaceTests
import pytest

pytest.importorskip('azure.storage')
pytest.importorskip('azure.storage.blob')


def load_azure_credentials():
Expand Down Expand Up @@ -93,7 +93,7 @@ def test_missing_container(self):
assert u"The specified container does not exist." in str(exc.value)

def test_wrong_endpoint(self):
from azure.storage.retry import ExponentialRetry
from azure.storage.common.retry import ExponentialRetry
container = uuid()
conn_string = create_azure_conn_string(load_azure_credentials())
conn_string += \
Expand All @@ -108,7 +108,7 @@ def test_wrong_endpoint(self):
assert u"Failed to establish a new connection" in str(exc.value)

def test_wrong_credentials(self):
from azure.storage.retry import ExponentialRetry
from azure.storage.common.retry import ExponentialRetry
container = uuid()
conn_string = \
'DefaultEndpointsProtocol=https;AccountName={};AccountKey={}'.\
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ deps=
pymongo
dulwich
boto
azure-storage
azure-storage-blob
futures
# ideally we would not need futures here but it doesn't work otherwise
commands=py.test -n 4 --dist=loadfile --cov=simplekv -rs --pep8 --doctest-modules simplekv/idgen.py simplekv/fs.py tests

0 comments on commit 5dfaa2f

Please sign in to comment.