Skip to content

Commit 97dd9d7

Browse files
authored
Merge pull request #360 from zezha-msft/sync-readme
Sync readme files for each package
2 parents e847283 + 1b42214 commit 97dd9d7

File tree

4 files changed

+273
-101
lines changed

4 files changed

+273
-101
lines changed

azure-storage-blob/README.rst

Lines changed: 69 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,22 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first then ins
2929
pip uninstall azure
3030
pip install azure
3131
32-
If you are upgrading from a version older than 0.30.0, see the upgrade doc, the
32+
If you are upgrading from a version older than 0.30.0, see the upgrade doc, the
3333
usage samples in the samples directory, and the ChangeLog and BreakingChanges.
3434

35+
If you are encountering `problems`_ installing azure storage on Azure Web Apps,
36+
`upgrading pip`_ might help.
37+
3538
**IMPORTANT**: If you have an earlier version of the azure-storage package
36-
(version <= 0.36.0), you should uninstall it before installing the new packages.
39+
(version <= 0.36.0), you should uninstall it before installing the new split packages.
3740

3841
You can check the version using pip:
3942

4043
.. code:: shell
4144
4245
pip freeze
4346
44-
If you see azure-storage==0.35.1 (or any version below 0.35.1), uninstall it first:
47+
If you see azure-storage==0.36.0 (or any version below 0.36.0), uninstall it first:
4548

4649
.. code:: shell
4750
@@ -62,13 +65,6 @@ Features
6265
- Insert/Peek Queue Messages
6366
- Advanced Queue Operations
6467

65-
- Table
66-
67-
- Create/Read/Update/Delete Tables
68-
- Create/Read/Update/Delete Entities
69-
- Batch operations
70-
- Advanced Table Operations
71-
7268
- Files
7369

7470
- Create/Update/Delete Shares
@@ -82,13 +78,31 @@ Getting Started
8278
Download
8379
--------
8480

85-
The Azure Storage SDK for Python is composed of 4 packages, each corresponding to a different service:
81+
The Azure Storage SDK for Python is composed of 5 packages:
82+
8683
- azure-storage-blob
84+
85+
- Contains the blob service APIs.
86+
8787
- azure-storage-file
88+
89+
- Contains the file service APIs.
90+
8891
- azure-storage-queue
89-
- azure-storage-table
9092

91-
Note: prior to version 0.36.0, there used to be a single package (azure-storage) containing all services
93+
- Contains the queue service APIs.
94+
95+
- azure-storage-common
96+
97+
- Contains common code shared by blob, file and queue.
98+
99+
- azure-storage-nspkg
100+
101+
- Owns the azure.storage namespace, user should not use this directly.
102+
103+
**Note**: prior to and including version 0.36.0, there used to be a single package (azure-storage) containing all services.
104+
It is no longer supported, and users should install the 3 before-mentioned service packages individually, depending on the need.
105+
In addition, the **table** package is no longer releasing under the azure-storage namespace, please refer to `cosmosdb`_.
92106

93107
Option 1: Via PyPi
94108
~~~~~~~~~~~~~~~~~~
@@ -99,7 +113,6 @@ To install via the Python Package Index (PyPI), type:
99113
pip install azure-storage-blob
100114
pip install azure-storage-file
101115
pip install azure-storage-queue
102-
pip install azure-storage-table
103116

104117
Option 2: Source Via Git
105118
~~~~~~~~~~~~~~~~~~~~~~~~
@@ -109,24 +122,23 @@ To get the source code of the SDK via git just type:
109122
::
110123

111124
git clone git://github.com/Azure/azure-storage-python.git
112-
cd ./azure-storage-python/azure-storage-blob
113-
python setup.py install
114-
115125

116-
Replace azure-storage-blob with azure-storage-file, azure-storage-queue, or azure-storage-table to install the other services.
126+
cd ./azure-storage-python/azure-storage-nspkg
127+
python setup.py install
117128

118-
Option 3: Source Zip
119-
~~~~~~~~~~~~~~~~~~~~
129+
cd ../azure-storage-common
130+
python setup.py install
120131

121-
Download a zip of the code via GitHub or PyPi. Then, type:
132+
cd ../azure-storage-blob
133+
python setup.py install
122134

123-
::
124135

125-
cd ./azure-storage-python/azure-storage-blob
126-
python setup.py install
136+
Replace azure-storage-blob with azure-storage-file or azure-storage-queue, to install the other services.
127137

138+
Option 3: Source Zip
139+
~~~~~~~~~~~~~~~~~~~~
128140

129-
Replace azure-storage-blob with azure-storage-file, azure-storage-queue, or azure-storage-table to install the other services.
141+
Download a zip of the code via GitHub or PyPi. Then follow the same instructions in option 2.
130142

131143
Minimum Requirements
132144
--------------------
@@ -140,10 +152,38 @@ Usage
140152
To use this SDK to call Microsoft Azure storage services, you need to
141153
first `create an account`_.
142154

155+
Logging
156+
-----------
157+
158+
To make debugging easier, it is recommended to turn on logging for the logger named 'azure.storage'.
159+
Here are two example configurations:
160+
161+
.. code:: python
162+
163+
# Basic configuration: configure the root logger, including 'azure.storage'
164+
logging.basicConfig(format='%(asctime)s %(name)-20s %(levelname)-5s %(message)s', level=logging.INFO)
165+
166+
.. code:: python
167+
168+
# More advanced configuration allowing more control
169+
logger = logging.getLogger('azure.storage')
170+
handler = logging.StreamHandler()
171+
formatter = logging.Formatter('%(asctime)s %(name)-20s %(levelname)-5s %(message)s')
172+
handler.setFormatter(formatter)
173+
logger.addHandler(handler)
174+
logger.setLevel(logging.INFO)
175+
176+
Here is how we use the logging levels, it is recommended to use INFO:
177+
178+
- DEBUG: log strings to sign
179+
- INFO: log outgoing requests and responses, as well as retry attempts
180+
- WARNING: not used
181+
- ERROR: log calls that still failed after all the retries
182+
143183
Code Sample
144184
-----------
145185

146-
See the samples directory for blob, queue, table, and file usage samples.
186+
See the samples directory for blob, queue, and file usage samples.
147187

148188
Need Help?
149189
==========
@@ -181,3 +221,6 @@ Learn More
181221
.. _Azure Storage Service: http://azure.microsoft.com/en-us/documentation/services/storage/
182222
.. _Azure Storage Team Blog: http://blogs.msdn.com/b/windowsazurestorage/
183223
.. _CONTRIBUTING.md doc: CONTRIBUTING.md
224+
.. _problems: https://github.com/Azure/azure-storage-python/issues/219
225+
.. _upgrading pip: https://docs.microsoft.com/en-us/visualstudio/python/managing-python-on-azure-app-service
226+
.. _cosmosdb: https://github.com/Azure/azure-cosmosdb-python

azure-storage-common/README.rst

Lines changed: 68 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,19 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first then ins
3232
If you are upgrading from a version older than 0.30.0, see the upgrade doc, the
3333
usage samples in the samples directory, and the ChangeLog and BreakingChanges.
3434

35+
If you are encountering `problems`_ installing azure storage on Azure Web Apps,
36+
`upgrading pip`_ might help.
37+
3538
**IMPORTANT**: If you have an earlier version of the azure-storage package
36-
(version <= 0.36.0), you should uninstall it before installing the new packages.
39+
(version <= 0.36.0), you should uninstall it before installing the new split packages.
3740

3841
You can check the version using pip:
3942

4043
.. code:: shell
4144
4245
pip freeze
4346
44-
If you see azure-storage==0.35.1 (or any version below 0.35.1), uninstall it first:
47+
If you see azure-storage==0.36.0 (or any version below 0.36.0), uninstall it first:
4548

4649
.. code:: shell
4750
@@ -62,13 +65,6 @@ Features
6265
- Insert/Peek Queue Messages
6366
- Advanced Queue Operations
6467

65-
- Table
66-
67-
- Create/Read/Update/Delete Tables
68-
- Create/Read/Update/Delete Entities
69-
- Batch operations
70-
- Advanced Table Operations
71-
7268
- Files
7369

7470
- Create/Update/Delete Shares
@@ -82,13 +78,31 @@ Getting Started
8278
Download
8379
--------
8480

85-
The Azure Storage SDK for Python is composed of 4 packages, each corresponding to a different service:
81+
The Azure Storage SDK for Python is composed of 5 packages:
82+
8683
- azure-storage-blob
84+
85+
- Contains the blob service APIs.
86+
8787
- azure-storage-file
88+
89+
- Contains the file service APIs.
90+
8891
- azure-storage-queue
89-
- azure-storage-table
9092

91-
Note: prior to version 0.36.0, there used to be a single package (azure-storage) containing all services
93+
- Contains the queue service APIs.
94+
95+
- azure-storage-common
96+
97+
- Contains common code shared by blob, file and queue.
98+
99+
- azure-storage-nspkg
100+
101+
- Owns the azure.storage namespace, user should not use this directly.
102+
103+
**Note**: prior to and including version 0.36.0, there used to be a single package (azure-storage) containing all services.
104+
It is no longer supported, and users should install the 3 before-mentioned service packages individually, depending on the need.
105+
In addition, the **table** package is no longer releasing under the azure-storage namespace, please refer to `cosmosdb`_.
92106

93107
Option 1: Via PyPi
94108
~~~~~~~~~~~~~~~~~~
@@ -99,7 +113,6 @@ To install via the Python Package Index (PyPI), type:
99113
pip install azure-storage-blob
100114
pip install azure-storage-file
101115
pip install azure-storage-queue
102-
pip install azure-storage-table
103116

104117
Option 2: Source Via Git
105118
~~~~~~~~~~~~~~~~~~~~~~~~
@@ -109,24 +122,23 @@ To get the source code of the SDK via git just type:
109122
::
110123

111124
git clone git://github.com/Azure/azure-storage-python.git
112-
cd ./azure-storage-python/azure-storage-blob
113-
python setup.py install
114-
115125

116-
Replace azure-storage-blob with azure-storage-file, azure-storage-queue, or azure-storage-table to install the other services.
126+
cd ./azure-storage-python/azure-storage-nspkg
127+
python setup.py install
117128

118-
Option 3: Source Zip
119-
~~~~~~~~~~~~~~~~~~~~
129+
cd ../azure-storage-common
130+
python setup.py install
120131

121-
Download a zip of the code via GitHub or PyPi. Then, type:
132+
cd ../azure-storage-blob
133+
python setup.py install
122134

123-
::
124135

125-
cd ./azure-storage-python/azure-storage-blob
126-
python setup.py install
136+
Replace azure-storage-blob with azure-storage-file or azure-storage-queue, to install the other services.
127137

138+
Option 3: Source Zip
139+
~~~~~~~~~~~~~~~~~~~~
128140

129-
Replace azure-storage-blob with azure-storage-file, azure-storage-queue, or azure-storage-table to install the other services.
141+
Download a zip of the code via GitHub or PyPi. Then follow the same instructions in option 2.
130142

131143
Minimum Requirements
132144
--------------------
@@ -140,10 +152,38 @@ Usage
140152
To use this SDK to call Microsoft Azure storage services, you need to
141153
first `create an account`_.
142154

155+
Logging
156+
-----------
157+
158+
To make debugging easier, it is recommended to turn on logging for the logger named 'azure.storage'.
159+
Here are two example configurations:
160+
161+
.. code:: python
162+
163+
# Basic configuration: configure the root logger, including 'azure.storage'
164+
logging.basicConfig(format='%(asctime)s %(name)-20s %(levelname)-5s %(message)s', level=logging.INFO)
165+
166+
.. code:: python
167+
168+
# More advanced configuration allowing more control
169+
logger = logging.getLogger('azure.storage')
170+
handler = logging.StreamHandler()
171+
formatter = logging.Formatter('%(asctime)s %(name)-20s %(levelname)-5s %(message)s')
172+
handler.setFormatter(formatter)
173+
logger.addHandler(handler)
174+
logger.setLevel(logging.INFO)
175+
176+
Here is how we use the logging levels, it is recommended to use INFO:
177+
178+
- DEBUG: log strings to sign
179+
- INFO: log outgoing requests and responses, as well as retry attempts
180+
- WARNING: not used
181+
- ERROR: log calls that still failed after all the retries
182+
143183
Code Sample
144184
-----------
145185

146-
See the samples directory for blob, queue, table, and file usage samples.
186+
See the samples directory for blob, queue, and file usage samples.
147187

148188
Need Help?
149189
==========
@@ -181,3 +221,6 @@ Learn More
181221
.. _Azure Storage Service: http://azure.microsoft.com/en-us/documentation/services/storage/
182222
.. _Azure Storage Team Blog: http://blogs.msdn.com/b/windowsazurestorage/
183223
.. _CONTRIBUTING.md doc: CONTRIBUTING.md
224+
.. _problems: https://github.com/Azure/azure-storage-python/issues/219
225+
.. _upgrading pip: https://docs.microsoft.com/en-us/visualstudio/python/managing-python-on-azure-app-service
226+
.. _cosmosdb: https://github.com/Azure/azure-cosmosdb-python

0 commit comments

Comments
 (0)