├── .gitignore ├── BreakingChanges.md ├── CONTRIBUTING.md ├── ChangeLog.md ├── LICENSE.txt ├── README.rst ├── azure-cosmosdb-nspkg ├── MANIFEST.in ├── README.rst ├── azure │ └── cosmosdb │ │ └── __init__.py ├── setup.cfg └── setup.py ├── azure-cosmosdb-python.pyproj ├── azure-cosmosdb-table ├── BreakingChanges.md ├── ChangeLog.md ├── MANIFEST.in ├── README.rst ├── azure │ ├── __init__.py │ └── cosmosdb │ │ ├── __init__.py │ │ └── table │ │ ├── __init__.py │ │ ├── _auth.py │ │ ├── _connection.py │ │ ├── _constants.py │ │ ├── _deserialization.py │ │ ├── _encryption.py │ │ ├── _error.py │ │ ├── _request.py │ │ ├── _serialization.py │ │ ├── common │ │ ├── __init__.py │ │ ├── _auth.py │ │ ├── _common_conversion.py │ │ ├── _connection.py │ │ ├── _constants.py │ │ ├── _deserialization.py │ │ ├── _encryption.py │ │ ├── _error.py │ │ ├── _http │ │ │ ├── __init__.py │ │ │ └── httpclient.py │ │ ├── _serialization.py │ │ ├── cloudstorageaccount.py │ │ ├── models.py │ │ ├── retry.py │ │ ├── sharedaccesssignature.py │ │ ├── storageclient.py │ │ └── tokencredential.py │ │ ├── models.py │ │ ├── sharedaccesssignature.py │ │ ├── tablebatch.py │ │ └── tableservice.py ├── azure_bdist_wheel.py ├── doc │ ├── BuildDocs.bat │ ├── InstallDocDependencies.bat │ ├── Makefile │ ├── __init__.py │ ├── conf.py │ ├── index.rst │ ├── make.bat │ ├── ref │ │ ├── azure.cosmosdb.rst │ │ ├── azure.cosmosdb.table.models.rst │ │ ├── azure.cosmosdb.table.rst │ │ ├── azure.cosmosdb.table.sharedaccesssignature.rst │ │ ├── azure.cosmosdb.table.tablebatch.rst │ │ ├── azure.cosmosdb.table.tableservice.rst │ │ ├── azure.rst │ │ └── modules.rst │ ├── requirements.txt │ └── upgrade.rst ├── samples │ ├── __init__.py │ ├── advanced │ │ ├── __init__.py │ │ ├── authentication.py │ │ └── client.py │ ├── config.py │ ├── table │ │ ├── __init__.py │ │ ├── encryption_usage.py │ │ ├── sas_usage.py │ │ └── table_usage.py │ └── test_sample.py ├── setup.cfg ├── setup.py └── tests │ ├── __init__.py │ ├── encryption_test_helper.py │ ├── recordings │ ├── test_table.test_create_table.yaml │ ├── test_table.test_create_table_fail_on_exist.yaml │ ├── test_table.test_create_table_with_already_existing_table.yaml │ ├── test_table.test_create_table_with_already_existing_table_fail_on_exist.yaml │ ├── test_table.test_delete_table_with_existing_table.yaml │ ├── test_table.test_delete_table_with_existing_table_fail_not_exist.yaml │ ├── test_table.test_delete_table_with_non_existing_table.yaml │ ├── test_table.test_delete_table_with_non_existing_table_fail_not_exist.yaml │ ├── test_table.test_get_table_acl.yaml │ ├── test_table.test_list_tables.yaml │ ├── test_table.test_list_tables_with_marker.yaml │ ├── test_table.test_list_tables_with_num_results.yaml │ ├── test_table.test_locale.yaml │ ├── test_table.test_set_table_acl.yaml │ ├── test_table.test_set_table_acl_too_many_ids.yaml │ ├── test_table.test_set_table_acl_with_empty_signed_identifier.yaml │ ├── test_table.test_set_table_acl_with_empty_signed_identifiers.yaml │ ├── test_table.test_set_table_acl_with_signed_identifiers.yaml │ ├── test_table.test_table_exists.yaml │ ├── test_table.test_table_not_exists.yaml │ ├── test_table.test_unicode_create_table_unicode_name.yaml │ ├── test_table_batch.test_batch_all_operations_together.yaml │ ├── test_table_batch.test_batch_all_operations_together_context_manager.yaml │ ├── test_table_batch.test_batch_delete.yaml │ ├── test_table_batch.test_batch_different_partition_operations_fail.yaml │ ├── test_table_batch.test_batch_insert.yaml │ ├── test_table_batch.test_batch_insert_merge.yaml │ ├── test_table_batch.test_batch_insert_replace.yaml │ ├── test_table_batch.test_batch_inserts.yaml │ ├── test_table_batch.test_batch_merge.yaml │ ├── test_table_batch.test_batch_reuse.yaml │ ├── test_table_batch.test_batch_same_row_operations_fail.yaml │ ├── test_table_batch.test_batch_too_many_ops.yaml │ ├── test_table_batch.test_batch_update.yaml │ ├── test_table_batch.test_batch_update_if_doesnt_match.yaml │ ├── test_table_batch.test_batch_update_if_match.yaml │ ├── test_table_encryption.test_batch_entity_inserts_context_manager.yaml │ ├── test_table_encryption.test_get_encrypt_multiple_properties.yaml │ ├── test_table_encryption.test_get_encrypted_dict.yaml │ ├── test_table_encryption.test_get_encrypted_entity.yaml │ ├── test_table_encryption.test_get_encrypted_entity_encryption_resolver.yaml │ ├── test_table_encryption.test_get_encrypted_entity_key_resolver.yaml │ ├── test_table_encryption.test_get_encrypted_entity_properties_and_resolver.yaml │ ├── test_table_encryption.test_get_entity_invalid_value_kek_unwrap.yaml │ ├── test_table_encryption.test_get_entity_missing_attribute_kek_unwrap.yaml │ ├── test_table_encryption.test_get_entity_no_decryption.yaml │ ├── test_table_encryption.test_get_entity_nonmatching_kid.yaml │ ├── test_table_encryption.test_get_payload_formats.yaml │ ├── test_table_encryption.test_get_strict_mode_no_key.yaml │ ├── test_table_encryption.test_get_strict_mode_unencrypted_entity.yaml │ ├── test_table_encryption.test_invalid_encryption_operations_fail.yaml │ ├── test_table_encryption.test_invalid_encryption_operations_fail_batch.yaml │ ├── test_table_encryption.test_property_resolver_decrypt_conflict.yaml │ ├── test_table_encryption.test_query_entities_all_properties.yaml │ ├── test_table_encryption.test_query_entities_mixed_mode.yaml │ ├── test_table_encryption.test_query_entities_projection.yaml │ ├── test_table_encryption.test_replace_entity.yaml │ ├── test_table_encryption.test_strict_mode_policy_no_encrypted_properties.yaml │ ├── test_table_encryption.test_table_ops_ignore_encryption.yaml │ ├── test_table_encryption.test_validate_encryption.yaml │ ├── test_table_encryption.test_validate_swapping_properties_fails.yaml │ ├── test_table_entity.test_binary_property_value.yaml │ ├── test_table_entity.test_delete_entity.yaml │ ├── test_table_entity.test_delete_entity_not_existing.yaml │ ├── test_table_entity.test_delete_entity_with_if_doesnt_match.yaml │ ├── test_table_entity.test_delete_entity_with_if_matches.yaml │ ├── test_table_entity.test_empty_and_spaces_property_value.yaml │ ├── test_table_entity.test_get_entity.yaml │ ├── test_table_entity.test_get_entity_full_metadata.yaml │ ├── test_table_entity.test_get_entity_if_match.yaml │ ├── test_table_entity.test_get_entity_no_metadata.yaml │ ├── test_table_entity.test_get_entity_not_existing.yaml │ ├── test_table_entity.test_get_entity_with_property_resolver.yaml │ ├── test_table_entity.test_get_entity_with_property_resolver_invalid.yaml │ ├── test_table_entity.test_get_entity_with_property_resolver_not_supported.yaml │ ├── test_table_entity.test_get_entity_with_select.yaml │ ├── test_table_entity.test_get_entity_with_special_doubles.yaml │ ├── test_table_entity.test_insert_entity_class_instance.yaml │ ├── test_table_entity.test_insert_entity_conflict.yaml │ ├── test_table_entity.test_insert_entity_dictionary.yaml │ ├── test_table_entity.test_insert_entity_empty_string_pk.yaml │ ├── test_table_entity.test_insert_entity_empty_string_rk.yaml │ ├── test_table_entity.test_insert_or_merge_entity_with_existing_entity.yaml │ ├── test_table_entity.test_insert_or_merge_entity_with_non_existing_entity.yaml │ ├── test_table_entity.test_insert_or_replace_entity_with_existing_entity.yaml │ ├── test_table_entity.test_insert_or_replace_entity_with_non_existing_entity.yaml │ ├── test_table_entity.test_merge_entity.yaml │ ├── test_table_entity.test_merge_entity_not_existing.yaml │ ├── test_table_entity.test_merge_entity_with_if_doesnt_match.yaml │ ├── test_table_entity.test_merge_entity_with_if_matches.yaml │ ├── test_table_entity.test_none_property_value.yaml │ ├── test_table_entity.test_operations_on_entity_with_partition_key_having_single_quote.yaml │ ├── test_table_entity.test_query_entities.yaml │ ├── test_table_entity.test_query_entities_full_metadata.yaml │ ├── test_table_entity.test_query_entities_large.yaml │ ├── test_table_entity.test_query_entities_no_metadata.yaml │ ├── test_table_entity.test_query_entities_with_filter.yaml │ ├── test_table_entity.test_query_entities_with_property_resolver.yaml │ ├── test_table_entity.test_query_entities_with_select.yaml │ ├── test_table_entity.test_query_entities_with_top.yaml │ ├── test_table_entity.test_query_entities_with_top_and_next.yaml │ ├── test_table_entity.test_query_zero_entities.yaml │ ├── test_table_entity.test_timezone.yaml │ ├── test_table_entity.test_unicode_property_name.yaml │ ├── test_table_entity.test_unicode_property_value.yaml │ ├── test_table_entity.test_update_entity.yaml │ ├── test_table_entity.test_update_entity_with_if_doesnt_match.yaml │ └── test_table_entity.test_update_entity_with_if_matches.yaml │ ├── run-storage.bat │ ├── settings_fake.py │ ├── table │ ├── __init__.py │ ├── test_table.py │ ├── test_table_batch.py │ ├── test_table_encryption.py │ └── test_table_entity.py │ └── testcase.py ├── build_packages.py └── requirements.txt /.gitignore: -------------------------------------------------------------------------------- 1 | # Python cache 2 | __pycache__/ 3 | *.pyc 4 | 5 | # Virtual environment 6 | env/ 7 | 8 | # PTVS analysis 9 | .ptvs/ 10 | 11 | # Build results 12 | bin/ 13 | obj/ 14 | dist/ 15 | MANIFEST 16 | 17 | # Result of running python setup.py install/pip install -e 18 | RECORD.txt 19 | build/ 20 | *.egg-info/ 21 | 22 | # Test results 23 | TestResults/ 24 | 25 | # Credentials 26 | testsettings_local.json 27 | settings_real.py 28 | 29 | # User-specific files 30 | *.suo 31 | *.user 32 | *.sln.docstates 33 | .vs/ 34 | 35 | # Windows image file caches 36 | Thumbs.db 37 | ehthumbs.db 38 | 39 | # Folder config file 40 | Desktop.ini 41 | 42 | # Recycle Bin used on file shares 43 | $RECYCLE.BIN/ 44 | 45 | # Mac desktop service store files 46 | .DS_Store 47 | 48 | .idea 49 | src/build 50 | *.iml 51 | /doc/_build 52 | /.vs/config/applicationhost.config 53 | 54 | # Azure deployment credentials 55 | *.pubxml 56 | 57 | # code coverage 58 | .coverage 59 | .cache/ 60 | -------------------------------------------------------------------------------- /BreakingChanges.md: -------------------------------------------------------------------------------- 1 | # Breaking Changes 2 | 3 | > See the [Change Log](ChangeLog.md) for a summary of storage library changes. 4 | 5 | ## Version 0.37.1: 6 | 7 | ### All: 8 | - The Tables SDK has been split from azure-storage namespace and moved to the azure-cosmosdb namespace 9 | - It can be referenced as 'azure-cosmosdb-table' 10 | - Namespace package azure-cosmosdb-nspkg added to the cosmosdb namespace 11 | - The other former azure-storage SDK components (blob, queue and file) can be referenced as azure-storage-blob, 12 | azure-storage-queue and azure-storage-file 13 | - The files formerly found under azure.storage can now be found under azure.cosmosdb.common in the azure-cosmosdb-table package 14 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | If you intend to contribute to the project, please make sure you've followed the instructions provided in the [Azure Projects Contribution Guidelines](http://azure.github.io/guidelines/). 2 | ## Project Setup 3 | The Azure Storage development team uses Visual Studio so instructions will be tailored to that preference. However, any preferred IDE or other toolset should be usable. 4 | 5 | ### Install 6 | * Python 2.7, 3.3, 3.4, or 3.5 7 | * Visual Studio 2013 or 2015. 8 | * [Python Tools for Visual Studio](https://www.visualstudio.com/en-us/features/python-vs.aspx) 9 | * Clone the source code from GitHub and then run "python setup.py install" from the azure-storage-python folder. 10 | 11 | ### Open Solution 12 | Open the project from VS using File->Open->Project/Solution and navigating to the azure-storage-python.sln solution file in the repo base folder. 13 | 14 | ## Tests 15 | 16 | ### Configuration 17 | The only step to configure testing is to add a settings_real.py file to the Test folder. You should insert your storage account information into the file using [this](Test/settings_fake.py) as a template. 18 | 19 | ### Running 20 | To actually run tests, right click the individual test or test class in the Test Explorer panel. 21 | 22 | ### Testing Features 23 | As you develop a feature, you'll need to write tests to ensure quality. You should also run existing tests related to your change to address any unexpected breaks. 24 | 25 | ## Pull Requests 26 | 27 | ### Guidelines 28 | The following are the minimum requirements for any pull request that must be met before contributions can be accepted. 29 | * Make sure you've signed the CLA before you start working on any change. 30 | * Discuss any proposed contribution with the team via a GitHub issue **before** starting development. 31 | * Code must be professional quality 32 | * No style issues 33 | * You should strive to mimic the style with which we have written the library 34 | * Clean, well-commented, well-designed code 35 | * Try to limit the number of commits for a feature to 1-2. If you end up having too many we may ask you to squash your changes into fewer commits. 36 | * [ChangeLog.md](ChangeLog.md) needs to be updated describing the new change 37 | * Thoroughly test your feature 38 | 39 | ### Branching Policy 40 | Changes should be based on the **dev** branch, not master as master is considered publicly released code. Each breaking change should be recorded in [BreakingChanges.md](BreakingChanges.md). 41 | 42 | ### Adding Features for All Platforms 43 | We strive to release each new feature for each of our environments at the same time. Therefore, we ask that all contributions be written for both Python 2.7 and 3.3+ (you can validate 3.3, 3.4, and 3.5 with just one of the versions since they are so similar). We recommend writing in Python 3.x first, and then back porting to 2.7. This is much easier than the other direction. 44 | 45 | ### Review Process 46 | We expect all guidelines to be met before accepting a pull request. As such, we will work with you to address issues we find by leaving comments in your code. Please understand that it may take a few iterations before the code is accepted as we maintain high standards on code quality. Once we feel comfortable with a contribution, we will validate the change and accept the pull request. 47 | 48 | 49 | Thank you for any contributions! Please let the team know if you have any questions or concerns about our contribution policy. 50 | -------------------------------------------------------------------------------- /ChangeLog.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | > See [BreakingChanges](BreakingChanges.md) for a detailed list of API breaks. 4 | ## Version 1.0.6 5 | - Removed dependency on azure-storage-python 6 | 7 | ## Version 1.0.5 8 | - Packaging change to ensure futures is not installed in Python 3 environments 9 | 10 | ## Version 1.0.4 11 | - Updated azure-storage-common dependency to >= 1.1.0, < 2.0.0 12 | 13 | ## Version 1.0.3 14 | - Require futures package only for python versions <= 2.7 15 | 16 | ## Version 1.0.2 17 | - Updated azure-storage-common to 1.1.0 18 | 19 | ## Version 1.0.1 20 | - Patched the SDK to connect to the CosmosDB Table API using connection string 21 | 22 | ## Version 1.0.0: 23 | - GA Release 24 | 25 | ### All: 26 | - General availability release 27 | 28 | ## Version 0.37.2: 29 | 30 | ### All: 31 | - The CosmosDB Tables SDK takes a dependency from 'azure-storage-common' package 32 | 33 | ## Version 0.37.1: 34 | 35 | ### All: 36 | - The Tables SDK has been split from azure-storage namespace and moved to the azure-cosmosdb namespace 37 | - It can be referenced as 'azure-cosmosdb-table' 38 | - Namespace package azure-cosmosdb-nspkg added to the cosmosdb namespace 39 | - The other former azure-storage SDK components (blob, queue and file) can be referenced as azure-storage-blob, 40 | azure-storage-queue and azure-storage-file 41 | - The files formerly found under azure.storage can now be found under azure.cosmosdb.common in the azure-cosmosdb-table package 42 | 43 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | Microsoft Azure CosmosDB SDK for Python 2 | ======================================= 3 | 4 | This project provides a client library in Python that makes it easy to 5 | consume Microsoft Azure CosmosDB services. For documentation please see 6 | the Microsoft Azure `Python Developer Center`_ 7 | 8 | If you are looking for the Service Bus or Azure Management 9 | libraries, please visit 10 | https://github.com/Azure/azure-sdk-for-python. 11 | 12 | .. _Python Developer Center: http://azure.microsoft.com/en-us/develop/python/ -------------------------------------------------------------------------------- /azure-cosmosdb-nspkg/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include *.rst 2 | -------------------------------------------------------------------------------- /azure-cosmosdb-nspkg/README.rst: -------------------------------------------------------------------------------- 1 | Microsoft Azure CosmosDB SDK for Python 2 | ======================================= 3 | 4 | This is the Microsoft Azure CosmosDB namespace package. 5 | 6 | This package is not intended to be installed directly by the end user. 7 | 8 | It provides the necessary files for other packages to extend the azure.cosmosdb namespace. 9 | 10 | If you are looking to install the Azure CosmosDB libraries, see the 11 | `azure `__ bundle package. 12 | -------------------------------------------------------------------------------- /azure-cosmosdb-nspkg/azure/cosmosdb/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-cosmos-table-python/25e99050f93b1f76f19bbd2534502955d0247aac/azure-cosmosdb-nspkg/azure/cosmosdb/__init__.py -------------------------------------------------------------------------------- /azure-cosmosdb-nspkg/setup.cfg: -------------------------------------------------------------------------------- 1 | [bdist_wheel] 2 | universal=1 3 | -------------------------------------------------------------------------------- /azure-cosmosdb-nspkg/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # ------------------------------------------------------------------------- 4 | # Copyright (c) Microsoft. All rights reserved. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # -------------------------------------------------------------------------- 17 | 18 | from setuptools import setup 19 | 20 | # azure v0.x is not compatible with this package 21 | # azure v0.x used to have a __version__ attribute (newer versions don't) 22 | try: 23 | import azure 24 | 25 | try: 26 | ver = azure.__version__ 27 | raise Exception( 28 | 'This package is incompatible with azure=={}. '.format(ver) + 29 | 'Uninstall it with "pip uninstall azure".' 30 | ) 31 | except AttributeError: 32 | pass 33 | except ImportError: 34 | pass 35 | 36 | setup( 37 | name='azure-cosmosdb-nspkg', 38 | version='2.0.2', 39 | description='Microsoft Azure CosmosDB Namespace Package [Internal]', 40 | long_description=open('README.rst', 'r').read(), 41 | license='Apache License 2.0', 42 | author='Microsoft Corporation', 43 | author_email='ascl@microsoft.com', 44 | url='https://github.com/Azure/azure-cosmosdb-python', 45 | classifiers=[ 46 | 'Development Status :: 5 - Production/Stable', 47 | 'Programming Language :: Python', 48 | 'Programming Language :: Python :: 2', 49 | 'Programming Language :: Python :: 2.7', 50 | 'Programming Language :: Python :: 3', 51 | 'Programming Language :: Python :: 3.3', 52 | 'Programming Language :: Python :: 3.4', 53 | 'Programming Language :: Python :: 3.5', 54 | 'Programming Language :: Python :: 3.6', 55 | 'License :: OSI Approved :: Apache Software License', 56 | ], 57 | zip_safe=False, 58 | packages=[ 59 | 'azure', 60 | 'azure.cosmosdb' 61 | ], 62 | install_requires=[ 63 | 'azure-nspkg>=2.0.0', 64 | ] 65 | ) -------------------------------------------------------------------------------- /azure-cosmosdb-table/BreakingChanges.md: -------------------------------------------------------------------------------- 1 | # Breaking Changes azure-storage-table 2 | 3 | > See the [Change Log](ChangeLog.md) for a summary of storage library changes. 4 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/ChangeLog.md: -------------------------------------------------------------------------------- 1 | # Change Log azure-storage-table 2 | 3 | > See [BreakingChanges](BreakingChanges.md) for a detailed list of API breaks. 4 | 5 | ## Version 1.0.6 6 | - Removed dependency on azure-storage-python 7 | 8 | ## Version 1.0.5 9 | - Packaging change to ensure futures is not installed in Python 3 environments 10 | 11 | ## Version 1.0.4 12 | - Updated azure-storage-common dependency to >= 1.1.0, < 2.0.0 13 | 14 | ## Version 1.0.3 15 | - Require futures package only for python versions <= 2.7 16 | 17 | ## Version 1.0.2 18 | - Updated azure-storage-common to 1.1.0 19 | 20 | ## Version 1.0.1 21 | - Patched the SDK to connect to the CosmosDB Table API using connection string 22 | 23 | ## Version 1.0.0: 24 | - GA Release 25 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include *.rst 2 | include azure_bdist_wheel.py 3 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/README.rst: -------------------------------------------------------------------------------- 1 | Microsoft Azure CosmosDB Table SDK for Python 2 | ============================================= 3 | 4 | This project provides a client library in Python that makes it easy to 5 | consume Microsoft Azure CosmosDB Table services. For documentation please see 6 | the Microsoft Azure `Python Developer Center`_ and our `API Reference`_ Page. 7 | 8 | If you are looking for the Service Bus or Azure Management 9 | libraries, please visit 10 | https://github.com/Azure/azure-sdk-for-python. 11 | 12 | 13 | Compatibility 14 | ============= 15 | 16 | **IMPORTANT**: If you have an earlier version of the azure package 17 | (version < 1.0), you should uninstall it before installing this package. 18 | 19 | You can check the version using pip: 20 | 21 | .. code:: shell 22 | 23 | pip freeze 24 | 25 | If you see azure==0.11.0 (or any version below 1.0), uninstall it first then install it again: 26 | 27 | .. code:: shell 28 | 29 | pip uninstall azure 30 | pip install azure 31 | 32 | Features 33 | ======== 34 | 35 | - Table 36 | 37 | - Create/Read/Update/Delete Tables 38 | - Create/Read/Update/Delete Entities 39 | - Batch operations 40 | - Advanced Table Operations 41 | 42 | 43 | Getting Started 44 | =============== 45 | 46 | Download 47 | -------- 48 | 49 | Option 1: Via PyPi 50 | ~~~~~~~~~~~~~~~~~~ 51 | 52 | To install via the Python Package Index (PyPI), type: 53 | 54 | :: 55 | 56 | pip install azure-cosmosdb-table 57 | 58 | Option 2: Source Via Git 59 | ~~~~~~~~~~~~~~~~~~~~~~~~ 60 | 61 | To get the source code of the SDK via git just type: 62 | 63 | :: 64 | 65 | git clone git://github.com/Azure/azure-cosmosdb-python.git 66 | cd ./azure-cosmosdb-table 67 | python setup.py install 68 | 69 | Option 3: Source Zip 70 | ~~~~~~~~~~~~~~~~~~~~ 71 | 72 | Download a zip of the code via GitHub or PyPi. Then, type: 73 | 74 | :: 75 | 76 | cd ./azure-cosmosdb-table 77 | python setup.py install 78 | 79 | 80 | Minimum Requirements 81 | -------------------- 82 | 83 | - Python 2.7, 3.3, 3.4, 3.5, or 3.6. 84 | - See setup.py for dependencies 85 | 86 | Usage 87 | ----- 88 | 89 | To use this SDK to call Microsoft Azure storage services, you need to 90 | first `create an account`_. 91 | 92 | Code Sample 93 | ----------- 94 | 95 | See the samples directory for table usage samples. 96 | 97 | Need Help? 98 | ========== 99 | 100 | Be sure to check out the Microsoft Azure `Developer Forums on MSDN`_ or 101 | the `Developer Forums on Stack Overflow`_ if you have trouble with the 102 | provided code. 103 | 104 | Contribute Code or Provide Feedback 105 | =================================== 106 | 107 | If you would like to become an active contributor to this project, please 108 | follow the instructions provided in `Azure Projects Contribution 109 | Guidelines`_. You can find more details for contributing in the `CONTRIBUTING.md doc`_. 110 | 111 | If you encounter any bugs with the library, please file an issue in the 112 | `Issues`_ section of the project. 113 | 114 | Learn More 115 | ========== 116 | 117 | - `Python Developer Center`_ 118 | - `Azure Storage Service`_ 119 | - `Azure Storage Team Blog`_ 120 | - `API Reference`_ 121 | 122 | .. _Python Developer Center: http://azure.microsoft.com/en-us/develop/python/ 123 | .. _API Reference: https://azure.github.io/azure-cosmosdb-python/ 124 | .. _create an account: https://account.windowsazure.com/signup 125 | .. _Developer Forums on MSDN: http://social.msdn.microsoft.com/Forums/windowsazure/en-US/home?forum=windowsazuredata 126 | .. _Developer Forums on Stack Overflow: http://stackoverflow.com/questions/tagged/azure+windows-azure-storage 127 | .. _Azure Projects Contribution Guidelines: http://azure.github.io/guidelines.html 128 | .. _Issues: https://github.com/Azure/azure-cosmosdb-python/issues 129 | .. _Azure Storage Service: http://azure.microsoft.com/en-us/documentation/services/storage/ 130 | .. _Azure Storage Team Blog: http://blogs.msdn.com/b/windowsazurestorage/ 131 | .. _CONTRIBUTING.md doc: CONTRIBUTING.md 132 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/azure/__init__.py: -------------------------------------------------------------------------------- 1 | __import__('pkg_resources').declare_namespace(__name__) 2 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/azure/cosmosdb/__init__.py: -------------------------------------------------------------------------------- 1 | __import__('pkg_resources').declare_namespace(__name__) 2 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/azure/cosmosdb/table/__init__.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------- 2 | # Copyright (c) Microsoft. All rights reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # -------------------------------------------------------------------------- 15 | from azure.cosmosdb.table.models import ( 16 | Entity, 17 | EntityProperty, 18 | Table, 19 | TablePermissions, 20 | TablePayloadFormat, 21 | EdmType, 22 | AzureBatchOperationError, 23 | AzureBatchValidationError, 24 | ) 25 | from azure.cosmosdb.table.tablebatch import TableBatch 26 | from azure.cosmosdb.table.tableservice import TableService 27 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/azure/cosmosdb/table/_auth.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------- 2 | # Copyright (c) Microsoft. All rights reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # -------------------------------------------------------------------------- 15 | 16 | from azure.cosmosdb.table.common._auth import ( 17 | _StorageSharedKeyAuthentication, 18 | ) 19 | 20 | import logging 21 | logger = logging.getLogger(__name__) 22 | 23 | 24 | class _StorageTableSharedKeyAuthentication(_StorageSharedKeyAuthentication): 25 | def sign_request(self, request): 26 | string_to_sign = \ 27 | self._get_verb(request) + \ 28 | self._get_headers( 29 | request, 30 | ['content-md5', 'content-type', 'x-ms-date'], 31 | ) + \ 32 | self._get_canonicalized_resource(request) + \ 33 | self._get_canonicalized_resource_query(request) 34 | 35 | self._add_authorization_header(request, string_to_sign) 36 | logger.debug("String_to_sign=%s", string_to_sign) 37 | 38 | def _get_canonicalized_resource_query(self, request): 39 | for name, value in request.query.items(): 40 | if name == 'comp': 41 | return '?comp=' + value 42 | return '' 43 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/azure/cosmosdb/table/_connection.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------- 2 | # Copyright (c) Microsoft. All rights reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # -------------------------------------------------------------------------- 15 | 16 | from azure.cosmosdb.table.common._constants import ( 17 | SERVICE_HOST_BASE, 18 | DEFAULT_PROTOCOL, 19 | ) 20 | 21 | from azure.cosmosdb.table.common._connection import ( 22 | _ServiceParameters, 23 | _EMULATOR_ENDPOINTS, 24 | _CONNECTION_ENDPOINTS, 25 | _CONNECTION_ENDPOINTS_SECONDARY, 26 | ) 27 | 28 | from ._constants import ( 29 | DEV_TABLE_HOST, 30 | ) 31 | 32 | _EMULATOR_ENDPOINTS['table'] = DEV_TABLE_HOST 33 | _CONNECTION_ENDPOINTS['table'] = 'TableEndpoint' 34 | _CONNECTION_ENDPOINTS_SECONDARY['table'] = 'TableSecondaryEndpoint' 35 | 36 | class _TableServiceParameters(_ServiceParameters): 37 | def __init__(self, service, account_name=None, account_key=None, sas_token=None, 38 | is_emulated=False, protocol=DEFAULT_PROTOCOL, endpoint_suffix=SERVICE_HOST_BASE, 39 | custom_domain=None, custom_domain_secondary=None): 40 | 41 | super(_TableServiceParameters, self).__init__(service, account_name, account_key, sas_token, 42 | is_emulated, protocol, endpoint_suffix, custom_domain, custom_domain_secondary) 43 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/azure/cosmosdb/table/_constants.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------- 2 | # Copyright (c) Microsoft. All rights reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # -------------------------------------------------------------------------- 15 | import platform 16 | 17 | __author__ = 'Microsoft Corp. ' 18 | __version__ = '1.0.6' 19 | 20 | # x-ms-version for storage service. 21 | X_MS_VERSION = '2017-04-17' 22 | 23 | # UserAgent string sample: 'Azure-CosmosDB/0.32.0 (Python CPython 3.4.2; Windows 8)' 24 | USER_AGENT_STRING = 'Azure-CosmosDB/{} (Python {} {}; {} {})'.format(__version__, platform.python_implementation(), 25 | platform.python_version(), platform.system(), 26 | platform.release()) 27 | DEV_TABLE_HOST = '127.0.0.1:10002' -------------------------------------------------------------------------------- /azure-cosmosdb-table/azure/cosmosdb/table/_error.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------- 2 | # Copyright (c) Microsoft. All rights reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # -------------------------------------------------------------------------- 15 | 16 | from azure.cosmosdb.table.common._error import ( 17 | _validate_not_none, 18 | _ERROR_VALUE_NONE_OR_EMPTY, 19 | ) 20 | 21 | _ERROR_ATTRIBUTE_MISSING = '\'{0}\' object has no attribute \'{1}\'' 22 | _ERROR_BATCH_COMMIT_FAIL = 'Batch Commit Fail' 23 | _ERROR_CANNOT_FIND_PARTITION_KEY = 'Cannot find partition key in request.' 24 | _ERROR_CANNOT_FIND_ROW_KEY = 'Cannot find row key in request.' 25 | _ERROR_CANNOT_SERIALIZE_VALUE_TO_ENTITY = \ 26 | 'Cannot serialize the specified value ({0}) to an entity. Please use ' + \ 27 | 'an EntityProperty (which can specify custom types), int, str, bool, ' + \ 28 | 'or datetime.' 29 | _ERROR_DUPLICATE_ROW_KEY_IN_BATCH = \ 30 | 'Row Keys should not be the same in a batch operations' 31 | _ERROR_INCORRECT_PARTITION_KEY_IN_BATCH = \ 32 | 'Partition Key should be the same in a batch operations' 33 | _ERROR_INVALID_ENTITY_TYPE = 'The entity must be either in dict format or an entity object.' 34 | _ERROR_INVALID_PROPERTY_RESOLVER = \ 35 | 'The specified property resolver returned an invalid type. Name: {0}, Value: {1}, ' + \ 36 | 'EdmType: {2}' 37 | _ERROR_PROPERTY_NAME_TOO_LONG = 'The property name exceeds the maximum allowed length.' 38 | _ERROR_TOO_MANY_ENTITIES_IN_BATCH = \ 39 | 'Batches may only contain 100 operations' 40 | _ERROR_TOO_MANY_PROPERTIES = 'The entity contains more properties than allowed.' 41 | _ERROR_TYPE_NOT_SUPPORTED = 'Type not supported when sending data to the service: {0}.' 42 | _ERROR_VALUE_TOO_LARGE = '{0} is too large to be cast to type {1}.' 43 | _ERROR_UNSUPPORTED_TYPE_FOR_ENCRYPTION = 'Encryption is only supported for not None strings.' 44 | _ERROR_ENTITY_NOT_ENCRYPTED = 'Entity was not encrypted.' 45 | 46 | 47 | def _validate_object_has_param(param_name, object): 48 | if object.get(param_name) is None: 49 | raise ValueError(_ERROR_VALUE_NONE_OR_EMPTY.format(param_name)) 50 | 51 | 52 | def _validate_entity(entity, encrypt=None): 53 | # Validate entity exists 54 | _validate_not_none('entity', entity) 55 | 56 | # Entity inherits from dict, so just validating dict is fine 57 | if not isinstance(entity, dict): 58 | raise TypeError(_ERROR_INVALID_ENTITY_TYPE) 59 | 60 | # Validate partition key and row key are present 61 | _validate_object_has_param('PartitionKey', entity) 62 | _validate_object_has_param('RowKey', entity) 63 | 64 | # Two properties are added during encryption. Validate sufficient space 65 | max_properties = 255 66 | if encrypt: 67 | max_properties = max_properties - 2 68 | 69 | # Validate there are not more than 255 properties including Timestamp 70 | if (len(entity) > max_properties) or (len(entity) == max_properties and 'Timestamp' not in entity): 71 | raise ValueError(_ERROR_TOO_MANY_PROPERTIES) 72 | 73 | # Validate the property names are not too long 74 | for propname in entity: 75 | if len(propname) > 255: 76 | raise ValueError(_ERROR_PROPERTY_NAME_TOO_LONG) 77 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/azure/cosmosdb/table/common/__init__.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------- 2 | # Copyright (c) Microsoft Corporation. All rights reserved. 3 | # Licensed under the MIT License. See License.txt in the project root for 4 | # license information. 5 | # -------------------------------------------------------------------------- 6 | from azure.cosmosdb.table.common._constants import ( 7 | __author__, 8 | __version__, 9 | DEFAULT_X_MS_VERSION, 10 | ) 11 | from azure.cosmosdb.table.common.cloudstorageaccount import CloudStorageAccount 12 | from azure.cosmosdb.table.common.models import ( 13 | RetentionPolicy, 14 | Logging, 15 | Metrics, 16 | CorsRule, 17 | DeleteRetentionPolicy, 18 | StaticWebsite, 19 | ServiceProperties, 20 | AccessPolicy, 21 | ResourceTypes, 22 | Services, 23 | AccountPermissions, 24 | Protocol, 25 | ServiceStats, 26 | GeoReplication, 27 | LocationMode, 28 | RetryContext, 29 | ) 30 | from azure.cosmosdb.table.common.retry import ( 31 | ExponentialRetry, 32 | LinearRetry, 33 | no_retry, 34 | ) 35 | from azure.cosmosdb.table.common.sharedaccesssignature import ( 36 | SharedAccessSignature, 37 | ) 38 | from azure.cosmosdb.table.common.tokencredential import TokenCredential 39 | from azure.cosmosdb.table.common._error import AzureSigningError 40 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/azure/cosmosdb/table/common/_common_conversion.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------- 2 | # Copyright (c) Microsoft Corporation. All rights reserved. 3 | # Licensed under the MIT License. See License.txt in the project root for 4 | # license information. 5 | # -------------------------------------------------------------------------- 6 | 7 | import base64 8 | import hashlib 9 | import hmac 10 | import sys 11 | from io import (SEEK_SET) 12 | 13 | from dateutil.tz import tzutc 14 | 15 | from ._error import ( 16 | _ERROR_VALUE_SHOULD_BE_BYTES_OR_STREAM, 17 | _ERROR_VALUE_SHOULD_BE_SEEKABLE_STREAM, 18 | ) 19 | from .models import ( 20 | _unicode_type, 21 | ) 22 | 23 | if sys.version_info < (3,): 24 | def _str(value): 25 | if isinstance(value, unicode): 26 | return value.encode('utf-8') 27 | 28 | return str(value) 29 | else: 30 | _str = str 31 | 32 | 33 | def _to_str(value): 34 | return _str(value) if value is not None else None 35 | 36 | 37 | def _int_to_str(value): 38 | return str(int(value)) if value is not None else None 39 | 40 | 41 | def _bool_to_str(value): 42 | if value is None: 43 | return None 44 | 45 | if isinstance(value, bool): 46 | if value: 47 | return 'true' 48 | else: 49 | return 'false' 50 | 51 | return str(value) 52 | 53 | 54 | def _to_utc_datetime(value): 55 | return value.strftime('%Y-%m-%dT%H:%M:%SZ') 56 | 57 | 58 | def _datetime_to_utc_string(value): 59 | # Azure expects the date value passed in to be UTC. 60 | # Azure will always return values as UTC. 61 | # If a date is passed in without timezone info, it is assumed to be UTC. 62 | if value is None: 63 | return None 64 | 65 | if value.tzinfo: 66 | value = value.astimezone(tzutc()) 67 | 68 | return value.strftime('%a, %d %b %Y %H:%M:%S GMT') 69 | 70 | 71 | def _encode_base64(data): 72 | if isinstance(data, _unicode_type): 73 | data = data.encode('utf-8') 74 | encoded = base64.b64encode(data) 75 | return encoded.decode('utf-8') 76 | 77 | 78 | def _decode_base64_to_bytes(data): 79 | if isinstance(data, _unicode_type): 80 | data = data.encode('utf-8') 81 | return base64.b64decode(data) 82 | 83 | 84 | def _decode_base64_to_text(data): 85 | decoded_bytes = _decode_base64_to_bytes(data) 86 | return decoded_bytes.decode('utf-8') 87 | 88 | 89 | def _sign_string(key, string_to_sign, key_is_base64=True): 90 | if key_is_base64: 91 | key = _decode_base64_to_bytes(key) 92 | else: 93 | if isinstance(key, _unicode_type): 94 | key = key.encode('utf-8') 95 | if isinstance(string_to_sign, _unicode_type): 96 | string_to_sign = string_to_sign.encode('utf-8') 97 | signed_hmac_sha256 = hmac.HMAC(key, string_to_sign, hashlib.sha256) 98 | digest = signed_hmac_sha256.digest() 99 | encoded_digest = _encode_base64(digest) 100 | return encoded_digest 101 | 102 | 103 | def _get_content_md5(data): 104 | md5 = hashlib.md5() 105 | if isinstance(data, bytes): 106 | md5.update(data) 107 | elif hasattr(data, 'read'): 108 | pos = 0 109 | try: 110 | pos = data.tell() 111 | except: 112 | pass 113 | for chunk in iter(lambda: data.read(4096), b""): 114 | md5.update(chunk) 115 | try: 116 | data.seek(pos, SEEK_SET) 117 | except (AttributeError, IOError): 118 | raise ValueError(_ERROR_VALUE_SHOULD_BE_SEEKABLE_STREAM.format('data')) 119 | else: 120 | raise ValueError(_ERROR_VALUE_SHOULD_BE_BYTES_OR_STREAM.format('data')) 121 | 122 | return base64.b64encode(md5.digest()).decode('utf-8') 123 | 124 | 125 | def _lower(text): 126 | return text.lower() 127 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/azure/cosmosdb/table/common/_constants.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------- 2 | # Copyright (c) Microsoft Corporation. All rights reserved. 3 | # Licensed under the MIT License. See License.txt in the project root for 4 | # license information. 5 | # -------------------------------------------------------------------------- 6 | import platform 7 | import sys 8 | 9 | __author__ = 'Microsoft Corp. ' 10 | __version__ = '1.4.2' 11 | 12 | # UserAgent string sample: 'Azure-Storage/0.37.0-0.38.0 (Python CPython 3.4.2; Windows 8)' 13 | # First version(0.37.0) is the common package, and the second version(0.38.0) is the service package 14 | USER_AGENT_STRING_PREFIX = 'Azure-Storage/{}-'.format(__version__) 15 | USER_AGENT_STRING_SUFFIX = '(Python {} {}; {} {})'.format(platform.python_implementation(), 16 | platform.python_version(), platform.system(), 17 | platform.release()) 18 | 19 | # default values for common package, in case it is used directly 20 | DEFAULT_X_MS_VERSION = '2018-03-28' 21 | DEFAULT_USER_AGENT_STRING = '{}None {}'.format(USER_AGENT_STRING_PREFIX, USER_AGENT_STRING_SUFFIX) 22 | 23 | # Live ServiceClient URLs 24 | SERVICE_HOST_BASE = 'core.windows.net' 25 | DEFAULT_PROTOCOL = 'https' 26 | 27 | # Development ServiceClient URLs 28 | DEV_BLOB_HOST = '127.0.0.1:10000' 29 | DEV_QUEUE_HOST = '127.0.0.1:10001' 30 | 31 | # Default credentials for Development Storage Service 32 | DEV_ACCOUNT_NAME = 'devstoreaccount1' 33 | DEV_ACCOUNT_SECONDARY_NAME = 'devstoreaccount1-secondary' 34 | DEV_ACCOUNT_KEY = 'Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==' 35 | 36 | # Socket timeout in seconds 37 | DEFAULT_SOCKET_TIMEOUT = 20 38 | 39 | # for python 3.5+, there was a change to the definition of the socket timeout (as far as socket.sendall is concerned) 40 | # The socket timeout is now the maximum total duration to send all data. 41 | if sys.version_info >= (3, 5): 42 | # the timeout to connect is 20 seconds, and the read timeout is 2000 seconds 43 | # the 2000 seconds was calculated with: 100MB (max block size)/ 50KB/s (an arbitrarily chosen minimum upload speed) 44 | DEFAULT_SOCKET_TIMEOUT = (20, 2000) 45 | 46 | # Encryption constants 47 | _ENCRYPTION_PROTOCOL_V1 = '1.0' 48 | 49 | _AUTHORIZATION_HEADER_NAME = 'Authorization' 50 | _COPY_SOURCE_HEADER_NAME = 'x-ms-copy-source' 51 | _REDACTED_VALUE = 'REDACTED' 52 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/azure/cosmosdb/table/common/_http/__init__.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------- 2 | # Copyright (c) Microsoft Corporation. All rights reserved. 3 | # Licensed under the MIT License. See License.txt in the project root for 4 | # license information. 5 | # -------------------------------------------------------------------------- 6 | 7 | 8 | class HTTPError(Exception): 9 | ''' 10 | Represents an HTTP Exception when response status code >= 300. 11 | 12 | :ivar int status: 13 | the status code of the response 14 | :ivar str message: 15 | the message 16 | :ivar list headers: 17 | the returned headers, as a list of (name, value) pairs 18 | :ivar bytes body: 19 | the body of the response 20 | ''' 21 | 22 | def __init__(self, status, message, respheader, respbody): 23 | self.status = status 24 | self.respheader = respheader 25 | self.respbody = respbody 26 | Exception.__init__(self, message) 27 | 28 | 29 | class HTTPResponse(object): 30 | ''' 31 | Represents a response from an HTTP request. 32 | 33 | :ivar int status: 34 | the status code of the response 35 | :ivar str message: 36 | the message 37 | :ivar dict headers: 38 | the returned headers 39 | :ivar bytes body: 40 | the body of the response 41 | ''' 42 | 43 | def __init__(self, status, message, headers, body): 44 | self.status = status 45 | self.message = message 46 | self.headers = headers 47 | self.body = body 48 | 49 | 50 | class HTTPRequest(object): 51 | ''' 52 | Represents an HTTP Request. 53 | 54 | :ivar str host: 55 | the host name to connect to 56 | :ivar str method: 57 | the method to use to connect (string such as GET, POST, PUT, etc.) 58 | :ivar str path: 59 | the uri fragment 60 | :ivar dict query: 61 | query parameters 62 | :ivar dict headers: 63 | header values 64 | :ivar bytes body: 65 | the body of the request. 66 | ''' 67 | 68 | def __init__(self): 69 | self.host = '' 70 | self.method = '' 71 | self.path = '' 72 | self.query = {} # list of (name, value) 73 | self.headers = {} # list of (header name, header value) 74 | self.body = '' 75 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/azure/cosmosdb/table/common/tokencredential.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------- 2 | # Copyright (c) Microsoft Corporation. All rights reserved. 3 | # Licensed under the MIT License. See License.txt in the project root for 4 | # license information. 5 | # -------------------------------------------------------------------------- 6 | 7 | import requests 8 | 9 | 10 | class TokenCredential(object): 11 | """ 12 | Represents a token credential that is used to authorize HTTPS requests. 13 | The token can be updated by the user. 14 | 15 | :ivar str token: 16 | The authorization token. It can be set by the user at any point in a thread-safe way. 17 | """ 18 | 19 | def __init__(self, initial_value=None): 20 | """ 21 | :param initial_value: initial value for the token. 22 | """ 23 | self.token = initial_value 24 | 25 | def signed_session(self, session=None): 26 | """ 27 | Sign requests session with the token. This method is called every time a request is going on the wire. 28 | The user is responsible for updating the token with the preferred tool/SDK. 29 | In general there are two options: 30 | - override this method to update the token in a preferred way and set Authorization header on session 31 | - not override this method, and have a timer that triggers periodically to update the token on this class 32 | 33 | The second option is recommended as it tends to be more performance-friendly. 34 | 35 | :param session: The session to configure for authentication 36 | :type session: requests.Session 37 | :rtype: requests.Session 38 | """ 39 | session = session or requests.Session() 40 | session.headers['Authorization'] = "Bearer {}".format(self.token) 41 | 42 | return session 43 | 44 | def token(self, new_value): 45 | """ 46 | :param new_value: new value to be set as the token. 47 | """ 48 | self.token = new_value -------------------------------------------------------------------------------- /azure-cosmosdb-table/azure_bdist_wheel.py: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------------------- 2 | # Copyright (c) Microsoft Corporation. All rights reserved. 3 | # Licensed under the MIT License. See License.txt in the project root for 4 | # license information. 5 | #-------------------------------------------------------------------------- 6 | 7 | from distutils import log as logger 8 | import os.path 9 | 10 | from wheel.bdist_wheel import bdist_wheel 11 | class azure_bdist_wheel(bdist_wheel): 12 | """The purpose of this class is to build wheel a little differently than the sdist, 13 | without requiring to build the wheel from the sdist (i.e. you can build the wheel 14 | directly from source). 15 | """ 16 | 17 | description = "Create an Azure wheel distribution" 18 | 19 | user_options = bdist_wheel.user_options + \ 20 | [('azure-namespace-package=', None, 21 | "Name of the deepest nspkg used")] 22 | 23 | def initialize_options(self): 24 | bdist_wheel.initialize_options(self) 25 | self.azure_namespace_package = None 26 | 27 | def finalize_options(self): 28 | bdist_wheel.finalize_options(self) 29 | if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): 30 | raise ValueError("azure_namespace_package must finish by -nspkg") 31 | 32 | def run(self): 33 | if not self.distribution.install_requires: 34 | self.distribution.install_requires = [] 35 | self.distribution.install_requires.append( 36 | "{}>=2.0.0".format(self.azure_namespace_package)) 37 | bdist_wheel.run(self) 38 | 39 | def write_record(self, bdist_dir, distinfo_dir): 40 | if self.azure_namespace_package: 41 | # Split and remove last part, assuming it's "nspkg" 42 | subparts = self.azure_namespace_package.split('-')[0:-1] 43 | folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] 44 | for azure_sub_package in folder_with_init: 45 | init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') 46 | if os.path.isfile(init_file): 47 | logger.info("manually remove {} while building the wheel".format(init_file)) 48 | os.remove(init_file) 49 | else: 50 | raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) 51 | bdist_wheel.write_record(self, bdist_dir, distinfo_dir) 52 | cmdclass = { 53 | 'bdist_wheel': azure_bdist_wheel, 54 | } 55 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/doc/BuildDocs.bat: -------------------------------------------------------------------------------- 1 | call InstallDocDependencies.bat 2 | sphinx-apidoc -e -o .\ref ..\azure 3 | call make.bat html -------------------------------------------------------------------------------- /azure-cosmosdb-table/doc/InstallDocDependencies.bat: -------------------------------------------------------------------------------- 1 | pip install -r requirements.txt -------------------------------------------------------------------------------- /azure-cosmosdb-table/doc/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-cosmos-table-python/25e99050f93b1f76f19bbd2534502955d0247aac/azure-cosmosdb-table/doc/__init__.py -------------------------------------------------------------------------------- /azure-cosmosdb-table/doc/index.rst: -------------------------------------------------------------------------------- 1 | Azure CosmosDB SDK for Python. 2 | ============================== 3 | 4 | Installation: 5 | ------------- 6 | Please refer to the Github page for the installation instructions: https://github.com/Azure/azure-cosmosdb-python 7 | 8 | If you are looking for Azure Service Bus or the Azure management libraries, 9 | please visit https://github.com/Azure/azure-sdk-for-python 10 | 11 | Documentation: 12 | -------------- 13 | * `Table Getting Started Doc `__ -- (:doc:`API `) 14 | * :ref:`Reference Documentation - All Services` 15 | 16 | 17 | Features: 18 | --------- 19 | 20 | - Table 21 | 22 | - Create/Read/Update/Delete Tables 23 | - Create/Read/Update/Delete Entities 24 | - Batch operations 25 | - Advanced Table Operations 26 | 27 | System Requirements: 28 | -------------------- 29 | 30 | The supported Python versions are 2.7.x, 3.3.x, 3.4.x, and 3.5.x. 31 | To download Python, please visit 32 | https://www.python.org/download/ 33 | 34 | 35 | We recommend Python Tools for Visual Studio as a development environment for developing your applications. Please visit http://aka.ms/python for more information. 36 | 37 | 38 | Need Help?: 39 | ----------- 40 | 41 | Be sure to check out the Microsoft Azure `Developer Forums on Stack 42 | Overflow `__ if you have 43 | trouble with the provided code. 44 | 45 | Contributing: 46 | ------------- 47 | Contribute Code or Provide Feedback: 48 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 49 | 50 | If you would like to become an active contributor to this project, please 51 | follow the instructions provided in `Microsoft Azure Projects 52 | Contribution 53 | Guidelines `__. 54 | 55 | If you encounter any bugs with the library, please file an issue in the 56 | `Issues `__ 57 | section of the project. 58 | 59 | Learn More 60 | ========== 61 | 62 | `Microsoft Azure Python Developer 63 | Center `__ 64 | 65 | 66 | Indices and tables 67 | ================== 68 | 69 | * :ref:`genindex` 70 | * :ref:`modindex` 71 | * :ref:`search` 72 | 73 | .. toctree:: 74 | :hidden: 75 | 76 | .. toctree:: 77 | :hidden: 78 | :glob: 79 | 80 | upgrade 81 | ref/* -------------------------------------------------------------------------------- /azure-cosmosdb-table/doc/ref/azure.cosmosdb.rst: -------------------------------------------------------------------------------- 1 | azure\.cosmosdb package 2 | ======================= 3 | 4 | Subpackages 5 | ----------- 6 | 7 | .. toctree:: 8 | 9 | azure.cosmosdb.table 10 | 11 | Module contents 12 | --------------- 13 | 14 | .. automodule:: azure.cosmosdb 15 | :members: 16 | :undoc-members: 17 | :show-inheritance: 18 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/doc/ref/azure.cosmosdb.table.models.rst: -------------------------------------------------------------------------------- 1 | azure\.cosmosdb\.table\.models module 2 | ===================================== 3 | 4 | .. automodule:: azure.cosmosdb.table.models 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/doc/ref/azure.cosmosdb.table.rst: -------------------------------------------------------------------------------- 1 | azure\.cosmosdb\.table package 2 | ============================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | .. toctree:: 8 | 9 | azure.cosmosdb.table.models 10 | azure.cosmosdb.table.tablebatch 11 | azure.cosmosdb.table.tableservice 12 | 13 | Module contents 14 | --------------- 15 | 16 | .. automodule:: azure.cosmosdb.table 17 | :members: 18 | :undoc-members: 19 | :show-inheritance: 20 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/doc/ref/azure.cosmosdb.table.sharedaccesssignature.rst: -------------------------------------------------------------------------------- 1 | azure\.cosmosdb\.table\.sharedaccesssignature module 2 | ==================================================== 3 | 4 | .. automodule:: azure.cosmosdb.table.sharedaccesssignature 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/doc/ref/azure.cosmosdb.table.tablebatch.rst: -------------------------------------------------------------------------------- 1 | azure\.cosmosdb\.table\.tablebatch module 2 | ========================================= 3 | 4 | .. automodule:: azure.cosmosdb.table.tablebatch 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/doc/ref/azure.cosmosdb.table.tableservice.rst: -------------------------------------------------------------------------------- 1 | azure\.cosmosdb\.table\.tableservice module 2 | =========================================== 3 | 4 | .. automodule:: azure.cosmosdb.table.tableservice 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/doc/ref/azure.rst: -------------------------------------------------------------------------------- 1 | azure package 2 | ============= 3 | 4 | Subpackages 5 | ----------- 6 | 7 | .. toctree:: 8 | 9 | azure.cosmosdb 10 | 11 | Module contents 12 | --------------- 13 | 14 | .. automodule:: azure 15 | :members: 16 | :undoc-members: 17 | :show-inheritance: 18 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/doc/ref/modules.rst: -------------------------------------------------------------------------------- 1 | azure 2 | ===== 3 | 4 | .. toctree:: 5 | :maxdepth: 4 6 | 7 | azure 8 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/doc/requirements.txt: -------------------------------------------------------------------------------- 1 | sphinx 2 | azure-common -------------------------------------------------------------------------------- /azure-cosmosdb-table/doc/upgrade.rst: -------------------------------------------------------------------------------- 1 | Upgrade Guide 2 | =============================== 3 | 4 | This guide is intended to help upgrade code written for the Azure Storage Python 5 | library before version 0.30.0. 6 | 7 | The best way to see how to upgrade a specific API is to take a look at the usage 8 | samples in the `Samples `__ 9 | directory on GitHub. A very specific set of changes as well as additions can be 10 | found in the ChangeLog and BreakingChanges documents. The below is a summary of 11 | those documents containing the most relevant pieces for the upgrade scenario. 12 | 13 | General Changes 14 | =============================== 15 | 16 | In general, we attempted to use more appropriate Python types for parameter and 17 | return values rather than always taking and receiving strings. Parameter and return 18 | values previously prefixed with x_ms were simplified by removing this prefix, and 19 | parameter values are divided by '_' between words as is idiomatic. 20 | 21 | Listing returns a generator rather than a result segment. This generator automatically 22 | follows continuation tokens as more results are requested. 23 | 24 | SAS methods take several individual parameters rather than a single paramter 25 | object. Similarly, ACL getters and setters take dictionaries mapping id to 26 | AccessPolicy rather than a list of SignedIdentifiers each holding an id and an 27 | AccessPolicy. 28 | 29 | Blob 30 | =============================== 31 | 32 | The single BlobService object was divided into three subservices for the different 33 | blob types (BlockBlobService, PageBlobService, AppendBlobService) with common 34 | methods in the abstract BaseBlobService these inherit from. This was done for two 35 | reasons. First, to reduce confusion when blob-type specific methods were used on 36 | the incorrect blob type. Second, to simplify the BlobService object which had grown 37 | to be quite extensive when append blob was added. 38 | 39 | ContentSettings objects have replaced all content_* and cache_control parameters 40 | and return values for applicable APIs. This is intended to highlight that the 41 | semantics of setting content properties is replace rather than merge, meaning that 42 | setting any one property will cause any unspecified properties to be cleared on 43 | the blob. 44 | 45 | On the performance side, single-threaded blob download APIs will now download 46 | the blob without chunking to improve perf and not do an initial get to find the 47 | size of the blob. However, as a result the progress_callback may receive None 48 | for its total parameter when parallelism is off to allow for this optimization. 49 | 50 | Queue 51 | =============================== 52 | 53 | The largest change to the QueueService class is that queue messages are both XML 54 | encoded and decoded by default. In past versions, either messages were not encoded 55 | or decoded by default, or only encoded. Encoding and decoding methods can be 56 | modified using the QueueService encode_function and decode_function instance variables. 57 | 58 | Methods operating on queue messages and which have return values will return 59 | QueueMessage objects. QueueMessages objects contain essentially the same fields 60 | as previously, but the times are returned as dates rather than strings and the 61 | dequeue count is returned as an int. 62 | 63 | Table 64 | =============================== 65 | 66 | Rather than having a boolean switch for turning batching on and off, batches are 67 | an object which can be populated and then committed. Entities can be sent as dictionaries 68 | or as Entity objects, and returned entities are accessible as either objects or 69 | dictionaries. Methods which access and modify entites have been simplified so that 70 | if they take an entity object they extract the partition key and row key from that 71 | object rather than requiring these be sent separately. 72 | 73 | All table entity integer values are stored on the service with type Edm.Int64 74 | unless the type is explicitly overridden as Edm.Int32. Formerly, the type was 75 | decided based on the size of the number, but this resulted in hard to predict 76 | types on the service. So, the more consistent option was chosen. 77 | 78 | Operations no longer echo content from the service and JSON is used instead of 79 | AtomPub, improving performance. -------------------------------------------------------------------------------- /azure-cosmosdb-table/samples/__init__.py: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/samples/advanced/__init__.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------- 2 | # Copyright (c) Microsoft. All rights reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # -------------------------------------------------------------------------- 15 | from .authentication import AuthenticationSamples 16 | from .client import ClientSamples 17 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/samples/advanced/authentication.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | from azure.cosmosdb.table import TableService 4 | # ------------------------------------------------------------------------- 5 | # Copyright (c) Microsoft. All rights reserved. 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this blob except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # -------------------------------------------------------------------------- 18 | from azure.cosmosdb.table.common import CloudStorageAccount 19 | 20 | 21 | class AuthenticationSamples(): 22 | def __init__(self): 23 | pass 24 | 25 | def run_all_samples(self): 26 | self.key_auth() 27 | self.sas_auth() 28 | self.emulator() 29 | self.connection_string() 30 | 31 | def key_auth(self): 32 | # With account 33 | account = CloudStorageAccount(account_name='', account_key='') 34 | client = account.create_table_service() 35 | 36 | # Directly 37 | client = TableService(account_name='', account_key='') 38 | 39 | def sas_auth(self): 40 | # With account 41 | account = CloudStorageAccount(account_name='', sas_token='') 42 | client = account.create_table_service() 43 | 44 | # Directly 45 | client = TableService(account_name='', sas_token='') 46 | 47 | def emulator(self): 48 | # With account 49 | account = CloudStorageAccount(is_emulated=True) 50 | client = account.create_table_service() 51 | 52 | # Directly 53 | client = TableService(is_emulated=True) 54 | 55 | # The emulator does not at the time of writing support append blobs or 56 | # the file service. 57 | 58 | def connection_string(self): 59 | # Connection strings may be retrieved from the Portal or constructed manually 60 | connection_string = 'AccountName=;AccountKey=;' 61 | client = TableService(connection_string=connection_string) 62 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/samples/config.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------- 2 | # Copyright (c) Microsoft. All rights reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # -------------------------------------------------------------------------- 15 | 16 | STORAGE_ACCOUNT_NAME = '' 17 | STORAGE_ACCOUNT_KEY = '' 18 | SAS = '' 19 | IS_EMULATED = False 20 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/samples/table/__init__.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------- 2 | # Copyright (c) Microsoft. All rights reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # -------------------------------------------------------------------------- 15 | from .encryption_usage import TableEncryptionSamples 16 | from .sas_usage import TableSasSamples 17 | from .table_usage import TableSamples 18 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/samples/test_sample.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------- 2 | # Copyright (c) Microsoft. All rights reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # -------------------------------------------------------------------------- 15 | import unittest 16 | 17 | from azure.cosmosdb.table.common import CloudStorageAccount 18 | from samples.advanced import ( 19 | AuthenticationSamples, 20 | ClientSamples, 21 | ) 22 | from samples.table import ( 23 | TableSasSamples, 24 | TableEncryptionSamples, 25 | TableSamples, 26 | ) 27 | 28 | 29 | @unittest.skip('Skip sample tests.') 30 | class SampleTest(unittest.TestCase): 31 | def setUp(self): 32 | super(SampleTest, self).setUp() 33 | try: 34 | import samples.config as config 35 | except: 36 | raise ValueError('Please specify configuration settings in config.py.') 37 | 38 | if config.IS_EMULATED: 39 | self.account = CloudStorageAccount(is_emulated=True) 40 | else: 41 | # Note that account key and sas should not both be included 42 | account_name = config.STORAGE_ACCOUNT_NAME 43 | account_key = config.STORAGE_ACCOUNT_KEY 44 | sas = config.SAS 45 | self.account = CloudStorageAccount(account_name=account_name, 46 | account_key=account_key, 47 | sas_token=sas) 48 | 49 | def test_table_samples(self): 50 | table = TableSamples(self.account) 51 | table.run_all_samples() 52 | 53 | def test_table_sas_samples(self): 54 | sas = TableSasSamples(self.account) 55 | sas.run_all_samples() 56 | 57 | def test_authentication_samples(self): 58 | auth = AuthenticationSamples() 59 | auth.run_all_samples() 60 | 61 | def test_client_samples(self): 62 | client = ClientSamples() 63 | client.run_all_samples() 64 | 65 | def test_table_encryption_samples(self): 66 | encryption = TableEncryptionSamples(self.account) 67 | encryption.run_all_samples() 68 | 69 | 70 | # ------------------------------------------------------------------------------ 71 | if __name__ == '__main__': 72 | unittest.main() 73 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/setup.cfg: -------------------------------------------------------------------------------- 1 | [bdist_wheel] 2 | universal=1 3 | azure-namespace-package=azure-cosmosdb-nspkg 4 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # ------------------------------------------------------------------------- 4 | # Copyright (c) Microsoft. All rights reserved. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # -------------------------------------------------------------------------- 17 | 18 | import sys 19 | 20 | from setuptools import setup, find_packages 21 | 22 | try: 23 | from azure_bdist_wheel import cmdclass 24 | except ImportError: 25 | from distutils import log as logger 26 | 27 | logger.warn("Wheel is not available, disabling bdist_wheel hook") 28 | cmdclass = {} 29 | 30 | # azure v0.x is not compatible with this package 31 | # azure v0.x used to have a __version__ attribute (newer versions don't) 32 | try: 33 | import azure 34 | 35 | try: 36 | ver = azure.__version__ 37 | raise Exception( 38 | 'This package is incompatible with azure=={}. '.format(ver) + 39 | 'Uninstall it with "pip uninstall azure".' 40 | ) 41 | except AttributeError: 42 | pass 43 | except ImportError: 44 | pass 45 | 46 | setup( 47 | name='azure-cosmosdb-table', 48 | version='1.0.6', 49 | description='Microsoft Azure CosmosDB Table Client Library for Python', 50 | long_description=open('README.rst', 'r').read(), 51 | license='Apache License 2.0', 52 | author='Microsoft Corporation', 53 | author_email='ascl@microsoft.com', 54 | url='https://github.com/Azure/azure-cosmosdb-python', 55 | classifiers=[ 56 | 'Development Status :: 4 - Beta', 57 | 'Programming Language :: Python', 58 | 'Programming Language :: Python :: 2', 59 | 'Programming Language :: Python :: 2.7', 60 | 'Programming Language :: Python :: 3', 61 | 'Programming Language :: Python :: 3.3', 62 | 'Programming Language :: Python :: 3.4', 63 | 'Programming Language :: Python :: 3.5', 64 | 'Programming Language :: Python :: 3.6', 65 | 'License :: OSI Approved :: Apache Software License', 66 | ], 67 | zip_safe=False, 68 | packages=find_packages(), 69 | install_requires=[ 70 | 'azure-common>=1.1.5', 71 | 'cryptography', 72 | 'python-dateutil', 73 | 'requests', 74 | 'futures; python_version<="2.7"' 75 | ], 76 | cmdclass=cmdclass 77 | ) 78 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/__init__.py: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/encryption_test_helper.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------- 2 | # Copyright (c) Microsoft. All rights reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # -------------------------------------------------------------------------- 15 | from cryptography.hazmat.backends import default_backend 16 | from cryptography.hazmat.primitives.asymmetric.padding import ( 17 | OAEP, 18 | MGF1, 19 | ) 20 | from cryptography.hazmat.primitives.asymmetric.rsa import generate_private_key 21 | from cryptography.hazmat.primitives.hashes import SHA1 22 | from cryptography.hazmat.primitives.keywrap import ( 23 | aes_key_wrap, 24 | aes_key_unwrap, 25 | ) 26 | 27 | 28 | class KeyWrapper: 29 | def __init__(self, kid='local:key1'): 30 | # Must have constant key value for recorded tests, otherwise we could use a random generator. 31 | self.kek = b'\xbe\xa4\x11K\x9eJ\x07\xdafF\x83\xad+\xadvA C\xe8\xbc\x90\xa4\x11}G\xc3\x0f\xd4\xb4\x19m\x11' 32 | self.backend = default_backend() 33 | self.kid = kid 34 | 35 | def wrap_key(self, key, algorithm='A256KW'): 36 | if algorithm == 'A256KW': 37 | return aes_key_wrap(self.kek, key, self.backend) 38 | else: 39 | raise ValueError(_ERROR_UNKNOWN_KEY_WRAP_ALGORITHM) 40 | 41 | def unwrap_key(self, key, algorithm): 42 | if algorithm == 'A256KW': 43 | return aes_key_unwrap(self.kek, key, self.backend) 44 | else: 45 | raise ValueError(_ERROR_UNKNOWN_KEY_WRAP_ALGORITHM) 46 | 47 | def get_key_wrap_algorithm(self): 48 | return 'A256KW' 49 | 50 | def get_kid(self): 51 | return self.kid 52 | 53 | 54 | class KeyResolver: 55 | def __init__(self): 56 | self.keys = {} 57 | 58 | def put_key(self, key): 59 | self.keys[key.get_kid()] = key 60 | 61 | def resolve_key(self, kid): 62 | return self.keys[kid] 63 | 64 | 65 | class RSAKeyWrapper: 66 | def __init__(self, kid='local:key2'): 67 | self.private_key = generate_private_key(public_exponent=65537, 68 | key_size=2048, 69 | backend=default_backend()) 70 | self.public_key = self.private_key.public_key() 71 | self.kid = kid 72 | 73 | def wrap_key(self, key, algorithm='RSA'): 74 | if algorithm == 'RSA': 75 | return self.public_key.encrypt(key, 76 | OAEP( 77 | mgf=MGF1(algorithm=SHA1()), 78 | algorithm=SHA1(), 79 | label=None) 80 | ) 81 | else: 82 | raise ValueError(_ERROR_UNKNOWN_KEY_WRAP_ALGORITHM) 83 | 84 | def unwrap_key(self, key, algorithm): 85 | if algorithm == 'RSA': 86 | return self.private_key.decrypt(key, 87 | OAEP( 88 | mgf=MGF1(algorithm=SHA1()), 89 | algorithm=SHA1(), 90 | label=None) 91 | ) 92 | else: 93 | raise ValueError(_ERROR_UNKNOWN_KEY_WRAP_ALGORITHM) 94 | 95 | def get_key_wrap_algorithm(self): 96 | return 'RSA' 97 | 98 | def get_kid(self): 99 | return self.kid 100 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table.test_create_table.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"TableName": "tablea4ed0b50"}' 4 | headers: 5 | Accept: [application/json;odata=minimalmetadata] 6 | Connection: [keep-alive] 7 | Content-Length: ['30'] 8 | Content-Type: [application/json] 9 | DataServiceVersion: [3.0;NetFx] 10 | MaxDataServiceVersion: ['3.0'] 11 | Prefer: [return-no-content] 12 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 13 | x-ms-client-request-id: [e645ad66-c5c0-11e7-9783-a08cfdf04b77] 14 | x-ms-date: ['Fri, 10 Nov 2017 02:43:14 GMT'] 15 | x-ms-version: ['2017-04-17'] 16 | method: POST 17 | uri: https://storagename.table.core.windows.net/Tables 18 | response: 19 | body: {string: ''} 20 | headers: 21 | Cache-Control: [no-cache] 22 | Content-Length: ['0'] 23 | DataServiceId: ['https://storagename.table.core.windows.net/Tables(''tablea4ed0b50'')'] 24 | Date: ['Fri, 10 Nov 2017 02:43:14 GMT'] 25 | Location: ['https://storagename.table.core.windows.net/Tables(''tablea4ed0b50'')'] 26 | Preference-Applied: [return-no-content] 27 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 28 | X-Content-Type-Options: [nosniff] 29 | x-ms-request-id: [2506f53b-0002-00bf-77cd-59b70c000000] 30 | x-ms-version: ['2017-04-17'] 31 | status: {code: 204, message: No Content} 32 | - request: 33 | body: null 34 | headers: 35 | Accept: [application/json;odata=nometadata] 36 | Connection: [keep-alive] 37 | DataServiceVersion: [3.0;NetFx] 38 | MaxDataServiceVersion: ['3.0'] 39 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 40 | x-ms-client-request-id: [e6aa616c-c5c0-11e7-8811-a08cfdf04b77] 41 | x-ms-date: ['Fri, 10 Nov 2017 02:43:15 GMT'] 42 | x-ms-version: ['2017-04-17'] 43 | method: GET 44 | uri: https://storagename.table.core.windows.net/Tables('tablea4ed0b50') 45 | response: 46 | body: {string: '{"TableName":"tablea4ed0b50"}'} 47 | headers: 48 | Cache-Control: [no-cache] 49 | Content-Type: [application/json;odata=nometadata;streaming=true;charset=utf-8] 50 | Date: ['Fri, 10 Nov 2017 02:43:14 GMT'] 51 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 52 | Transfer-Encoding: [chunked] 53 | X-Content-Type-Options: [nosniff] 54 | x-ms-request-id: [2506f54a-0002-00bf-04cd-59b70c000000] 55 | x-ms-version: ['2017-04-17'] 56 | status: {code: 200, message: OK} 57 | version: 1 58 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table.test_create_table_fail_on_exist.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"TableName": "table6d7c1113"}' 4 | headers: 5 | Accept: [application/json;odata=minimalmetadata] 6 | Connection: [keep-alive] 7 | Content-Length: ['30'] 8 | Content-Type: [application/json] 9 | DataServiceVersion: [3.0;NetFx] 10 | MaxDataServiceVersion: ['3.0'] 11 | Prefer: [return-no-content] 12 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 13 | x-ms-client-request-id: [e6f7a7ee-c5c0-11e7-b23b-a08cfdf04b77] 14 | x-ms-date: ['Fri, 10 Nov 2017 02:43:15 GMT'] 15 | x-ms-version: ['2017-04-17'] 16 | method: POST 17 | uri: https://storagename.table.core.windows.net/Tables 18 | response: 19 | body: {string: ''} 20 | headers: 21 | Cache-Control: [no-cache] 22 | Content-Length: ['0'] 23 | DataServiceId: ['https://storagename.table.core.windows.net/Tables(''table6d7c1113'')'] 24 | Date: ['Fri, 10 Nov 2017 02:43:15 GMT'] 25 | Location: ['https://storagename.table.core.windows.net/Tables(''table6d7c1113'')'] 26 | Preference-Applied: [return-no-content] 27 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 28 | X-Content-Type-Options: [nosniff] 29 | x-ms-request-id: [a2743e9a-0002-0088-28cd-591ba3000000] 30 | x-ms-version: ['2017-04-17'] 31 | status: {code: 204, message: No Content} 32 | - request: 33 | body: null 34 | headers: 35 | Accept: [application/json;odata=nometadata] 36 | Connection: [keep-alive] 37 | DataServiceVersion: [3.0;NetFx] 38 | MaxDataServiceVersion: ['3.0'] 39 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 40 | x-ms-client-request-id: [e7324a98-c5c0-11e7-b81a-a08cfdf04b77] 41 | x-ms-date: ['Fri, 10 Nov 2017 02:43:16 GMT'] 42 | x-ms-version: ['2017-04-17'] 43 | method: GET 44 | uri: https://storagename.table.core.windows.net/Tables('table6d7c1113') 45 | response: 46 | body: {string: '{"TableName":"table6d7c1113"}'} 47 | headers: 48 | Cache-Control: [no-cache] 49 | Content-Type: [application/json;odata=nometadata;streaming=true;charset=utf-8] 50 | Date: ['Fri, 10 Nov 2017 02:43:15 GMT'] 51 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 52 | Transfer-Encoding: [chunked] 53 | X-Content-Type-Options: [nosniff] 54 | x-ms-request-id: [a2743ea3-0002-0088-2fcd-591ba3000000] 55 | x-ms-version: ['2017-04-17'] 56 | status: {code: 200, message: OK} 57 | version: 1 58 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table.test_create_table_with_already_existing_table.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"TableName": "table898d16dd"}' 4 | headers: 5 | Accept: [application/json;odata=minimalmetadata] 6 | Connection: [keep-alive] 7 | Content-Length: ['30'] 8 | Content-Type: [application/json] 9 | DataServiceVersion: [3.0;NetFx] 10 | MaxDataServiceVersion: ['3.0'] 11 | Prefer: [return-no-content] 12 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 13 | x-ms-client-request-id: [e7809fda-c5c0-11e7-a79a-a08cfdf04b77] 14 | x-ms-date: ['Fri, 10 Nov 2017 02:43:16 GMT'] 15 | x-ms-version: ['2017-04-17'] 16 | method: POST 17 | uri: https://storagename.table.core.windows.net/Tables 18 | response: 19 | body: {string: ''} 20 | headers: 21 | Cache-Control: [no-cache] 22 | Content-Length: ['0'] 23 | DataServiceId: ['https://storagename.table.core.windows.net/Tables(''table898d16dd'')'] 24 | Date: ['Fri, 10 Nov 2017 02:43:16 GMT'] 25 | Location: ['https://storagename.table.core.windows.net/Tables(''table898d16dd'')'] 26 | Preference-Applied: [return-no-content] 27 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 28 | X-Content-Type-Options: [nosniff] 29 | x-ms-request-id: [b000421b-0002-00eb-68cd-595d86000000] 30 | x-ms-version: ['2017-04-17'] 31 | status: {code: 204, message: No Content} 32 | - request: 33 | body: '{"TableName": "table898d16dd"}' 34 | headers: 35 | Accept: [application/json;odata=minimalmetadata] 36 | Connection: [keep-alive] 37 | Content-Length: ['30'] 38 | Content-Type: [application/json] 39 | DataServiceVersion: [3.0;NetFx] 40 | MaxDataServiceVersion: ['3.0'] 41 | Prefer: [return-no-content] 42 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 43 | x-ms-client-request-id: [e7ba57f4-c5c0-11e7-a176-a08cfdf04b77] 44 | x-ms-date: ['Fri, 10 Nov 2017 02:43:17 GMT'] 45 | x-ms-version: ['2017-04-17'] 46 | method: POST 47 | uri: https://storagename.table.core.windows.net/Tables 48 | response: 49 | body: {string: '{"odata.error":{"code":"TableAlreadyExists","message":{"lang":"en-US","value":"The 50 | table specified already exists.\nRequestId:b0004225-0002-00eb-6fcd-595d86000000\nTime:2017-11-10T02:43:17.0871992Z"}}}'} 51 | headers: 52 | Cache-Control: [no-cache] 53 | Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] 54 | Date: ['Fri, 10 Nov 2017 02:43:16 GMT'] 55 | Preference-Applied: [return-no-content] 56 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 57 | Transfer-Encoding: [chunked] 58 | X-Content-Type-Options: [nosniff] 59 | x-ms-request-id: [b0004225-0002-00eb-6fcd-595d86000000] 60 | x-ms-version: ['2017-04-17'] 61 | status: {code: 409, message: Conflict} 62 | - request: 63 | body: null 64 | headers: 65 | Accept: [application/json;odata=nometadata] 66 | Connection: [keep-alive] 67 | DataServiceVersion: [3.0;NetFx] 68 | MaxDataServiceVersion: ['3.0'] 69 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 70 | x-ms-client-request-id: [e7c927a8-c5c0-11e7-a72d-a08cfdf04b77] 71 | x-ms-date: ['Fri, 10 Nov 2017 02:43:17 GMT'] 72 | x-ms-version: ['2017-04-17'] 73 | method: GET 74 | uri: https://storagename.table.core.windows.net/Tables('table898d16dd') 75 | response: 76 | body: {string: '{"TableName":"table898d16dd"}'} 77 | headers: 78 | Cache-Control: [no-cache] 79 | Content-Type: [application/json;odata=nometadata;streaming=true;charset=utf-8] 80 | Date: ['Fri, 10 Nov 2017 02:43:16 GMT'] 81 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 82 | Transfer-Encoding: [chunked] 83 | X-Content-Type-Options: [nosniff] 84 | x-ms-request-id: [b000422f-0002-00eb-77cd-595d86000000] 85 | x-ms-version: ['2017-04-17'] 86 | status: {code: 200, message: OK} 87 | version: 1 88 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table.test_create_table_with_already_existing_table_fail_on_exist.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"TableName": "tablef3d21ca0"}' 4 | headers: 5 | Accept: [application/json;odata=minimalmetadata] 6 | Connection: [keep-alive] 7 | Content-Length: ['30'] 8 | Content-Type: [application/json] 9 | DataServiceVersion: [3.0;NetFx] 10 | MaxDataServiceVersion: ['3.0'] 11 | Prefer: [return-no-content] 12 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 13 | x-ms-client-request-id: [e817f250-c5c0-11e7-9fe6-a08cfdf04b77] 14 | x-ms-date: ['Fri, 10 Nov 2017 02:43:17 GMT'] 15 | x-ms-version: ['2017-04-17'] 16 | method: POST 17 | uri: https://storagename.table.core.windows.net/Tables 18 | response: 19 | body: {string: ''} 20 | headers: 21 | Cache-Control: [no-cache] 22 | Content-Length: ['0'] 23 | DataServiceId: ['https://storagename.table.core.windows.net/Tables(''tablef3d21ca0'')'] 24 | Date: ['Fri, 10 Nov 2017 02:43:17 GMT'] 25 | Location: ['https://storagename.table.core.windows.net/Tables(''tablef3d21ca0'')'] 26 | Preference-Applied: [return-no-content] 27 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 28 | X-Content-Type-Options: [nosniff] 29 | x-ms-request-id: [df5321bd-0002-00c9-55cd-5933b0000000] 30 | x-ms-version: ['2017-04-17'] 31 | status: {code: 204, message: No Content} 32 | - request: 33 | body: '{"TableName": "tablef3d21ca0"}' 34 | headers: 35 | Accept: [application/json;odata=minimalmetadata] 36 | Connection: [keep-alive] 37 | Content-Length: ['30'] 38 | Content-Type: [application/json] 39 | DataServiceVersion: [3.0;NetFx] 40 | MaxDataServiceVersion: ['3.0'] 41 | Prefer: [return-no-content] 42 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 43 | x-ms-client-request-id: [e852e318-c5c0-11e7-9bff-a08cfdf04b77] 44 | x-ms-date: ['Fri, 10 Nov 2017 02:43:18 GMT'] 45 | x-ms-version: ['2017-04-17'] 46 | method: POST 47 | uri: https://storagename.table.core.windows.net/Tables 48 | response: 49 | body: {string: '{"odata.error":{"code":"TableAlreadyExists","message":{"lang":"en-US","value":"The 50 | table specified already exists.\nRequestId:df5321c5-0002-00c9-5bcd-5933b0000000\nTime:2017-11-10T02:43:17.9929077Z"}}}'} 51 | headers: 52 | Cache-Control: [no-cache] 53 | Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] 54 | Date: ['Fri, 10 Nov 2017 02:43:17 GMT'] 55 | Preference-Applied: [return-no-content] 56 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 57 | Transfer-Encoding: [chunked] 58 | X-Content-Type-Options: [nosniff] 59 | x-ms-request-id: [df5321c5-0002-00c9-5bcd-5933b0000000] 60 | x-ms-version: ['2017-04-17'] 61 | status: {code: 409, message: Conflict} 62 | version: 1 63 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table.test_delete_table_with_existing_table.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"TableName": "tableded1139b"}' 4 | headers: 5 | Accept: [application/json;odata=minimalmetadata] 6 | Connection: [keep-alive] 7 | Content-Length: ['30'] 8 | Content-Type: [application/json] 9 | DataServiceVersion: [3.0;NetFx] 10 | MaxDataServiceVersion: ['3.0'] 11 | Prefer: [return-no-content] 12 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 13 | x-ms-client-request-id: [e8a171fa-c5c0-11e7-bfb1-a08cfdf04b77] 14 | x-ms-date: ['Fri, 10 Nov 2017 02:43:18 GMT'] 15 | x-ms-version: ['2017-04-17'] 16 | method: POST 17 | uri: https://storagename.table.core.windows.net/Tables 18 | response: 19 | body: {string: ''} 20 | headers: 21 | Cache-Control: [no-cache] 22 | Content-Length: ['0'] 23 | DataServiceId: ['https://storagename.table.core.windows.net/Tables(''tableded1139b'')'] 24 | Date: ['Fri, 10 Nov 2017 02:43:18 GMT'] 25 | Location: ['https://storagename.table.core.windows.net/Tables(''tableded1139b'')'] 26 | Preference-Applied: [return-no-content] 27 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 28 | X-Content-Type-Options: [nosniff] 29 | x-ms-request-id: [eba82522-0002-00a7-1fcd-599a99000000] 30 | x-ms-version: ['2017-04-17'] 31 | status: {code: 204, message: No Content} 32 | - request: 33 | body: null 34 | headers: 35 | Accept: [application/json;odata=minimalmetadata] 36 | Connection: [keep-alive] 37 | Content-Length: ['0'] 38 | DataServiceVersion: [3.0;NetFx] 39 | MaxDataServiceVersion: ['3.0'] 40 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 41 | x-ms-client-request-id: [e8d97e08-c5c0-11e7-a289-a08cfdf04b77] 42 | x-ms-date: ['Fri, 10 Nov 2017 02:43:18 GMT'] 43 | x-ms-version: ['2017-04-17'] 44 | method: DELETE 45 | uri: https://storagename.table.core.windows.net/Tables('tableded1139b') 46 | response: 47 | body: {string: ''} 48 | headers: 49 | Cache-Control: [no-cache] 50 | Content-Length: ['0'] 51 | Date: ['Fri, 10 Nov 2017 02:43:18 GMT'] 52 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 53 | X-Content-Type-Options: [nosniff] 54 | x-ms-request-id: [eba8252f-0002-00a7-2acd-599a99000000] 55 | x-ms-version: ['2017-04-17'] 56 | status: {code: 204, message: No Content} 57 | - request: 58 | body: null 59 | headers: 60 | Accept: [application/json;odata=nometadata] 61 | Connection: [keep-alive] 62 | DataServiceVersion: [3.0;NetFx] 63 | MaxDataServiceVersion: ['3.0'] 64 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 65 | x-ms-client-request-id: [e8e98688-c5c0-11e7-9673-a08cfdf04b77] 66 | x-ms-date: ['Fri, 10 Nov 2017 02:43:19 GMT'] 67 | x-ms-version: ['2017-04-17'] 68 | method: GET 69 | uri: https://storagename.table.core.windows.net/Tables('tableded1139b') 70 | response: 71 | body: {string: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The 72 | specified resource does not exist.\nRequestId:eba82537-0002-00a7-32cd-599a99000000\nTime:2017-11-10T02:43:19.0614210Z"}}}'} 73 | headers: 74 | Cache-Control: [no-cache] 75 | Content-Type: [application/json;odata=nometadata;streaming=true;charset=utf-8] 76 | Date: ['Fri, 10 Nov 2017 02:43:18 GMT'] 77 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 78 | Transfer-Encoding: [chunked] 79 | X-Content-Type-Options: [nosniff] 80 | x-ms-request-id: [eba82537-0002-00a7-32cd-599a99000000] 81 | x-ms-version: ['2017-04-17'] 82 | status: {code: 404, message: Not Found} 83 | version: 1 84 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table.test_delete_table_with_existing_table_fail_not_exist.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"TableName": "table358619d2"}' 4 | headers: 5 | Accept: [application/json;odata=minimalmetadata] 6 | Connection: [keep-alive] 7 | Content-Length: ['30'] 8 | Content-Type: [application/json] 9 | DataServiceVersion: [3.0;NetFx] 10 | MaxDataServiceVersion: ['3.0'] 11 | Prefer: [return-no-content] 12 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 13 | x-ms-client-request-id: [e9389f46-c5c0-11e7-b805-a08cfdf04b77] 14 | x-ms-date: ['Fri, 10 Nov 2017 02:43:19 GMT'] 15 | x-ms-version: ['2017-04-17'] 16 | method: POST 17 | uri: https://storagename.table.core.windows.net/Tables 18 | response: 19 | body: {string: ''} 20 | headers: 21 | Cache-Control: [no-cache] 22 | Content-Length: ['0'] 23 | DataServiceId: ['https://storagename.table.core.windows.net/Tables(''table358619d2'')'] 24 | Date: ['Fri, 10 Nov 2017 02:43:18 GMT'] 25 | Location: ['https://storagename.table.core.windows.net/Tables(''table358619d2'')'] 26 | Preference-Applied: [return-no-content] 27 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 28 | X-Content-Type-Options: [nosniff] 29 | x-ms-request-id: [ab9493c4-0002-001f-6ccd-59786a000000] 30 | x-ms-version: ['2017-04-17'] 31 | status: {code: 204, message: No Content} 32 | - request: 33 | body: null 34 | headers: 35 | Accept: [application/json;odata=minimalmetadata] 36 | Connection: [keep-alive] 37 | Content-Length: ['0'] 38 | DataServiceVersion: [3.0;NetFx] 39 | MaxDataServiceVersion: ['3.0'] 40 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 41 | x-ms-client-request-id: [e978869a-c5c0-11e7-bc5a-a08cfdf04b77] 42 | x-ms-date: ['Fri, 10 Nov 2017 02:43:19 GMT'] 43 | x-ms-version: ['2017-04-17'] 44 | method: DELETE 45 | uri: https://storagename.table.core.windows.net/Tables('table358619d2') 46 | response: 47 | body: {string: ''} 48 | headers: 49 | Cache-Control: [no-cache] 50 | Content-Length: ['0'] 51 | Date: ['Fri, 10 Nov 2017 02:43:18 GMT'] 52 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 53 | X-Content-Type-Options: [nosniff] 54 | x-ms-request-id: [ab9493d9-0002-001f-7fcd-59786a000000] 55 | x-ms-version: ['2017-04-17'] 56 | status: {code: 204, message: No Content} 57 | - request: 58 | body: null 59 | headers: 60 | Accept: [application/json;odata=nometadata] 61 | Connection: [keep-alive] 62 | DataServiceVersion: [3.0;NetFx] 63 | MaxDataServiceVersion: ['3.0'] 64 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 65 | x-ms-client-request-id: [e9892b74-c5c0-11e7-8261-a08cfdf04b77] 66 | x-ms-date: ['Fri, 10 Nov 2017 02:43:20 GMT'] 67 | x-ms-version: ['2017-04-17'] 68 | method: GET 69 | uri: https://storagename.table.core.windows.net/Tables('table358619d2') 70 | response: 71 | body: {string: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The 72 | specified resource does not exist.\nRequestId:ab9493ea-0002-001f-10cd-59786a000000\nTime:2017-11-10T02:43:19.9100797Z"}}}'} 73 | headers: 74 | Cache-Control: [no-cache] 75 | Content-Type: [application/json;odata=nometadata;streaming=true;charset=utf-8] 76 | Date: ['Fri, 10 Nov 2017 02:43:18 GMT'] 77 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 78 | Transfer-Encoding: [chunked] 79 | X-Content-Type-Options: [nosniff] 80 | x-ms-request-id: [ab9493ea-0002-001f-10cd-59786a000000] 81 | x-ms-version: ['2017-04-17'] 82 | status: {code: 404, message: Not Found} 83 | version: 1 84 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table.test_delete_table_with_non_existing_table.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: null 4 | headers: 5 | Accept: [application/json;odata=minimalmetadata] 6 | Connection: [keep-alive] 7 | Content-Length: ['0'] 8 | DataServiceVersion: [3.0;NetFx] 9 | MaxDataServiceVersion: ['3.0'] 10 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 11 | x-ms-client-request-id: [e9d8e078-c5c0-11e7-8a6e-a08cfdf04b77] 12 | x-ms-date: ['Fri, 10 Nov 2017 02:43:20 GMT'] 13 | x-ms-version: ['2017-04-17'] 14 | method: DELETE 15 | uri: https://storagename.table.core.windows.net/Tables('table31901545') 16 | response: 17 | body: {string: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The 18 | specified resource does not exist.\nRequestId:5849a522-0002-00d9-45cd-590556000000\nTime:2017-11-10T02:43:20.8414406Z"}}}'} 19 | headers: 20 | Cache-Control: [no-cache] 21 | Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] 22 | Date: ['Fri, 10 Nov 2017 02:43:20 GMT'] 23 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 24 | Transfer-Encoding: [chunked] 25 | X-Content-Type-Options: [nosniff] 26 | x-ms-request-id: [5849a522-0002-00d9-45cd-590556000000] 27 | x-ms-version: ['2017-04-17'] 28 | status: {code: 404, message: Not Found} 29 | version: 1 30 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table.test_delete_table_with_non_existing_table_fail_not_exist.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: null 4 | headers: 5 | Accept: [application/json;odata=minimalmetadata] 6 | Connection: [keep-alive] 7 | Content-Length: ['0'] 8 | DataServiceVersion: [3.0;NetFx] 9 | MaxDataServiceVersion: ['3.0'] 10 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 11 | x-ms-client-request-id: [ea4fd462-c5c0-11e7-a5c5-a08cfdf04b77] 12 | x-ms-date: ['Fri, 10 Nov 2017 02:43:21 GMT'] 13 | x-ms-version: ['2017-04-17'] 14 | method: DELETE 15 | uri: https://storagename.table.core.windows.net/Tables('tablea12c1b7c') 16 | response: 17 | body: {string: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The 18 | specified resource does not exist.\nRequestId:8c6aad25-0002-00cc-53cd-59c7cf000000\nTime:2017-11-10T02:43:21.5548576Z"}}}'} 19 | headers: 20 | Cache-Control: [no-cache] 21 | Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] 22 | Date: ['Fri, 10 Nov 2017 02:43:21 GMT'] 23 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 24 | Transfer-Encoding: [chunked] 25 | X-Content-Type-Options: [nosniff] 26 | x-ms-request-id: [8c6aad25-0002-00cc-53cd-59c7cf000000] 27 | x-ms-version: ['2017-04-17'] 28 | status: {code: 404, message: Not Found} 29 | version: 1 30 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table.test_get_table_acl.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"TableName": "tableb07a0bab"}' 4 | headers: 5 | Accept: [application/json;odata=minimalmetadata] 6 | Connection: [keep-alive] 7 | Content-Length: ['30'] 8 | Content-Type: [application/json] 9 | DataServiceVersion: [3.0;NetFx] 10 | MaxDataServiceVersion: ['3.0'] 11 | Prefer: [return-no-content] 12 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 13 | x-ms-client-request-id: [eac78a92-c5c0-11e7-8886-a08cfdf04b77] 14 | x-ms-date: ['Fri, 10 Nov 2017 02:43:22 GMT'] 15 | x-ms-version: ['2017-04-17'] 16 | method: POST 17 | uri: https://storagename.table.core.windows.net/Tables 18 | response: 19 | body: {string: ''} 20 | headers: 21 | Cache-Control: [no-cache] 22 | Content-Length: ['0'] 23 | DataServiceId: ['https://storagename.table.core.windows.net/Tables(''tableb07a0bab'')'] 24 | Date: ['Fri, 10 Nov 2017 02:43:22 GMT'] 25 | Location: ['https://storagename.table.core.windows.net/Tables(''tableb07a0bab'')'] 26 | Preference-Applied: [return-no-content] 27 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 28 | X-Content-Type-Options: [nosniff] 29 | x-ms-request-id: [4ca53153-0002-010c-01cd-590bde000000] 30 | x-ms-version: ['2017-04-17'] 31 | status: {code: 204, message: No Content} 32 | - request: 33 | body: null 34 | headers: 35 | Connection: [keep-alive] 36 | DataServiceVersion: [3.0;NetFx] 37 | MaxDataServiceVersion: ['3.0'] 38 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 39 | x-ms-client-request-id: [eb025540-c5c0-11e7-b962-a08cfdf04b77] 40 | x-ms-date: ['Fri, 10 Nov 2017 02:43:22 GMT'] 41 | x-ms-version: ['2017-04-17'] 42 | method: GET 43 | uri: https://storagename.table.core.windows.net/tableb07a0bab?comp=acl 44 | response: 45 | body: {string: "\uFEFF"} 47 | headers: 48 | Content-Type: [application/xml] 49 | Date: ['Fri, 10 Nov 2017 02:43:22 GMT'] 50 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 51 | Transfer-Encoding: [chunked] 52 | x-ms-request-id: [4ca53165-0002-010c-11cd-590bde000000] 53 | x-ms-version: ['2017-04-17'] 54 | status: {code: 200, message: OK} 55 | version: 1 56 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table.test_list_tables.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"TableName": "table9a730b0b"}' 4 | headers: 5 | Accept: [application/json;odata=minimalmetadata] 6 | Connection: [keep-alive] 7 | Content-Length: ['30'] 8 | Content-Type: [application/json] 9 | DataServiceVersion: [3.0;NetFx] 10 | MaxDataServiceVersion: ['3.0'] 11 | Prefer: [return-no-content] 12 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 13 | x-ms-client-request-id: [eb4eecf6-c5c0-11e7-8f4b-a08cfdf04b77] 14 | x-ms-date: ['Fri, 10 Nov 2017 02:43:23 GMT'] 15 | x-ms-version: ['2017-04-17'] 16 | method: POST 17 | uri: https://storagename.table.core.windows.net/Tables 18 | response: 19 | body: {string: ''} 20 | headers: 21 | Cache-Control: [no-cache] 22 | Content-Length: ['0'] 23 | DataServiceId: ['https://storagename.table.core.windows.net/Tables(''table9a730b0b'')'] 24 | Date: ['Fri, 10 Nov 2017 02:43:23 GMT'] 25 | Location: ['https://storagename.table.core.windows.net/Tables(''table9a730b0b'')'] 26 | Preference-Applied: [return-no-content] 27 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 28 | X-Content-Type-Options: [nosniff] 29 | x-ms-request-id: [24daf337-0002-00c2-4ecd-592bc4000000] 30 | x-ms-version: ['2017-04-17'] 31 | status: {code: 204, message: No Content} 32 | - request: 33 | body: null 34 | headers: 35 | Accept: [application/json;odata=nometadata] 36 | Connection: [keep-alive] 37 | DataServiceVersion: [3.0;NetFx] 38 | MaxDataServiceVersion: ['3.0'] 39 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 40 | x-ms-client-request-id: [eb881bde-c5c0-11e7-90b9-a08cfdf04b77] 41 | x-ms-date: ['Fri, 10 Nov 2017 02:43:23 GMT'] 42 | x-ms-version: ['2017-04-17'] 43 | method: GET 44 | uri: https://storagename.table.core.windows.net/Tables 45 | response: 46 | body: {string: '{"value":[{"TableName":"table01195b113b204be595f426a2aec78bf6"},{"TableName":"table9a730b0b"},{"TableName":"tablede242129942d48a9a6c8fb95a1e0b702"},{"TableName":"uttable147696b0a84b4d129b92e01c32d61e2c"},{"TableName":"uttable260bee0fc9364a258a7b0d2c231adc7e"},{"TableName":"uttable456c2ab55d594c22b2983a86a886aa40"},{"TableName":"uttable51401595465842d9a5c7d0cd6c3286d9"},{"TableName":"uttable705d1801cf5b414d8c94334c5972a879"},{"TableName":"uttablec9b0fccf789f494585f62f02cdc97b39"},{"TableName":"uttablee4cf9e5f2fe2453f9633da94847caf30"}]}'} 47 | headers: 48 | Cache-Control: [no-cache] 49 | Content-Type: [application/json;odata=nometadata;streaming=true;charset=utf-8] 50 | Date: ['Fri, 10 Nov 2017 02:43:23 GMT'] 51 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 52 | Transfer-Encoding: [chunked] 53 | X-Content-Type-Options: [nosniff] 54 | x-ms-request-id: [24daf34e-0002-00c2-63cd-592bc4000000] 55 | x-ms-version: ['2017-04-17'] 56 | status: {code: 200, message: OK} 57 | version: 1 58 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table.test_locale.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: null 4 | headers: 5 | Accept: [application/json;odata=nometadata] 6 | Connection: [keep-alive] 7 | DataServiceVersion: [3.0;NetFx] 8 | MaxDataServiceVersion: ['3.0'] 9 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 10 | x-ms-client-request-id: [edad99ee-c5c0-11e7-836c-a08cfdf04b77] 11 | x-ms-date: ['Fri, 10 Nov 2017 02:43:27 GMT'] 12 | x-ms-version: ['2017-04-17'] 13 | method: GET 14 | uri: https://storagename.table.core.windows.net/Tables 15 | response: 16 | body: {string: '{"value":[{"TableName":"table01195b113b204be595f426a2aec78bf6"},{"TableName":"tablede242129942d48a9a6c8fb95a1e0b702"},{"TableName":"uttable147696b0a84b4d129b92e01c32d61e2c"},{"TableName":"uttable260bee0fc9364a258a7b0d2c231adc7e"},{"TableName":"uttable456c2ab55d594c22b2983a86a886aa40"},{"TableName":"uttable51401595465842d9a5c7d0cd6c3286d9"},{"TableName":"uttable705d1801cf5b414d8c94334c5972a879"},{"TableName":"uttablec9b0fccf789f494585f62f02cdc97b39"},{"TableName":"uttablee4cf9e5f2fe2453f9633da94847caf30"}]}'} 17 | headers: 18 | Cache-Control: [no-cache] 19 | Content-Type: [application/json;odata=nometadata;streaming=true;charset=utf-8] 20 | Date: ['Fri, 10 Nov 2017 02:43:27 GMT'] 21 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 22 | Transfer-Encoding: [chunked] 23 | X-Content-Type-Options: [nosniff] 24 | x-ms-request-id: [a96f899e-0002-005b-0acd-59a406000000] 25 | x-ms-version: ['2017-04-17'] 26 | status: {code: 200, message: OK} 27 | version: 1 28 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table.test_set_table_acl.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"TableName": "tableb1160bb7"}' 4 | headers: 5 | Accept: [application/json;odata=minimalmetadata] 6 | Connection: [keep-alive] 7 | Content-Length: ['30'] 8 | Content-Type: [application/json] 9 | DataServiceVersion: [3.0;NetFx] 10 | MaxDataServiceVersion: ['3.0'] 11 | Prefer: [return-no-content] 12 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 13 | x-ms-client-request-id: [edeba028-c5c0-11e7-b70f-a08cfdf04b77] 14 | x-ms-date: ['Fri, 10 Nov 2017 02:43:27 GMT'] 15 | x-ms-version: ['2017-04-17'] 16 | method: POST 17 | uri: https://storagename.table.core.windows.net/Tables 18 | response: 19 | body: {string: ''} 20 | headers: 21 | Cache-Control: [no-cache] 22 | Content-Length: ['0'] 23 | DataServiceId: ['https://storagename.table.core.windows.net/Tables(''tableb1160bb7'')'] 24 | Date: ['Fri, 10 Nov 2017 02:43:27 GMT'] 25 | Location: ['https://storagename.table.core.windows.net/Tables(''tableb1160bb7'')'] 26 | Preference-Applied: [return-no-content] 27 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 28 | X-Content-Type-Options: [nosniff] 29 | x-ms-request-id: [999abc81-0002-00fa-48cd-596a9d000000] 30 | x-ms-version: ['2017-04-17'] 31 | status: {code: 204, message: No Content} 32 | - request: 33 | body: null 34 | headers: 35 | Connection: [keep-alive] 36 | Content-Length: ['0'] 37 | DataServiceVersion: [3.0;NetFx] 38 | MaxDataServiceVersion: ['3.0'] 39 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 40 | x-ms-client-request-id: [ee24cf9a-c5c0-11e7-bd34-a08cfdf04b77] 41 | x-ms-date: ['Fri, 10 Nov 2017 02:43:27 GMT'] 42 | x-ms-version: ['2017-04-17'] 43 | method: PUT 44 | uri: https://storagename.table.core.windows.net/tableb1160bb7?comp=acl 45 | response: 46 | body: {string: ''} 47 | headers: 48 | Content-Length: ['0'] 49 | Date: ['Fri, 10 Nov 2017 02:43:27 GMT'] 50 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 51 | x-ms-request-id: [999abc8e-0002-00fa-52cd-596a9d000000] 52 | x-ms-version: ['2017-04-17'] 53 | status: {code: 204, message: No Content} 54 | - request: 55 | body: null 56 | headers: 57 | Connection: [keep-alive] 58 | DataServiceVersion: [3.0;NetFx] 59 | MaxDataServiceVersion: ['3.0'] 60 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 61 | x-ms-client-request-id: [ee3489f6-c5c0-11e7-afc0-a08cfdf04b77] 62 | x-ms-date: ['Fri, 10 Nov 2017 02:43:27 GMT'] 63 | x-ms-version: ['2017-04-17'] 64 | method: GET 65 | uri: https://storagename.table.core.windows.net/tableb1160bb7?comp=acl 66 | response: 67 | body: {string: "\uFEFF"} 69 | headers: 70 | Content-Type: [application/xml] 71 | Date: ['Fri, 10 Nov 2017 02:43:27 GMT'] 72 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 73 | Transfer-Encoding: [chunked] 74 | x-ms-request-id: [999abc94-0002-00fa-58cd-596a9d000000] 75 | x-ms-version: ['2017-04-17'] 76 | status: {code: 200, message: OK} 77 | version: 1 78 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table.test_set_table_acl_too_many_ids.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"TableName": "table6f17111b"}' 4 | headers: 5 | Accept: [application/json;odata=minimalmetadata] 6 | Connection: [keep-alive] 7 | Content-Length: ['30'] 8 | Content-Type: [application/json] 9 | DataServiceVersion: [3.0;NetFx] 10 | MaxDataServiceVersion: ['3.0'] 11 | Prefer: [return-no-content] 12 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 13 | x-ms-client-request-id: [ee894ac0-c5c0-11e7-89a6-a08cfdf04b77] 14 | x-ms-date: ['Fri, 10 Nov 2017 02:43:28 GMT'] 15 | x-ms-version: ['2017-04-17'] 16 | method: POST 17 | uri: https://storagename.table.core.windows.net/Tables 18 | response: 19 | body: {string: ''} 20 | headers: 21 | Cache-Control: [no-cache] 22 | Content-Length: ['0'] 23 | DataServiceId: ['https://storagename.table.core.windows.net/Tables(''table6f17111b'')'] 24 | Date: ['Fri, 10 Nov 2017 02:43:28 GMT'] 25 | Location: ['https://storagename.table.core.windows.net/Tables(''table6f17111b'')'] 26 | Preference-Applied: [return-no-content] 27 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 28 | X-Content-Type-Options: [nosniff] 29 | x-ms-request-id: [0f56a033-0002-008b-71cd-5918a4000000] 30 | x-ms-version: ['2017-04-17'] 31 | status: {code: 204, message: No Content} 32 | version: 1 33 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table.test_set_table_acl_with_empty_signed_identifier.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"TableName": "tableb9bd17bb"}' 4 | headers: 5 | Accept: [application/json;odata=minimalmetadata] 6 | Connection: [keep-alive] 7 | Content-Length: ['30'] 8 | Content-Type: [application/json] 9 | DataServiceVersion: [3.0;NetFx] 10 | MaxDataServiceVersion: ['3.0'] 11 | Prefer: [return-no-content] 12 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 13 | x-ms-client-request-id: [ef045d6c-c5c0-11e7-97fb-a08cfdf04b77] 14 | x-ms-date: ['Fri, 10 Nov 2017 02:43:29 GMT'] 15 | x-ms-version: ['2017-04-17'] 16 | method: POST 17 | uri: https://storagename.table.core.windows.net/Tables 18 | response: 19 | body: {string: ''} 20 | headers: 21 | Cache-Control: [no-cache] 22 | Content-Length: ['0'] 23 | DataServiceId: ['https://storagename.table.core.windows.net/Tables(''tableb9bd17bb'')'] 24 | Date: ['Fri, 10 Nov 2017 02:43:29 GMT'] 25 | Location: ['https://storagename.table.core.windows.net/Tables(''tableb9bd17bb'')'] 26 | Preference-Applied: [return-no-content] 27 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 28 | X-Content-Type-Options: [nosniff] 29 | x-ms-request-id: [196c1a5b-0002-002e-52cd-5923bd000000] 30 | x-ms-version: ['2017-04-17'] 31 | status: {code: 204, message: No Content} 32 | - request: 33 | body: ' 34 | 35 | empty' 36 | headers: 37 | Connection: [keep-alive] 38 | Content-Length: ['145'] 39 | DataServiceVersion: [3.0;NetFx] 40 | MaxDataServiceVersion: ['3.0'] 41 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 42 | x-ms-client-request-id: [ef7c687e-c5c0-11e7-9c03-a08cfdf04b77] 43 | x-ms-date: ['Fri, 10 Nov 2017 02:43:30 GMT'] 44 | x-ms-version: ['2017-04-17'] 45 | method: PUT 46 | uri: https://storagename.table.core.windows.net/tableb9bd17bb?comp=acl 47 | response: 48 | body: {string: ''} 49 | headers: 50 | Content-Length: ['0'] 51 | Date: ['Fri, 10 Nov 2017 02:43:29 GMT'] 52 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 53 | x-ms-request-id: [196c1ab1-0002-002e-1ccd-5923bd000000] 54 | x-ms-version: ['2017-04-17'] 55 | status: {code: 204, message: No Content} 56 | - request: 57 | body: null 58 | headers: 59 | Connection: [keep-alive] 60 | DataServiceVersion: [3.0;NetFx] 61 | MaxDataServiceVersion: ['3.0'] 62 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 63 | x-ms-client-request-id: [ef8afc8c-c5c0-11e7-8449-a08cfdf04b77] 64 | x-ms-date: ['Fri, 10 Nov 2017 02:43:30 GMT'] 65 | x-ms-version: ['2017-04-17'] 66 | method: GET 67 | uri: https://storagename.table.core.windows.net/tableb9bd17bb?comp=acl 68 | response: 69 | body: {string: "\uFEFFempty"} 70 | headers: 71 | Content-Type: [application/xml] 72 | Date: ['Fri, 10 Nov 2017 02:43:29 GMT'] 73 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 74 | Transfer-Encoding: [chunked] 75 | x-ms-request-id: [196c1abf-0002-002e-2acd-5923bd000000] 76 | x-ms-version: ['2017-04-17'] 77 | status: {code: 200, message: OK} 78 | version: 1 79 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table.test_set_table_acl_with_empty_signed_identifiers.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"TableName": "tabled1eb182e"}' 4 | headers: 5 | Accept: [application/json;odata=minimalmetadata] 6 | Connection: [keep-alive] 7 | Content-Length: ['30'] 8 | Content-Type: [application/json] 9 | DataServiceVersion: [3.0;NetFx] 10 | MaxDataServiceVersion: ['3.0'] 11 | Prefer: [return-no-content] 12 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 13 | x-ms-client-request-id: [efd8a218-c5c0-11e7-bda3-a08cfdf04b77] 14 | x-ms-date: ['Fri, 10 Nov 2017 02:43:30 GMT'] 15 | x-ms-version: ['2017-04-17'] 16 | method: POST 17 | uri: https://storagename.table.core.windows.net/Tables 18 | response: 19 | body: {string: ''} 20 | headers: 21 | Cache-Control: [no-cache] 22 | Content-Length: ['0'] 23 | DataServiceId: ['https://storagename.table.core.windows.net/Tables(''tabled1eb182e'')'] 24 | Date: ['Fri, 10 Nov 2017 02:43:30 GMT'] 25 | Location: ['https://storagename.table.core.windows.net/Tables(''tabled1eb182e'')'] 26 | Preference-Applied: [return-no-content] 27 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 28 | X-Content-Type-Options: [nosniff] 29 | x-ms-request-id: [46dbf534-0002-00af-12cd-5981ea000000] 30 | x-ms-version: ['2017-04-17'] 31 | status: {code: 204, message: No Content} 32 | - request: 33 | body: ' 34 | 35 | ' 36 | headers: 37 | Connection: [keep-alive] 38 | Content-Length: ['60'] 39 | DataServiceVersion: [3.0;NetFx] 40 | MaxDataServiceVersion: ['3.0'] 41 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 42 | x-ms-client-request-id: [f012e40c-c5c0-11e7-9e43-a08cfdf04b77] 43 | x-ms-date: ['Fri, 10 Nov 2017 02:43:31 GMT'] 44 | x-ms-version: ['2017-04-17'] 45 | method: PUT 46 | uri: https://storagename.table.core.windows.net/tabled1eb182e?comp=acl 47 | response: 48 | body: {string: ''} 49 | headers: 50 | Content-Length: ['0'] 51 | Date: ['Fri, 10 Nov 2017 02:43:30 GMT'] 52 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 53 | x-ms-request-id: [46dbf548-0002-00af-22cd-5981ea000000] 54 | x-ms-version: ['2017-04-17'] 55 | status: {code: 204, message: No Content} 56 | - request: 57 | body: null 58 | headers: 59 | Connection: [keep-alive] 60 | DataServiceVersion: [3.0;NetFx] 61 | MaxDataServiceVersion: ['3.0'] 62 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 63 | x-ms-client-request-id: [f022c570-c5c0-11e7-8de8-a08cfdf04b77] 64 | x-ms-date: ['Fri, 10 Nov 2017 02:43:31 GMT'] 65 | x-ms-version: ['2017-04-17'] 66 | method: GET 67 | uri: https://storagename.table.core.windows.net/tabled1eb182e?comp=acl 68 | response: 69 | body: {string: "\uFEFF"} 71 | headers: 72 | Content-Type: [application/xml] 73 | Date: ['Fri, 10 Nov 2017 02:43:31 GMT'] 74 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 75 | Transfer-Encoding: [chunked] 76 | x-ms-request-id: [46dbf563-0002-00af-3dcd-5981ea000000] 77 | x-ms-version: ['2017-04-17'] 78 | status: {code: 200, message: OK} 79 | version: 1 80 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table.test_set_table_acl_with_signed_identifiers.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"TableName": "table45dd15a0"}' 4 | headers: 5 | Accept: [application/json;odata=minimalmetadata] 6 | Connection: [keep-alive] 7 | Content-Length: ['30'] 8 | Content-Type: [application/json] 9 | DataServiceVersion: [3.0;NetFx] 10 | MaxDataServiceVersion: ['3.0'] 11 | Prefer: [return-no-content] 12 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 13 | x-ms-client-request-id: [f076d518-c5c0-11e7-84d5-a08cfdf04b77] 14 | x-ms-date: ['Fri, 10 Nov 2017 02:43:31 GMT'] 15 | x-ms-version: ['2017-04-17'] 16 | method: POST 17 | uri: https://storagename.table.core.windows.net/Tables 18 | response: 19 | body: {string: ''} 20 | headers: 21 | Cache-Control: [no-cache] 22 | Content-Length: ['0'] 23 | DataServiceId: ['https://storagename.table.core.windows.net/Tables(''table45dd15a0'')'] 24 | Date: ['Fri, 10 Nov 2017 02:43:31 GMT'] 25 | Location: ['https://storagename.table.core.windows.net/Tables(''table45dd15a0'')'] 26 | Preference-Applied: [return-no-content] 27 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 28 | X-Content-Type-Options: [nosniff] 29 | x-ms-request-id: [3c5d7f30-0002-012d-44cd-5966ef000000] 30 | x-ms-version: ['2017-04-17'] 31 | status: {code: 204, message: No Content} 32 | - request: 33 | body: ' 34 | 35 | testid2011-10-112011-10-12r' 36 | headers: 37 | Connection: [keep-alive] 38 | Content-Length: ['237'] 39 | DataServiceVersion: [3.0;NetFx] 40 | MaxDataServiceVersion: ['3.0'] 41 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 42 | x-ms-client-request-id: [f0b0daf4-c5c0-11e7-b874-a08cfdf04b77] 43 | x-ms-date: ['Fri, 10 Nov 2017 02:43:32 GMT'] 44 | x-ms-version: ['2017-04-17'] 45 | method: PUT 46 | uri: https://storagename.table.core.windows.net/table45dd15a0?comp=acl 47 | response: 48 | body: {string: ''} 49 | headers: 50 | Content-Length: ['0'] 51 | Date: ['Fri, 10 Nov 2017 02:43:31 GMT'] 52 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 53 | x-ms-request-id: [3c5d7f3e-0002-012d-4fcd-5966ef000000] 54 | x-ms-version: ['2017-04-17'] 55 | status: {code: 204, message: No Content} 56 | - request: 57 | body: null 58 | headers: 59 | Connection: [keep-alive] 60 | DataServiceVersion: [3.0;NetFx] 61 | MaxDataServiceVersion: ['3.0'] 62 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 63 | x-ms-client-request-id: [f0d9a3ee-c5c0-11e7-82bf-a08cfdf04b77] 64 | x-ms-date: ['Fri, 10 Nov 2017 02:43:32 GMT'] 65 | x-ms-version: ['2017-04-17'] 66 | method: GET 67 | uri: https://storagename.table.core.windows.net/table45dd15a0?comp=acl 68 | response: 69 | body: {string: "\uFEFFtestid2011-10-11T00:00:00.0000000Z2011-10-12T00:00:00.0000000Zr"} 70 | headers: 71 | Content-Type: [application/xml] 72 | Date: ['Fri, 10 Nov 2017 02:43:32 GMT'] 73 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 74 | Transfer-Encoding: [chunked] 75 | x-ms-request-id: [3c5d7f55-0002-012d-66cd-5966ef000000] 76 | x-ms-version: ['2017-04-17'] 77 | status: {code: 200, message: OK} 78 | version: 1 79 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table.test_table_exists.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"TableName": "tablea54a0b7c"}' 4 | headers: 5 | Accept: [application/json;odata=minimalmetadata] 6 | Connection: [keep-alive] 7 | Content-Length: ['30'] 8 | Content-Type: [application/json] 9 | DataServiceVersion: [3.0;NetFx] 10 | MaxDataServiceVersion: ['3.0'] 11 | Prefer: [return-no-content] 12 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 13 | x-ms-client-request-id: [f1442948-c5c0-11e7-b7ba-a08cfdf04b77] 14 | x-ms-date: ['Fri, 10 Nov 2017 02:43:33 GMT'] 15 | x-ms-version: ['2017-04-17'] 16 | method: POST 17 | uri: https://storagename.table.core.windows.net/Tables 18 | response: 19 | body: {string: ''} 20 | headers: 21 | Cache-Control: [no-cache] 22 | Content-Length: ['0'] 23 | DataServiceId: ['https://storagename.table.core.windows.net/Tables(''tablea54a0b7c'')'] 24 | Date: ['Fri, 10 Nov 2017 02:43:33 GMT'] 25 | Location: ['https://storagename.table.core.windows.net/Tables(''tablea54a0b7c'')'] 26 | Preference-Applied: [return-no-content] 27 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 28 | X-Content-Type-Options: [nosniff] 29 | x-ms-request-id: [3d3908e8-0002-006d-4acd-590954000000] 30 | x-ms-version: ['2017-04-17'] 31 | status: {code: 204, message: No Content} 32 | - request: 33 | body: null 34 | headers: 35 | Accept: [application/json;odata=nometadata] 36 | Connection: [keep-alive] 37 | DataServiceVersion: [3.0;NetFx] 38 | MaxDataServiceVersion: ['3.0'] 39 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 40 | x-ms-client-request-id: [f17d0a68-c5c0-11e7-bf5a-a08cfdf04b77] 41 | x-ms-date: ['Fri, 10 Nov 2017 02:43:33 GMT'] 42 | x-ms-version: ['2017-04-17'] 43 | method: GET 44 | uri: https://storagename.table.core.windows.net/Tables('tablea54a0b7c') 45 | response: 46 | body: {string: '{"TableName":"tablea54a0b7c"}'} 47 | headers: 48 | Cache-Control: [no-cache] 49 | Content-Type: [application/json;odata=nometadata;streaming=true;charset=utf-8] 50 | Date: ['Fri, 10 Nov 2017 02:43:33 GMT'] 51 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 52 | Transfer-Encoding: [chunked] 53 | X-Content-Type-Options: [nosniff] 54 | x-ms-request-id: [3d3908fd-0002-006d-5dcd-590954000000] 55 | x-ms-version: ['2017-04-17'] 56 | status: {code: 200, message: OK} 57 | version: 1 58 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table.test_table_not_exists.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: null 4 | headers: 5 | Accept: [application/json;odata=nometadata] 6 | Connection: [keep-alive] 7 | DataServiceVersion: [3.0;NetFx] 8 | MaxDataServiceVersion: ['3.0'] 9 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 10 | x-ms-client-request-id: [f1c9b11e-c5c0-11e7-af3e-a08cfdf04b77] 11 | x-ms-date: ['Fri, 10 Nov 2017 02:43:33 GMT'] 12 | x-ms-version: ['2017-04-17'] 13 | method: GET 14 | uri: https://storagename.table.core.windows.net/Tables('tabled7260d2c') 15 | response: 16 | body: {string: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The 17 | specified resource does not exist.\nRequestId:1267275c-0002-0113-15cd-59d0ce000000\nTime:2017-11-10T02:43:33.7812882Z"}}}'} 18 | headers: 19 | Cache-Control: [no-cache] 20 | Content-Type: [application/json;odata=nometadata;streaming=true;charset=utf-8] 21 | Date: ['Fri, 10 Nov 2017 02:43:33 GMT'] 22 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 23 | Transfer-Encoding: [chunked] 24 | X-Content-Type-Options: [nosniff] 25 | x-ms-request-id: [1267275c-0002-0113-15cd-59d0ce000000] 26 | x-ms-version: ['2017-04-17'] 27 | status: {code: 404, message: Not Found} 28 | version: 1 29 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table.test_unicode_create_table_unicode_name.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"TableName": "\u554a\u9f44\u4e02\u72db\u72dc"}' 4 | headers: 5 | Accept: [application/json;odata=minimalmetadata] 6 | Connection: [keep-alive] 7 | Content-Length: ['47'] 8 | Content-Type: [application/json] 9 | DataServiceVersion: [3.0;NetFx] 10 | MaxDataServiceVersion: ['3.0'] 11 | Prefer: [return-no-content] 12 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 13 | x-ms-client-request-id: [f2402fca-c5c0-11e7-864e-a08cfdf04b77] 14 | x-ms-date: ['Fri, 10 Nov 2017 02:43:34 GMT'] 15 | x-ms-version: ['2017-04-17'] 16 | method: POST 17 | uri: https://storagename.table.core.windows.net/Tables 18 | response: 19 | body: {string: '{"odata.error":{"code":"InvalidResourceName","message":{"lang":"en-US","value":"The 20 | specifed resource name contains invalid characters.\nRequestId:19194c23-0002-008d-1acd-59efdc000000\nTime:2017-11-10T02:43:34.9234020Z"}}}'} 21 | headers: 22 | Cache-Control: [no-cache] 23 | Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] 24 | Date: ['Fri, 10 Nov 2017 02:43:34 GMT'] 25 | Preference-Applied: [return-no-content] 26 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 27 | Transfer-Encoding: [chunked] 28 | X-Content-Type-Options: [nosniff] 29 | x-ms-request-id: [19194c23-0002-008d-1acd-59efdc000000] 30 | x-ms-version: ['2017-04-17'] 31 | status: {code: 400, message: Bad Request} 32 | version: 1 33 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table_batch.test_batch_different_partition_operations_fail.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"PartitionKey": "001", "RowKey": "batch_negative_1", "age": "39", "age@odata.type": 4 | "Edm.Int64", "sex": "male", "married": true, "deceased": false, "optional": 5 | null, "ratio": 3.1, "evenratio": 3.0, "large": "933311100", "large@odata.type": 6 | "Edm.Int64", "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", 7 | "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", "binary": 8 | "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", 9 | "clsid@odata.type": "Edm.Guid"}' 10 | headers: 11 | Accept: [application/json;odata=minimalmetadata] 12 | Connection: [keep-alive] 13 | Content-Length: ['554'] 14 | Content-Type: [application/json] 15 | DataServiceVersion: [3.0;NetFx] 16 | MaxDataServiceVersion: ['3.0'] 17 | Prefer: [return-no-content] 18 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 19 | x-ms-client-request-id: [f5bbf86e-c5c0-11e7-ae24-a08cfdf04b77] 20 | x-ms-date: ['Fri, 10 Nov 2017 02:43:40 GMT'] 21 | x-ms-version: ['2017-04-17'] 22 | method: POST 23 | uri: https://storagename.table.core.windows.net/table32f119c5 24 | response: 25 | body: {string: ''} 26 | headers: 27 | Cache-Control: [no-cache] 28 | Content-Length: ['0'] 29 | DataServiceId: ['https://storagename.table.core.windows.net/table32f119c5(PartitionKey=''001'',RowKey=''batch_negative_1'')'] 30 | Date: ['Fri, 10 Nov 2017 02:43:39 GMT'] 31 | ETag: [W/"datetime'2017-11-10T02%3A43%3A40.4985226Z'"] 32 | Location: ['https://storagename.table.core.windows.net/table32f119c5(PartitionKey=''001'',RowKey=''batch_negative_1'')'] 33 | Preference-Applied: [return-no-content] 34 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 35 | X-Content-Type-Options: [nosniff] 36 | x-ms-request-id: [e9c865df-0002-0027-4bcd-593933000000] 37 | x-ms-version: ['2017-04-17'] 38 | status: {code: 204, message: No Content} 39 | version: 1 40 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table_batch.test_batch_same_row_operations_fail.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"PartitionKey": "001", "RowKey": "batch_negative_1", "age": "39", "age@odata.type": 4 | "Edm.Int64", "sex": "male", "married": true, "deceased": false, "optional": 5 | null, "ratio": 3.1, "evenratio": 3.0, "large": "933311100", "large@odata.type": 6 | "Edm.Int64", "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", 7 | "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", "binary": 8 | "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", 9 | "clsid@odata.type": "Edm.Guid"}' 10 | headers: 11 | Accept: [application/json;odata=minimalmetadata] 12 | Connection: [keep-alive] 13 | Content-Length: ['554'] 14 | Content-Type: [application/json] 15 | DataServiceVersion: [3.0;NetFx] 16 | MaxDataServiceVersion: ['3.0'] 17 | Prefer: [return-no-content] 18 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 19 | x-ms-client-request-id: [fc684074-c5c0-11e7-93b4-a08cfdf04b77] 20 | x-ms-date: ['Fri, 10 Nov 2017 02:43:51 GMT'] 21 | x-ms-version: ['2017-04-17'] 22 | method: POST 23 | uri: https://storagename.table.core.windows.net/table2efa1532 24 | response: 25 | body: {string: ''} 26 | headers: 27 | Cache-Control: [no-cache] 28 | Content-Length: ['0'] 29 | DataServiceId: ['https://storagename.table.core.windows.net/table2efa1532(PartitionKey=''001'',RowKey=''batch_negative_1'')'] 30 | Date: ['Fri, 10 Nov 2017 02:43:50 GMT'] 31 | ETag: [W/"datetime'2017-11-10T02%3A43%3A51.4738807Z'"] 32 | Location: ['https://storagename.table.core.windows.net/table2efa1532(PartitionKey=''001'',RowKey=''batch_negative_1'')'] 33 | Preference-Applied: [return-no-content] 34 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 35 | X-Content-Type-Options: [nosniff] 36 | x-ms-request-id: [10e151bd-0002-005c-54cd-595283000000] 37 | x-ms-version: ['2017-04-17'] 38 | status: {code: 204, message: No Content} 39 | version: 1 40 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table_batch.test_batch_too_many_ops.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"PartitionKey": "001", "RowKey": "batch_negative_1", "age": "39", "age@odata.type": 4 | "Edm.Int64", "sex": "male", "married": true, "deceased": false, "optional": 5 | null, "ratio": 3.1, "evenratio": 3.0, "large": "933311100", "large@odata.type": 6 | "Edm.Int64", "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", 7 | "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", "binary": 8 | "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", 9 | "clsid@odata.type": "Edm.Guid"}' 10 | headers: 11 | Accept: [application/json;odata=minimalmetadata] 12 | Connection: [keep-alive] 13 | Content-Length: ['554'] 14 | Content-Type: [application/json] 15 | DataServiceVersion: [3.0;NetFx] 16 | MaxDataServiceVersion: ['3.0'] 17 | Prefer: [return-no-content] 18 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 19 | x-ms-client-request-id: [fd1e334c-c5c0-11e7-9675-a08cfdf04b77] 20 | x-ms-date: ['Fri, 10 Nov 2017 02:43:52 GMT'] 21 | x-ms-version: ['2017-04-17'] 22 | method: POST 23 | uri: https://storagename.table.core.windows.net/table4c2a104e 24 | response: 25 | body: {string: ''} 26 | headers: 27 | Cache-Control: [no-cache] 28 | Content-Length: ['0'] 29 | DataServiceId: ['https://storagename.table.core.windows.net/table4c2a104e(PartitionKey=''001'',RowKey=''batch_negative_1'')'] 30 | Date: ['Fri, 10 Nov 2017 02:43:52 GMT'] 31 | ETag: [W/"datetime'2017-11-10T02%3A43%3A53.111829Z'"] 32 | Location: ['https://storagename.table.core.windows.net/table4c2a104e(PartitionKey=''001'',RowKey=''batch_negative_1'')'] 33 | Preference-Applied: [return-no-content] 34 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 35 | X-Content-Type-Options: [nosniff] 36 | x-ms-request-id: [e3f51486-0002-006e-51cd-590a53000000] 37 | x-ms-version: ['2017-04-17'] 38 | status: {code: 204, message: No Content} 39 | version: 1 40 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table_encryption.test_get_strict_mode_unencrypted_entity.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"PartitionKey": "pkf941967", "RowKey": "rkf941967"}' 4 | headers: 5 | Accept: [application/json;odata=minimalmetadata] 6 | Connection: [keep-alive] 7 | Content-Length: ['52'] 8 | Content-Type: [application/json] 9 | DataServiceVersion: [3.0;NetFx] 10 | MaxDataServiceVersion: ['3.0'] 11 | Prefer: [return-no-content] 12 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 13 | x-ms-client-request-id: [0cbb5c8c-c5c1-11e7-a474-a08cfdf04b77] 14 | x-ms-date: ['Fri, 10 Nov 2017 02:44:19 GMT'] 15 | x-ms-version: ['2017-04-17'] 16 | method: POST 17 | uri: https://storagename.table.core.windows.net/uttablef941967 18 | response: 19 | body: {string: ''} 20 | headers: 21 | Cache-Control: [no-cache] 22 | Content-Length: ['0'] 23 | DataServiceId: ['https://storagename.table.core.windows.net/uttablef941967(PartitionKey=''pkf941967'',RowKey=''rkf941967'')'] 24 | Date: ['Fri, 10 Nov 2017 02:44:19 GMT'] 25 | ETag: [W/"datetime'2017-11-10T02%3A44%3A19.229022Z'"] 26 | Location: ['https://storagename.table.core.windows.net/uttablef941967(PartitionKey=''pkf941967'',RowKey=''rkf941967'')'] 27 | Preference-Applied: [return-no-content] 28 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 29 | X-Content-Type-Options: [nosniff] 30 | x-ms-request-id: [2feb73ac-0002-010f-1bcd-5908d9000000] 31 | x-ms-version: ['2017-04-17'] 32 | status: {code: 204, message: No Content} 33 | - request: 34 | body: null 35 | headers: 36 | Accept: [application/json;odata=minimalmetadata] 37 | Connection: [keep-alive] 38 | DataServiceVersion: [3.0;NetFx] 39 | MaxDataServiceVersion: ['3.0'] 40 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 41 | x-ms-client-request-id: [0cf8e602-c5c1-11e7-b1e0-a08cfdf04b77] 42 | x-ms-date: ['Fri, 10 Nov 2017 02:44:19 GMT'] 43 | x-ms-version: ['2017-04-17'] 44 | method: GET 45 | uri: https://storagename.table.core.windows.net/uttablef941967(PartitionKey='pkf941967',RowKey='rkf941967') 46 | response: 47 | body: {string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablef941967/@Element","odata.etag":"W/\"datetime''2017-11-10T02%3A44%3A19.229022Z''\"","PartitionKey":"pkf941967","RowKey":"rkf941967","Timestamp":"2017-11-10T02:44:19.229022Z"}'} 48 | headers: 49 | Cache-Control: [no-cache] 50 | Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] 51 | Date: ['Fri, 10 Nov 2017 02:44:19 GMT'] 52 | ETag: [W/"datetime'2017-11-10T02%3A44%3A19.229022Z'"] 53 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 54 | Transfer-Encoding: [chunked] 55 | X-Content-Type-Options: [nosniff] 56 | x-ms-request-id: [2feb73bd-0002-010f-2acd-5908d9000000] 57 | x-ms-version: ['2017-04-17'] 58 | status: {code: 200, message: OK} 59 | version: 1 60 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table_encryption.test_invalid_encryption_operations_fail.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"PartitionKey": "pkfdd194e", "RowKey": "rkfdd194e", "age": "39", "age@odata.type": 4 | "Edm.Int64", "sex": "ymf80Vqkag6u+j5C0A62zw==", "sex@odata.type": "Edm.Binary", 5 | "name": "P53a3Jat54IvQBYM2ajOnA==", "name@odata.type": "Edm.Binary", "married": 6 | true, "deceased": false, "optional": null, "evenratio": 3.0, "ratio": 3.1, "large": 7 | "933311100", "large@odata.type": "Edm.Int64", "Birthday": "1973-10-04T00:00:00Z", 8 | "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": 9 | "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 10 | 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid", 11 | "_ClientEncryptionMetadata2": "muTEP5OkhGFeLXZCyT2HdQ==", "_ClientEncryptionMetadata2@odata.type": 12 | "Edm.Binary", "_ClientEncryptionMetadata1": "{\"WrappedContentKey\": {\"KeyId\": 13 | \"key1\", \"EncryptedKey\": \"2oWmKFGhR04ua9nOOETc+1RapvUVhGR9Hf3Wi6jSogzRWjJsSd1Qqw==\", 14 | \"Algorithm\": \"A256KW\"}, \"EncryptionAgent\": {\"Protocol\": \"1.0\", \"EncryptionAlgorithm\": 15 | \"AES_CBC_256\"}, \"ContentEncryptionIV\": \"qoWDDR6iEkfcEEC6f85p0A==\", \"KeyWrappingMetadata\": 16 | {\"EncryptionLibrary\": \"Python 0.37.1\"}}"}' 17 | headers: 18 | Accept: [application/json;odata=minimalmetadata] 19 | Connection: [keep-alive] 20 | Content-Length: ['1186'] 21 | Content-Type: [application/json] 22 | DataServiceVersion: [3.0;NetFx] 23 | MaxDataServiceVersion: ['3.0'] 24 | Prefer: [return-no-content] 25 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 26 | x-ms-client-request-id: [0ea003d4-c5c1-11e7-a713-a08cfdf04b77] 27 | x-ms-date: ['Fri, 10 Nov 2017 02:44:22 GMT'] 28 | x-ms-version: ['2017-04-17'] 29 | method: POST 30 | uri: https://storagename.table.core.windows.net/uttablefdd194e 31 | response: 32 | body: {string: ''} 33 | headers: 34 | Cache-Control: [no-cache] 35 | Content-Length: ['0'] 36 | DataServiceId: ['https://storagename.table.core.windows.net/uttablefdd194e(PartitionKey=''pkfdd194e'',RowKey=''rkfdd194e'')'] 37 | Date: ['Fri, 10 Nov 2017 02:44:21 GMT'] 38 | ETag: [W/"datetime'2017-11-10T02%3A44%3A22.5858283Z'"] 39 | Location: ['https://storagename.table.core.windows.net/uttablefdd194e(PartitionKey=''pkfdd194e'',RowKey=''rkfdd194e'')'] 40 | Preference-Applied: [return-no-content] 41 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 42 | X-Content-Type-Options: [nosniff] 43 | x-ms-request-id: [3234fd87-0002-0016-40cd-5962e4000000] 44 | x-ms-version: ['2017-04-17'] 45 | status: {code: 204, message: No Content} 46 | version: 1 47 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table_encryption.test_invalid_encryption_operations_fail_batch.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"PartitionKey": "pkafe31baf", "RowKey": "rkafe31baf", "age": "39", "age@odata.type": 4 | "Edm.Int64", "sex": "QK+X8MsPh25snXRAhyE+sQ==", "sex@odata.type": "Edm.Binary", 5 | "name": "XBbssM976wOZJB044nYX0g==", "name@odata.type": "Edm.Binary", "married": 6 | true, "deceased": false, "optional": null, "evenratio": 3.0, "ratio": 3.1, "large": 7 | "933311100", "large@odata.type": "Edm.Int64", "Birthday": "1973-10-04T00:00:00Z", 8 | "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": 9 | "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 10 | 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "Edm.Guid", 11 | "_ClientEncryptionMetadata2": "zdnxBV3cijBWZ3vWTvMBEQ==", "_ClientEncryptionMetadata2@odata.type": 12 | "Edm.Binary", "_ClientEncryptionMetadata1": "{\"WrappedContentKey\": {\"KeyId\": 13 | \"key1\", \"EncryptedKey\": \"TSfrdblMNDl7/2jvs4yCmmPjf4PikDFGGgWIZI48XyDUTgVF1ALqqA==\", 14 | \"Algorithm\": \"A256KW\"}, \"EncryptionAgent\": {\"Protocol\": \"1.0\", \"EncryptionAlgorithm\": 15 | \"AES_CBC_256\"}, \"ContentEncryptionIV\": \"7mqCyNj5LstOb03UhxaQ/w==\", \"KeyWrappingMetadata\": 16 | {\"EncryptionLibrary\": \"Python 0.37.1\"}}"}' 17 | headers: 18 | Accept: [application/json;odata=minimalmetadata] 19 | Connection: [keep-alive] 20 | Content-Length: ['1188'] 21 | Content-Type: [application/json] 22 | DataServiceVersion: [3.0;NetFx] 23 | MaxDataServiceVersion: ['3.0'] 24 | Prefer: [return-no-content] 25 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 26 | x-ms-client-request-id: [0f52c03e-c5c1-11e7-8379-a08cfdf04b77] 27 | x-ms-date: ['Fri, 10 Nov 2017 02:44:23 GMT'] 28 | x-ms-version: ['2017-04-17'] 29 | method: POST 30 | uri: https://storagename.table.core.windows.net/uttableafe31baf 31 | response: 32 | body: {string: ''} 33 | headers: 34 | Cache-Control: [no-cache] 35 | Content-Length: ['0'] 36 | DataServiceId: ['https://storagename.table.core.windows.net/uttableafe31baf(PartitionKey=''pkafe31baf'',RowKey=''rkafe31baf'')'] 37 | Date: ['Fri, 10 Nov 2017 02:44:23 GMT'] 38 | ETag: [W/"datetime'2017-11-10T02%3A44%3A23.6774872Z'"] 39 | Location: ['https://storagename.table.core.windows.net/uttableafe31baf(PartitionKey=''pkafe31baf'',RowKey=''rkafe31baf'')'] 40 | Preference-Applied: [return-no-content] 41 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 42 | X-Content-Type-Options: [nosniff] 43 | x-ms-request-id: [8b0577bb-0002-00c0-05cd-59293e000000] 44 | x-ms-version: ['2017-04-17'] 45 | status: {code: 204, message: No Content} 46 | version: 1 47 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table_entity.test_binary_property_value.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"PartitionKey": "pk99fe1256", "RowKey": "rk99fe1256", "binary": "AQIDBAUGBwgJCg==", 4 | "binary@odata.type": "Edm.Binary"}' 5 | headers: 6 | Accept: [application/json;odata=minimalmetadata] 7 | Connection: [keep-alive] 8 | Content-Length: ['119'] 9 | Content-Type: [application/json] 10 | DataServiceVersion: [3.0;NetFx] 11 | MaxDataServiceVersion: ['3.0'] 12 | Prefer: [return-no-content] 13 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 14 | x-ms-client-request-id: [18365d28-c5c1-11e7-b625-a08cfdf04b77] 15 | x-ms-date: ['Fri, 10 Nov 2017 02:44:38 GMT'] 16 | x-ms-version: ['2017-04-17'] 17 | method: POST 18 | uri: https://storagename.table.core.windows.net/uttable99fe1256 19 | response: 20 | body: {string: ''} 21 | headers: 22 | Cache-Control: [no-cache] 23 | Content-Length: ['0'] 24 | DataServiceId: ['https://storagename.table.core.windows.net/uttable99fe1256(PartitionKey=''pk99fe1256'',RowKey=''rk99fe1256'')'] 25 | Date: ['Fri, 10 Nov 2017 02:44:38 GMT'] 26 | ETag: [W/"datetime'2017-11-10T02%3A44%3A38.5104164Z'"] 27 | Location: ['https://storagename.table.core.windows.net/uttable99fe1256(PartitionKey=''pk99fe1256'',RowKey=''rk99fe1256'')'] 28 | Preference-Applied: [return-no-content] 29 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 30 | X-Content-Type-Options: [nosniff] 31 | x-ms-request-id: [999ade3d-0002-00fa-67cd-596a9d000000] 32 | x-ms-version: ['2017-04-17'] 33 | status: {code: 204, message: No Content} 34 | - request: 35 | body: null 36 | headers: 37 | Accept: [application/json;odata=minimalmetadata] 38 | Connection: [keep-alive] 39 | DataServiceVersion: [3.0;NetFx] 40 | MaxDataServiceVersion: ['3.0'] 41 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 42 | x-ms-client-request-id: [1870a1b6-c5c1-11e7-a4b2-a08cfdf04b77] 43 | x-ms-date: ['Fri, 10 Nov 2017 02:44:38 GMT'] 44 | x-ms-version: ['2017-04-17'] 45 | method: GET 46 | uri: https://storagename.table.core.windows.net/uttable99fe1256(PartitionKey='pk99fe1256',RowKey='rk99fe1256') 47 | response: 48 | body: {string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable99fe1256/@Element","odata.etag":"W/\"datetime''2017-11-10T02%3A44%3A38.5104164Z''\"","PartitionKey":"pk99fe1256","RowKey":"rk99fe1256","Timestamp":"2017-11-10T02:44:38.5104164Z","binary@odata.type":"Edm.Binary","binary":"AQIDBAUGBwgJCg=="}'} 49 | headers: 50 | Cache-Control: [no-cache] 51 | Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] 52 | Date: ['Fri, 10 Nov 2017 02:44:38 GMT'] 53 | ETag: [W/"datetime'2017-11-10T02%3A44%3A38.5104164Z'"] 54 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 55 | Transfer-Encoding: [chunked] 56 | X-Content-Type-Options: [nosniff] 57 | x-ms-request-id: [999ade55-0002-00fa-7bcd-596a9d000000] 58 | x-ms-version: ['2017-04-17'] 59 | status: {code: 200, message: OK} 60 | version: 1 61 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table_entity.test_delete_entity_not_existing.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: null 4 | headers: 5 | Accept: [application/json;odata=minimalmetadata] 6 | Connection: [keep-alive] 7 | Content-Length: ['0'] 8 | DataServiceVersion: [3.0;NetFx] 9 | If-Match: ['*'] 10 | MaxDataServiceVersion: ['3.0'] 11 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 12 | x-ms-client-request-id: [19c86d76-c5c1-11e7-a693-a08cfdf04b77] 13 | x-ms-date: ['Fri, 10 Nov 2017 02:44:41 GMT'] 14 | x-ms-version: ['2017-04-17'] 15 | method: DELETE 16 | uri: https://storagename.table.core.windows.net/uttablef9b6145a(PartitionKey='pkf9b6145a',RowKey='rkf9b6145a') 17 | response: 18 | body: {string: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The 19 | specified resource does not exist.\nRequestId:b08edf75-0002-00ef-49cd-59a804000000\nTime:2017-11-10T02:44:41.2452763Z"}}}'} 20 | headers: 21 | Cache-Control: [no-cache] 22 | Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] 23 | Date: ['Fri, 10 Nov 2017 02:44:40 GMT'] 24 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 25 | Transfer-Encoding: [chunked] 26 | X-Content-Type-Options: [nosniff] 27 | x-ms-request-id: [b08edf75-0002-00ef-49cd-59a804000000] 28 | x-ms-version: ['2017-04-17'] 29 | status: {code: 404, message: Not Found} 30 | version: 1 31 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table_entity.test_delete_entity_with_if_doesnt_match.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"PartitionKey": "pka99a1781", "RowKey": "rka99a1781", "age": "39", "age@odata.type": 4 | "Edm.Int64", "sex": "male", "married": true, "deceased": false, "optional": 5 | null, "evenratio": 3.0, "ratio": 3.1, "large": "933311100", "large@odata.type": 6 | "Edm.Int64", "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", 7 | "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", "binary": 8 | "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", 9 | "clsid@odata.type": "Edm.Guid"}' 10 | headers: 11 | Accept: [application/json;odata=minimalmetadata] 12 | Connection: [keep-alive] 13 | Content-Length: ['555'] 14 | Content-Type: [application/json] 15 | DataServiceVersion: [3.0;NetFx] 16 | MaxDataServiceVersion: ['3.0'] 17 | Prefer: [return-no-content] 18 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 19 | x-ms-client-request-id: [1a7a8c2e-c5c1-11e7-aceb-a08cfdf04b77] 20 | x-ms-date: ['Fri, 10 Nov 2017 02:44:42 GMT'] 21 | x-ms-version: ['2017-04-17'] 22 | method: POST 23 | uri: https://storagename.table.core.windows.net/uttablea99a1781 24 | response: 25 | body: {string: ''} 26 | headers: 27 | Cache-Control: [no-cache] 28 | Content-Length: ['0'] 29 | DataServiceId: ['https://storagename.table.core.windows.net/uttablea99a1781(PartitionKey=''pka99a1781'',RowKey=''rka99a1781'')'] 30 | Date: ['Fri, 10 Nov 2017 02:44:42 GMT'] 31 | ETag: [W/"datetime'2017-11-10T02%3A44%3A42.3937522Z'"] 32 | Location: ['https://storagename.table.core.windows.net/uttablea99a1781(PartitionKey=''pka99a1781'',RowKey=''rka99a1781'')'] 33 | Preference-Applied: [return-no-content] 34 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 35 | X-Content-Type-Options: [nosniff] 36 | x-ms-request-id: [c979f4c4-0002-00d3-2dcd-591cdf000000] 37 | x-ms-version: ['2017-04-17'] 38 | status: {code: 204, message: No Content} 39 | - request: 40 | body: null 41 | headers: 42 | Accept: [application/json;odata=minimalmetadata] 43 | Connection: [keep-alive] 44 | Content-Length: ['0'] 45 | DataServiceVersion: [3.0;NetFx] 46 | If-Match: [W/"datetime'2012-06-15T22%3A51%3A44.9662825Z'"] 47 | MaxDataServiceVersion: ['3.0'] 48 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 49 | x-ms-client-request-id: [1aba10b4-c5c1-11e7-856d-a08cfdf04b77] 50 | x-ms-date: ['Fri, 10 Nov 2017 02:44:42 GMT'] 51 | x-ms-version: ['2017-04-17'] 52 | method: DELETE 53 | uri: https://storagename.table.core.windows.net/uttablea99a1781(PartitionKey='pka99a1781',RowKey='rka99a1781') 54 | response: 55 | body: {string: '{"odata.error":{"code":"UpdateConditionNotSatisfied","message":{"lang":"en-US","value":"The 56 | update condition specified in the request was not satisfied.\nRequestId:c979f4d4-0002-00d3-39cd-591cdf000000\nTime:2017-11-10T02:44:42.4948486Z"}}}'} 57 | headers: 58 | Cache-Control: [no-cache] 59 | Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] 60 | Date: ['Fri, 10 Nov 2017 02:44:42 GMT'] 61 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 62 | Transfer-Encoding: [chunked] 63 | X-Content-Type-Options: [nosniff] 64 | x-ms-request-id: [c979f4d4-0002-00d3-39cd-591cdf000000] 65 | x-ms-version: ['2017-04-17'] 66 | status: {code: 412, message: Precondition Failed} 67 | version: 1 68 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table_entity.test_empty_and_spaces_property_value.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"PartitionKey": "pk66111670", "RowKey": "rk66111670", "EmptyByte": "", 4 | "EmptyUnicode": "", "SpacesOnlyByte": " ", "SpacesOnlyUnicode": " ", "SpacesBeforeByte": 5 | " Text", "SpacesBeforeUnicode": " Text", "SpacesAfterByte": "Text ", "SpacesAfterUnicode": 6 | "Text ", "SpacesBeforeAndAfterByte": " Text ", "SpacesBeforeAndAfterUnicode": 7 | " Text "}' 8 | headers: 9 | Accept: [application/json;odata=minimalmetadata] 10 | Connection: [keep-alive] 11 | Content-Length: ['359'] 12 | Content-Type: [application/json] 13 | DataServiceVersion: [3.0;NetFx] 14 | MaxDataServiceVersion: ['3.0'] 15 | Prefer: [return-no-content] 16 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 17 | x-ms-client-request-id: [1c0f6c06-c5c1-11e7-ab8c-a08cfdf04b77] 18 | x-ms-date: ['Fri, 10 Nov 2017 02:44:44 GMT'] 19 | x-ms-version: ['2017-04-17'] 20 | method: POST 21 | uri: https://storagename.table.core.windows.net/uttable66111670 22 | response: 23 | body: {string: ''} 24 | headers: 25 | Cache-Control: [no-cache] 26 | Content-Length: ['0'] 27 | DataServiceId: ['https://storagename.table.core.windows.net/uttable66111670(PartitionKey=''pk66111670'',RowKey=''rk66111670'')'] 28 | Date: ['Fri, 10 Nov 2017 02:44:44 GMT'] 29 | ETag: [W/"datetime'2017-11-10T02%3A44%3A44.8663911Z'"] 30 | Location: ['https://storagename.table.core.windows.net/uttable66111670(PartitionKey=''pk66111670'',RowKey=''rk66111670'')'] 31 | Preference-Applied: [return-no-content] 32 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 33 | X-Content-Type-Options: [nosniff] 34 | x-ms-request-id: [6bc3ba2e-0002-00e4-03cd-59b070000000] 35 | x-ms-version: ['2017-04-17'] 36 | status: {code: 204, message: No Content} 37 | - request: 38 | body: null 39 | headers: 40 | Accept: [application/json;odata=minimalmetadata] 41 | Connection: [keep-alive] 42 | DataServiceVersion: [3.0;NetFx] 43 | MaxDataServiceVersion: ['3.0'] 44 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 45 | x-ms-client-request-id: [1c47fef6-c5c1-11e7-8656-a08cfdf04b77] 46 | x-ms-date: ['Fri, 10 Nov 2017 02:44:45 GMT'] 47 | x-ms-version: ['2017-04-17'] 48 | method: GET 49 | uri: https://storagename.table.core.windows.net/uttable66111670(PartitionKey='pk66111670',RowKey='rk66111670') 50 | response: 51 | body: {string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable66111670/@Element","odata.etag":"W/\"datetime''2017-11-10T02%3A44%3A44.8663911Z''\"","PartitionKey":"pk66111670","RowKey":"rk66111670","Timestamp":"2017-11-10T02:44:44.8663911Z","EmptyByte":"","EmptyUnicode":"","SpacesOnlyByte":" ","SpacesOnlyUnicode":" ","SpacesBeforeByte":" Text","SpacesBeforeUnicode":" Text","SpacesAfterByte":"Text ","SpacesAfterUnicode":"Text ","SpacesBeforeAndAfterByte":" Text ","SpacesBeforeAndAfterUnicode":" Text "}'} 52 | headers: 53 | Cache-Control: [no-cache] 54 | Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] 55 | Date: ['Fri, 10 Nov 2017 02:44:44 GMT'] 56 | ETag: [W/"datetime'2017-11-10T02%3A44%3A44.8663911Z'"] 57 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 58 | Transfer-Encoding: [chunked] 59 | X-Content-Type-Options: [nosniff] 60 | x-ms-request-id: [6bc3ba35-0002-00e4-08cd-59b070000000] 61 | x-ms-version: ['2017-04-17'] 62 | status: {code: 200, message: OK} 63 | version: 1 64 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table_entity.test_get_entity.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"PartitionKey": "pke7730dad", "RowKey": "rke7730dad", "age": "39", "age@odata.type": 4 | "Edm.Int64", "sex": "male", "married": true, "deceased": false, "optional": 5 | null, "evenratio": 3.0, "ratio": 3.1, "large": "933311100", "large@odata.type": 6 | "Edm.Int64", "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", 7 | "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", "binary": 8 | "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", 9 | "clsid@odata.type": "Edm.Guid"}' 10 | headers: 11 | Accept: [application/json;odata=minimalmetadata] 12 | Connection: [keep-alive] 13 | Content-Length: ['555'] 14 | Content-Type: [application/json] 15 | DataServiceVersion: [3.0;NetFx] 16 | MaxDataServiceVersion: ['3.0'] 17 | Prefer: [return-no-content] 18 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 19 | x-ms-client-request-id: [1cce9c8a-c5c1-11e7-9c94-a08cfdf04b77] 20 | x-ms-date: ['Fri, 10 Nov 2017 02:44:46 GMT'] 21 | x-ms-version: ['2017-04-17'] 22 | method: POST 23 | uri: https://storagename.table.core.windows.net/uttablee7730dad 24 | response: 25 | body: {string: ''} 26 | headers: 27 | Cache-Control: [no-cache] 28 | Content-Length: ['0'] 29 | DataServiceId: ['https://storagename.table.core.windows.net/uttablee7730dad(PartitionKey=''pke7730dad'',RowKey=''rke7730dad'')'] 30 | Date: ['Fri, 10 Nov 2017 02:44:45 GMT'] 31 | ETag: [W/"datetime'2017-11-10T02%3A44%3A46.1416145Z'"] 32 | Location: ['https://storagename.table.core.windows.net/uttablee7730dad(PartitionKey=''pke7730dad'',RowKey=''rke7730dad'')'] 33 | Preference-Applied: [return-no-content] 34 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 35 | X-Content-Type-Options: [nosniff] 36 | x-ms-request-id: [d8032558-0002-00bb-32cd-59428e000000] 37 | x-ms-version: ['2017-04-17'] 38 | status: {code: 204, message: No Content} 39 | - request: 40 | body: null 41 | headers: 42 | Accept: [application/json;odata=minimalmetadata] 43 | Connection: [keep-alive] 44 | DataServiceVersion: [3.0;NetFx] 45 | MaxDataServiceVersion: ['3.0'] 46 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 47 | x-ms-client-request-id: [1d08dd7a-c5c1-11e7-87b7-a08cfdf04b77] 48 | x-ms-date: ['Fri, 10 Nov 2017 02:44:46 GMT'] 49 | x-ms-version: ['2017-04-17'] 50 | method: GET 51 | uri: https://storagename.table.core.windows.net/uttablee7730dad(PartitionKey='pke7730dad',RowKey='rke7730dad') 52 | response: 53 | body: {string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablee7730dad/@Element","odata.etag":"W/\"datetime''2017-11-10T02%3A44%3A46.1416145Z''\"","PartitionKey":"pke7730dad","RowKey":"rke7730dad","Timestamp":"2017-11-10T02:44:46.1416145Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"evenratio":3.0,"ratio":3.1,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}'} 54 | headers: 55 | Cache-Control: [no-cache] 56 | Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] 57 | Date: ['Fri, 10 Nov 2017 02:44:45 GMT'] 58 | ETag: [W/"datetime'2017-11-10T02%3A44%3A46.1416145Z'"] 59 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 60 | Transfer-Encoding: [chunked] 61 | X-Content-Type-Options: [nosniff] 62 | x-ms-request-id: [d8032571-0002-00bb-47cd-59428e000000] 63 | x-ms-version: ['2017-04-17'] 64 | status: {code: 200, message: OK} 65 | version: 1 66 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table_entity.test_get_entity_full_metadata.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"PartitionKey": "pkd1cb135f", "RowKey": "rkd1cb135f", "age": "39", "age@odata.type": 4 | "Edm.Int64", "sex": "male", "married": true, "deceased": false, "optional": 5 | null, "evenratio": 3.0, "ratio": 3.1, "large": "933311100", "large@odata.type": 6 | "Edm.Int64", "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", 7 | "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", "binary": 8 | "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", 9 | "clsid@odata.type": "Edm.Guid"}' 10 | headers: 11 | Accept: [application/json;odata=minimalmetadata] 12 | Connection: [keep-alive] 13 | Content-Length: ['555'] 14 | Content-Type: [application/json] 15 | DataServiceVersion: [3.0;NetFx] 16 | MaxDataServiceVersion: ['3.0'] 17 | Prefer: [return-no-content] 18 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 19 | x-ms-client-request-id: [1d8eeec6-c5c1-11e7-b073-a08cfdf04b77] 20 | x-ms-date: ['Fri, 10 Nov 2017 02:44:47 GMT'] 21 | x-ms-version: ['2017-04-17'] 22 | method: POST 23 | uri: https://storagename.table.core.windows.net/uttabled1cb135f 24 | response: 25 | body: {string: ''} 26 | headers: 27 | Cache-Control: [no-cache] 28 | Content-Length: ['0'] 29 | DataServiceId: ['https://storagename.table.core.windows.net/uttabled1cb135f(PartitionKey=''pkd1cb135f'',RowKey=''rkd1cb135f'')'] 30 | Date: ['Fri, 10 Nov 2017 02:44:47 GMT'] 31 | ETag: [W/"datetime'2017-11-10T02%3A44%3A47.6221962Z'"] 32 | Location: ['https://storagename.table.core.windows.net/uttabled1cb135f(PartitionKey=''pkd1cb135f'',RowKey=''rkd1cb135f'')'] 33 | Preference-Applied: [return-no-content] 34 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 35 | X-Content-Type-Options: [nosniff] 36 | x-ms-request-id: [b2f11a24-0002-00b9-76cd-594074000000] 37 | x-ms-version: ['2017-04-17'] 38 | status: {code: 204, message: No Content} 39 | - request: 40 | body: null 41 | headers: 42 | Accept: [application/json;odata=fullmetadata] 43 | Connection: [keep-alive] 44 | DataServiceVersion: [3.0;NetFx] 45 | MaxDataServiceVersion: ['3.0'] 46 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 47 | x-ms-client-request-id: [1dc91af6-c5c1-11e7-aa2e-a08cfdf04b77] 48 | x-ms-date: ['Fri, 10 Nov 2017 02:44:47 GMT'] 49 | x-ms-version: ['2017-04-17'] 50 | method: GET 51 | uri: https://storagename.table.core.windows.net/uttabled1cb135f(PartitionKey='pkd1cb135f',RowKey='rkd1cb135f') 52 | response: 53 | body: {string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttabled1cb135f/@Element","odata.type":"storagename.uttabled1cb135f","odata.id":"https://storagename.table.core.windows.net/uttabled1cb135f(PartitionKey=''pkd1cb135f'',RowKey=''rkd1cb135f'')","odata.etag":"W/\"datetime''2017-11-10T02%3A44%3A47.6221962Z''\"","odata.editLink":"uttabled1cb135f(PartitionKey=''pkd1cb135f'',RowKey=''rkd1cb135f'')","PartitionKey":"pkd1cb135f","RowKey":"rkd1cb135f","Timestamp@odata.type":"Edm.DateTime","Timestamp":"2017-11-10T02:44:47.6221962Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"evenratio":3.0,"ratio":3.1,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}'} 54 | headers: 55 | Cache-Control: [no-cache] 56 | Content-Type: [application/json;odata=fullmetadata;streaming=true;charset=utf-8] 57 | Date: ['Fri, 10 Nov 2017 02:44:47 GMT'] 58 | ETag: [W/"datetime'2017-11-10T02%3A44%3A47.6221962Z'"] 59 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 60 | Transfer-Encoding: [chunked] 61 | X-Content-Type-Options: [nosniff] 62 | x-ms-request-id: [b2f11a30-0002-00b9-80cd-594074000000] 63 | x-ms-version: ['2017-04-17'] 64 | status: {code: 200, message: OK} 65 | version: 1 66 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table_entity.test_get_entity_no_metadata.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"PartitionKey": "pkab3d1289", "RowKey": "rkab3d1289", "age": "39", "age@odata.type": 4 | "Edm.Int64", "sex": "male", "married": true, "deceased": false, "optional": 5 | null, "evenratio": 3.0, "ratio": 3.1, "large": "933311100", "large@odata.type": 6 | "Edm.Int64", "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", 7 | "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", "binary": 8 | "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", 9 | "clsid@odata.type": "Edm.Guid"}' 10 | headers: 11 | Accept: [application/json;odata=minimalmetadata] 12 | Connection: [keep-alive] 13 | Content-Length: ['555'] 14 | Content-Type: [application/json] 15 | DataServiceVersion: [3.0;NetFx] 16 | MaxDataServiceVersion: ['3.0'] 17 | Prefer: [return-no-content] 18 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 19 | x-ms-client-request-id: [1f1d169a-c5c1-11e7-bb1f-a08cfdf04b77] 20 | x-ms-date: ['Fri, 10 Nov 2017 02:44:49 GMT'] 21 | x-ms-version: ['2017-04-17'] 22 | method: POST 23 | uri: https://storagename.table.core.windows.net/uttableab3d1289 24 | response: 25 | body: {string: ''} 26 | headers: 27 | Cache-Control: [no-cache] 28 | Content-Length: ['0'] 29 | DataServiceId: ['https://storagename.table.core.windows.net/uttableab3d1289(PartitionKey=''pkab3d1289'',RowKey=''rkab3d1289'')'] 30 | Date: ['Fri, 10 Nov 2017 02:44:50 GMT'] 31 | ETag: [W/"datetime'2017-11-10T02%3A44%3A50.3846037Z'"] 32 | Location: ['https://storagename.table.core.windows.net/uttableab3d1289(PartitionKey=''pkab3d1289'',RowKey=''rkab3d1289'')'] 33 | Preference-Applied: [return-no-content] 34 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 35 | X-Content-Type-Options: [nosniff] 36 | x-ms-request-id: [78c39507-0002-004a-4ccd-59931d000000] 37 | x-ms-version: ['2017-04-17'] 38 | status: {code: 204, message: No Content} 39 | - request: 40 | body: null 41 | headers: 42 | Accept: [application/json;odata=nometadata] 43 | Connection: [keep-alive] 44 | DataServiceVersion: [3.0;NetFx] 45 | MaxDataServiceVersion: ['3.0'] 46 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 47 | x-ms-client-request-id: [1f575b4a-c5c1-11e7-ae11-a08cfdf04b77] 48 | x-ms-date: ['Fri, 10 Nov 2017 02:44:50 GMT'] 49 | x-ms-version: ['2017-04-17'] 50 | method: GET 51 | uri: https://storagename.table.core.windows.net/uttableab3d1289(PartitionKey='pkab3d1289',RowKey='rkab3d1289') 52 | response: 53 | body: {string: '{"PartitionKey":"pkab3d1289","RowKey":"rkab3d1289","Timestamp":"2017-11-10T02:44:50.3846037Z","age":"39","sex":"male","married":true,"deceased":false,"evenratio":3.0,"ratio":3.1,"large":"933311100","Birthday":"1973-10-04T00:00:00Z","birthday":"1970-10-04T00:00:00Z","binary":"YmluYXJ5","other":20,"clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}'} 54 | headers: 55 | Cache-Control: [no-cache] 56 | Content-Type: [application/json;odata=nometadata;streaming=true;charset=utf-8] 57 | Date: ['Fri, 10 Nov 2017 02:44:50 GMT'] 58 | ETag: [W/"datetime'2017-11-10T02%3A44%3A50.3846037Z'"] 59 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 60 | Transfer-Encoding: [chunked] 61 | X-Content-Type-Options: [nosniff] 62 | x-ms-request-id: [78c39515-0002-004a-58cd-59931d000000] 63 | x-ms-version: ['2017-04-17'] 64 | status: {code: 200, message: OK} 65 | version: 1 66 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table_entity.test_get_entity_not_existing.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: null 4 | headers: 5 | Accept: [application/json;odata=minimalmetadata] 6 | Connection: [keep-alive] 7 | DataServiceVersion: [3.0;NetFx] 8 | MaxDataServiceVersion: ['3.0'] 9 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 10 | x-ms-client-request-id: [1fdd6c62-c5c1-11e7-b098-a08cfdf04b77] 11 | x-ms-date: ['Fri, 10 Nov 2017 02:44:51 GMT'] 12 | x-ms-version: ['2017-04-17'] 13 | method: GET 14 | uri: https://storagename.table.core.windows.net/uttablebf5d1327(PartitionKey='pkbf5d1327',RowKey='rkbf5d1327') 15 | response: 16 | body: {string: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The 17 | specified resource does not exist.\nRequestId:960099f5-0002-000c-75cd-594d8b000000\nTime:2017-11-10T02:44:51.4193614Z"}}}'} 18 | headers: 19 | Cache-Control: [no-cache] 20 | Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] 21 | Date: ['Fri, 10 Nov 2017 02:44:50 GMT'] 22 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 23 | Transfer-Encoding: [chunked] 24 | X-Content-Type-Options: [nosniff] 25 | x-ms-request-id: [960099f5-0002-000c-75cd-594d8b000000] 26 | x-ms-version: ['2017-04-17'] 27 | status: {code: 404, message: Not Found} 28 | version: 1 29 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table_entity.test_get_entity_with_property_resolver.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"PartitionKey": "pk9727177d", "RowKey": "rk9727177d", "age": "39", "age@odata.type": 4 | "Edm.Int64", "sex": "male", "married": true, "deceased": false, "optional": 5 | null, "evenratio": 3.0, "ratio": 3.1, "large": "933311100", "large@odata.type": 6 | "Edm.Int64", "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", 7 | "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", "binary": 8 | "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", 9 | "clsid@odata.type": "Edm.Guid"}' 10 | headers: 11 | Accept: [application/json;odata=minimalmetadata] 12 | Connection: [keep-alive] 13 | Content-Length: ['555'] 14 | Content-Type: [application/json] 15 | DataServiceVersion: [3.0;NetFx] 16 | MaxDataServiceVersion: ['3.0'] 17 | Prefer: [return-no-content] 18 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 19 | x-ms-client-request-id: [208a330a-c5c1-11e7-8808-a08cfdf04b77] 20 | x-ms-date: ['Fri, 10 Nov 2017 02:44:52 GMT'] 21 | x-ms-version: ['2017-04-17'] 22 | method: POST 23 | uri: https://storagename.table.core.windows.net/uttable9727177d 24 | response: 25 | body: {string: ''} 26 | headers: 27 | Cache-Control: [no-cache] 28 | Content-Length: ['0'] 29 | DataServiceId: ['https://storagename.table.core.windows.net/uttable9727177d(PartitionKey=''pk9727177d'',RowKey=''rk9727177d'')'] 30 | Date: ['Fri, 10 Nov 2017 02:44:51 GMT'] 31 | ETag: [W/"datetime'2017-11-10T02%3A44%3A52.5106175Z'"] 32 | Location: ['https://storagename.table.core.windows.net/uttable9727177d(PartitionKey=''pk9727177d'',RowKey=''rk9727177d'')'] 33 | Preference-Applied: [return-no-content] 34 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 35 | X-Content-Type-Options: [nosniff] 36 | x-ms-request-id: [4eb9de29-0002-0137-72cd-594980000000] 37 | x-ms-version: ['2017-04-17'] 38 | status: {code: 204, message: No Content} 39 | - request: 40 | body: null 41 | headers: 42 | Accept: [application/json;odata=nometadata] 43 | Connection: [keep-alive] 44 | DataServiceVersion: [3.0;NetFx] 45 | MaxDataServiceVersion: ['3.0'] 46 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 47 | x-ms-client-request-id: [20c6d276-c5c1-11e7-8441-a08cfdf04b77] 48 | x-ms-date: ['Fri, 10 Nov 2017 02:44:52 GMT'] 49 | x-ms-version: ['2017-04-17'] 50 | method: GET 51 | uri: https://storagename.table.core.windows.net/uttable9727177d(PartitionKey='pk9727177d',RowKey='rk9727177d') 52 | response: 53 | body: {string: '{"PartitionKey":"pk9727177d","RowKey":"rk9727177d","Timestamp":"2017-11-10T02:44:52.5106175Z","age":"39","sex":"male","married":true,"deceased":false,"evenratio":3.0,"ratio":3.1,"large":"933311100","Birthday":"1973-10-04T00:00:00Z","birthday":"1970-10-04T00:00:00Z","binary":"YmluYXJ5","other":20,"clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}'} 54 | headers: 55 | Cache-Control: [no-cache] 56 | Content-Type: [application/json;odata=nometadata;streaming=true;charset=utf-8] 57 | Date: ['Fri, 10 Nov 2017 02:44:51 GMT'] 58 | ETag: [W/"datetime'2017-11-10T02%3A44%3A52.5106175Z'"] 59 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 60 | Transfer-Encoding: [chunked] 61 | X-Content-Type-Options: [nosniff] 62 | x-ms-request-id: [4eb9de2f-0002-0137-76cd-594980000000] 63 | x-ms-version: ['2017-04-17'] 64 | status: {code: 200, message: OK} 65 | version: 1 66 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table_entity.test_get_entity_with_select.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"PartitionKey": "pkabfa12a7", "RowKey": "rkabfa12a7", "age": "39", "age@odata.type": 4 | "Edm.Int64", "sex": "male", "married": true, "deceased": false, "optional": 5 | null, "evenratio": 3.0, "ratio": 3.1, "large": "933311100", "large@odata.type": 6 | "Edm.Int64", "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", 7 | "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", "binary": 8 | "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", 9 | "clsid@odata.type": "Edm.Guid"}' 10 | headers: 11 | Accept: [application/json;odata=minimalmetadata] 12 | Connection: [keep-alive] 13 | Content-Length: ['555'] 14 | Content-Type: [application/json] 15 | DataServiceVersion: [3.0;NetFx] 16 | MaxDataServiceVersion: ['3.0'] 17 | Prefer: [return-no-content] 18 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 19 | x-ms-client-request-id: [67d4dd70-c5c1-11e7-bad4-a08cfdf04b77] 20 | x-ms-date: ['Fri, 10 Nov 2017 02:46:51 GMT'] 21 | x-ms-version: ['2017-04-17'] 22 | method: POST 23 | uri: https://storagename.table.core.windows.net/uttableabfa12a7 24 | response: 25 | body: {string: ''} 26 | headers: 27 | Cache-Control: [no-cache] 28 | Content-Length: ['0'] 29 | DataServiceId: ['https://storagename.table.core.windows.net/uttableabfa12a7(PartitionKey=''pkabfa12a7'',RowKey=''rkabfa12a7'')'] 30 | Date: ['Fri, 10 Nov 2017 02:46:51 GMT'] 31 | ETag: [W/"datetime'2017-11-10T02%3A46%3A52.3291063Z'"] 32 | Location: ['https://storagename.table.core.windows.net/uttableabfa12a7(PartitionKey=''pkabfa12a7'',RowKey=''rkabfa12a7'')'] 33 | Preference-Applied: [return-no-content] 34 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 35 | X-Content-Type-Options: [nosniff] 36 | x-ms-request-id: [d1ea13bb-0002-0064-68ce-5913da000000] 37 | x-ms-version: ['2017-04-17'] 38 | status: {code: 204, message: No Content} 39 | - request: 40 | body: null 41 | headers: 42 | Accept: [application/json;odata=minimalmetadata] 43 | Connection: [keep-alive] 44 | DataServiceVersion: [3.0;NetFx] 45 | MaxDataServiceVersion: ['3.0'] 46 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 47 | x-ms-client-request-id: [6812efa2-c5c1-11e7-951d-a08cfdf04b77] 48 | x-ms-date: ['Fri, 10 Nov 2017 02:46:52 GMT'] 49 | x-ms-version: ['2017-04-17'] 50 | method: GET 51 | uri: https://storagename.table.core.windows.net/uttableabfa12a7(PartitionKey='pkabfa12a7',RowKey='rkabfa12a7')?%24select=age%2Csex%2Cxyz 52 | response: 53 | body: {string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttableabfa12a7/@Element&$select=age,sex,xyz","odata.etag":"W/\"datetime''2017-11-10T02%3A46%3A52.3291063Z''\"","age@odata.type":"Edm.Int64","age":"39","sex":"male","xyz":null}'} 54 | headers: 55 | Cache-Control: [no-cache] 56 | Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] 57 | Date: ['Fri, 10 Nov 2017 02:46:51 GMT'] 58 | ETag: [W/"datetime'2017-11-10T02%3A46%3A52.3291063Z'"] 59 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 60 | Transfer-Encoding: [chunked] 61 | X-Content-Type-Options: [nosniff] 62 | x-ms-request-id: [d1ea13d3-0002-0064-7ece-5913da000000] 63 | x-ms-version: ['2017-04-17'] 64 | status: {code: 200, message: OK} 65 | version: 1 66 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table_entity.test_get_entity_with_special_doubles.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"PartitionKey": "pk65ff1655", "RowKey": "rk65ff1655", "inf": "Infinity", 4 | "inf@odata.type": "Edm.Double", "negativeinf": "-Infinity", "negativeinf@odata.type": 5 | "Edm.Double", "nan": "NaN", "nan@odata.type": "Edm.Double"}' 6 | headers: 7 | Accept: [application/json;odata=minimalmetadata] 8 | Connection: [keep-alive] 9 | Content-Length: ['219'] 10 | Content-Type: [application/json] 11 | DataServiceVersion: [3.0;NetFx] 12 | MaxDataServiceVersion: ['3.0'] 13 | Prefer: [return-no-content] 14 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 15 | x-ms-client-request-id: [689e0aca-c5c1-11e7-abad-a08cfdf04b77] 16 | x-ms-date: ['Fri, 10 Nov 2017 02:46:53 GMT'] 17 | x-ms-version: ['2017-04-17'] 18 | method: POST 19 | uri: https://storagename.table.core.windows.net/uttable65ff1655 20 | response: 21 | body: {string: ''} 22 | headers: 23 | Cache-Control: [no-cache] 24 | Content-Length: ['0'] 25 | DataServiceId: ['https://storagename.table.core.windows.net/uttable65ff1655(PartitionKey=''pk65ff1655'',RowKey=''rk65ff1655'')'] 26 | Date: ['Fri, 10 Nov 2017 02:46:53 GMT'] 27 | ETag: [W/"datetime'2017-11-10T02%3A46%3A53.636692Z'"] 28 | Location: ['https://storagename.table.core.windows.net/uttable65ff1655(PartitionKey=''pk65ff1655'',RowKey=''rk65ff1655'')'] 29 | Preference-Applied: [return-no-content] 30 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 31 | X-Content-Type-Options: [nosniff] 32 | x-ms-request-id: [a07116ad-0002-0101-59ce-59e4d2000000] 33 | x-ms-version: ['2017-04-17'] 34 | status: {code: 204, message: No Content} 35 | - request: 36 | body: null 37 | headers: 38 | Accept: [application/json;odata=minimalmetadata] 39 | Connection: [keep-alive] 40 | DataServiceVersion: [3.0;NetFx] 41 | MaxDataServiceVersion: ['3.0'] 42 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 43 | x-ms-client-request-id: [68db6d28-c5c1-11e7-9c22-a08cfdf04b77] 44 | x-ms-date: ['Fri, 10 Nov 2017 02:46:53 GMT'] 45 | x-ms-version: ['2017-04-17'] 46 | method: GET 47 | uri: https://storagename.table.core.windows.net/uttable65ff1655(PartitionKey='pk65ff1655',RowKey='rk65ff1655') 48 | response: 49 | body: {string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable65ff1655/@Element","odata.etag":"W/\"datetime''2017-11-10T02%3A46%3A53.636692Z''\"","PartitionKey":"pk65ff1655","RowKey":"rk65ff1655","Timestamp":"2017-11-10T02:46:53.636692Z","inf@odata.type":"Edm.Double","inf":"Infinity","negativeinf@odata.type":"Edm.Double","negativeinf":"-Infinity","nan@odata.type":"Edm.Double","nan":"NaN"}'} 50 | headers: 51 | Cache-Control: [no-cache] 52 | Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] 53 | Date: ['Fri, 10 Nov 2017 02:46:53 GMT'] 54 | ETag: [W/"datetime'2017-11-10T02%3A46%3A53.636692Z'"] 55 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 56 | Transfer-Encoding: [chunked] 57 | X-Content-Type-Options: [nosniff] 58 | x-ms-request-id: [a07116c2-0002-0101-6cce-59e4d2000000] 59 | x-ms-version: ['2017-04-17'] 60 | status: {code: 200, message: OK} 61 | version: 1 62 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table_entity.test_insert_entity_class_instance.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"PartitionKey": "pk25d3152b", "RowKey": "rk25d3152b", "age": "39", "age@odata.type": 4 | "Edm.Int64", "sex": "male", "married": true, "deceased": false, "optional": 5 | null, "evenratio": 3.0, "ratio": 3.1, "large": "933311100", "large@odata.type": 6 | "Edm.Int64", "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", 7 | "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", "binary": 8 | "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", 9 | "clsid@odata.type": "Edm.Guid"}' 10 | headers: 11 | Accept: [application/json;odata=minimalmetadata] 12 | Connection: [keep-alive] 13 | Content-Length: ['555'] 14 | Content-Type: [application/json] 15 | DataServiceVersion: [3.0;NetFx] 16 | MaxDataServiceVersion: ['3.0'] 17 | Prefer: [return-no-content] 18 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 19 | x-ms-client-request-id: [696b215c-c5c1-11e7-8372-a08cfdf04b77] 20 | x-ms-date: ['Fri, 10 Nov 2017 02:46:54 GMT'] 21 | x-ms-version: ['2017-04-17'] 22 | method: POST 23 | uri: https://storagename.table.core.windows.net/uttable25d3152b 24 | response: 25 | body: {string: ''} 26 | headers: 27 | Cache-Control: [no-cache] 28 | Content-Length: ['0'] 29 | DataServiceId: ['https://storagename.table.core.windows.net/uttable25d3152b(PartitionKey=''pk25d3152b'',RowKey=''rk25d3152b'')'] 30 | Date: ['Fri, 10 Nov 2017 02:46:54 GMT'] 31 | ETag: [W/"datetime'2017-11-10T02%3A46%3A54.7239024Z'"] 32 | Location: ['https://storagename.table.core.windows.net/uttable25d3152b(PartitionKey=''pk25d3152b'',RowKey=''rk25d3152b'')'] 33 | Preference-Applied: [return-no-content] 34 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 35 | X-Content-Type-Options: [nosniff] 36 | x-ms-request-id: [b8c37279-0002-0074-7ace-59253c000000] 37 | x-ms-version: ['2017-04-17'] 38 | status: {code: 204, message: No Content} 39 | version: 1 40 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table_entity.test_insert_entity_conflict.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"PartitionKey": "pkace512b3", "RowKey": "rkace512b3", "age": "39", "age@odata.type": 4 | "Edm.Int64", "sex": "male", "married": true, "deceased": false, "optional": 5 | null, "evenratio": 3.0, "ratio": 3.1, "large": "933311100", "large@odata.type": 6 | "Edm.Int64", "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", 7 | "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", "binary": 8 | "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", 9 | "clsid@odata.type": "Edm.Guid"}' 10 | headers: 11 | Accept: [application/json;odata=minimalmetadata] 12 | Connection: [keep-alive] 13 | Content-Length: ['555'] 14 | Content-Type: [application/json] 15 | DataServiceVersion: [3.0;NetFx] 16 | MaxDataServiceVersion: ['3.0'] 17 | Prefer: [return-no-content] 18 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 19 | x-ms-client-request-id: [6a1c2e88-c5c1-11e7-a295-a08cfdf04b77] 20 | x-ms-date: ['Fri, 10 Nov 2017 02:46:55 GMT'] 21 | x-ms-version: ['2017-04-17'] 22 | method: POST 23 | uri: https://storagename.table.core.windows.net/uttableace512b3 24 | response: 25 | body: {string: ''} 26 | headers: 27 | Cache-Control: [no-cache] 28 | Content-Length: ['0'] 29 | DataServiceId: ['https://storagename.table.core.windows.net/uttableace512b3(PartitionKey=''pkace512b3'',RowKey=''rkace512b3'')'] 30 | Date: ['Fri, 10 Nov 2017 02:46:55 GMT'] 31 | ETag: [W/"datetime'2017-11-10T02%3A46%3A55.7383596Z'"] 32 | Location: ['https://storagename.table.core.windows.net/uttableace512b3(PartitionKey=''pkace512b3'',RowKey=''rkace512b3'')'] 33 | Preference-Applied: [return-no-content] 34 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 35 | X-Content-Type-Options: [nosniff] 36 | x-ms-request-id: [e9c8ca97-0002-0027-34ce-593933000000] 37 | x-ms-version: ['2017-04-17'] 38 | status: {code: 204, message: No Content} 39 | - request: 40 | body: '{"PartitionKey": "pkace512b3", "RowKey": "rkace512b3", "age": "39", "age@odata.type": 41 | "Edm.Int64", "sex": "male", "married": true, "deceased": false, "optional": 42 | null, "evenratio": 3.0, "ratio": 3.1, "large": "933311100", "large@odata.type": 43 | "Edm.Int64", "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", 44 | "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", "binary": 45 | "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", 46 | "clsid@odata.type": "Edm.Guid", "etag": "W/\"datetime''2017-11-10T02%3A46%3A55.7383596Z''\""}' 47 | headers: 48 | Accept: [application/json;odata=minimalmetadata] 49 | Connection: [keep-alive] 50 | Content-Length: ['615'] 51 | Content-Type: [application/json] 52 | DataServiceVersion: [3.0;NetFx] 53 | MaxDataServiceVersion: ['3.0'] 54 | Prefer: [return-no-content] 55 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 56 | x-ms-client-request-id: [6a565be8-c5c1-11e7-8b11-a08cfdf04b77] 57 | x-ms-date: ['Fri, 10 Nov 2017 02:46:56 GMT'] 58 | x-ms-version: ['2017-04-17'] 59 | method: POST 60 | uri: https://storagename.table.core.windows.net/uttableace512b3 61 | response: 62 | body: {string: '{"odata.error":{"code":"EntityAlreadyExists","message":{"lang":"en-US","value":"The 63 | specified entity already exists.\nRequestId:e9c8caae-0002-0027-49ce-593933000000\nTime:2017-11-10T02:46:55.8494648Z"}}}'} 64 | headers: 65 | Cache-Control: [no-cache] 66 | Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] 67 | Date: ['Fri, 10 Nov 2017 02:46:55 GMT'] 68 | Preference-Applied: [return-no-content] 69 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 70 | Transfer-Encoding: [chunked] 71 | X-Content-Type-Options: [nosniff] 72 | x-ms-request-id: [e9c8caae-0002-0027-49ce-593933000000] 73 | x-ms-version: ['2017-04-17'] 74 | status: {code: 409, message: Conflict} 75 | version: 1 76 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table_entity.test_insert_entity_dictionary.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"PartitionKey": "pkd3851397", "RowKey": "rkd3851397", "age": "39", "age@odata.type": 4 | "Edm.Int64", "sex": "male", "married": true, "deceased": false, "optional": 5 | null, "ratio": 3.1, "evenratio": 3.0, "large": "933311100", "large@odata.type": 6 | "Edm.Int64", "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", 7 | "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", "binary": 8 | "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", 9 | "clsid@odata.type": "Edm.Guid"}' 10 | headers: 11 | Accept: [application/json;odata=minimalmetadata] 12 | Connection: [keep-alive] 13 | Content-Length: ['555'] 14 | Content-Type: [application/json] 15 | DataServiceVersion: [3.0;NetFx] 16 | MaxDataServiceVersion: ['3.0'] 17 | Prefer: [return-no-content] 18 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 19 | x-ms-client-request-id: [6adc80c8-c5c1-11e7-b48b-a08cfdf04b77] 20 | x-ms-date: ['Fri, 10 Nov 2017 02:46:57 GMT'] 21 | x-ms-version: ['2017-04-17'] 22 | method: POST 23 | uri: https://storagename.table.core.windows.net/uttabled3851397 24 | response: 25 | body: {string: ''} 26 | headers: 27 | Cache-Control: [no-cache] 28 | Content-Length: ['0'] 29 | DataServiceId: ['https://storagename.table.core.windows.net/uttabled3851397(PartitionKey=''pkd3851397'',RowKey=''rkd3851397'')'] 30 | Date: ['Fri, 10 Nov 2017 02:46:56 GMT'] 31 | ETag: [W/"datetime'2017-11-10T02%3A46%3A57.0430859Z'"] 32 | Location: ['https://storagename.table.core.windows.net/uttabled3851397(PartitionKey=''pkd3851397'',RowKey=''rkd3851397'')'] 33 | Preference-Applied: [return-no-content] 34 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 35 | X-Content-Type-Options: [nosniff] 36 | x-ms-request-id: [aa80e3a3-0002-0006-4bce-595402000000] 37 | x-ms-version: ['2017-04-17'] 38 | status: {code: 204, message: No Content} 39 | version: 1 40 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table_entity.test_insert_entity_empty_string_pk.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"RowKey": "rk", "PartitionKey": ""}' 4 | headers: 5 | Accept: [application/json;odata=minimalmetadata] 6 | Connection: [keep-alive] 7 | Content-Length: ['36'] 8 | Content-Type: [application/json] 9 | DataServiceVersion: [3.0;NetFx] 10 | MaxDataServiceVersion: ['3.0'] 11 | Prefer: [return-no-content] 12 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 13 | x-ms-client-request-id: [6b8eecbe-c5c1-11e7-9941-a08cfdf04b77] 14 | x-ms-date: ['Fri, 10 Nov 2017 02:46:58 GMT'] 15 | x-ms-version: ['2017-04-17'] 16 | method: POST 17 | uri: https://storagename.table.core.windows.net/uttable3d1615c0 18 | response: 19 | body: {string: ''} 20 | headers: 21 | Cache-Control: [no-cache] 22 | Content-Length: ['0'] 23 | DataServiceId: ['https://storagename.table.core.windows.net/uttable3d1615c0(PartitionKey='''',RowKey=''rk'')'] 24 | Date: ['Fri, 10 Nov 2017 02:46:58 GMT'] 25 | ETag: [W/"datetime'2017-11-10T02%3A46%3A58.31814Z'"] 26 | Location: ['https://storagename.table.core.windows.net/uttable3d1615c0(PartitionKey='''',RowKey=''rk'')'] 27 | Preference-Applied: [return-no-content] 28 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 29 | X-Content-Type-Options: [nosniff] 30 | x-ms-request-id: [753e4f32-0002-0010-18ce-59959c000000] 31 | x-ms-version: ['2017-04-17'] 32 | status: {code: 204, message: No Content} 33 | version: 1 34 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table_entity.test_insert_entity_empty_string_rk.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"PartitionKey": "pk", "RowKey": ""}' 4 | headers: 5 | Accept: [application/json;odata=minimalmetadata] 6 | Connection: [keep-alive] 7 | Content-Length: ['36'] 8 | Content-Type: [application/json] 9 | DataServiceVersion: [3.0;NetFx] 10 | MaxDataServiceVersion: ['3.0'] 11 | Prefer: [return-no-content] 12 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 13 | x-ms-client-request-id: [6c415aac-c5c1-11e7-96d4-a08cfdf04b77] 14 | x-ms-date: ['Fri, 10 Nov 2017 02:46:59 GMT'] 15 | x-ms-version: ['2017-04-17'] 16 | method: POST 17 | uri: https://storagename.table.core.windows.net/uttable3d1a15c2 18 | response: 19 | body: {string: ''} 20 | headers: 21 | Cache-Control: [no-cache] 22 | Content-Length: ['0'] 23 | DataServiceId: ['https://storagename.table.core.windows.net/uttable3d1a15c2(PartitionKey=''pk'',RowKey='''')'] 24 | Date: ['Fri, 10 Nov 2017 02:46:59 GMT'] 25 | ETag: [W/"datetime'2017-11-10T02%3A46%3A59.6952543Z'"] 26 | Location: ['https://storagename.table.core.windows.net/uttable3d1a15c2(PartitionKey=''pk'',RowKey='''')'] 27 | Preference-Applied: [return-no-content] 28 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 29 | X-Content-Type-Options: [nosniff] 30 | x-ms-request-id: [b0894ab9-0002-004b-1ece-5992e0000000] 31 | x-ms-version: ['2017-04-17'] 32 | status: {code: 204, message: No Content} 33 | version: 1 34 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table_entity.test_insert_or_merge_entity_with_non_existing_entity.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"PartitionKey": "pk7671d3c", "RowKey": "rk7671d3c", "age": "abc", "sex": 4 | "female", "sign": "aquarius", "birthday": "1991-10-04T00:00:00Z", "birthday@odata.type": 5 | "Edm.DateTime"}' 6 | headers: 7 | Accept: [application/json;odata=minimalmetadata] 8 | Connection: [keep-alive] 9 | Content-Length: ['178'] 10 | Content-Type: [application/json] 11 | DataServiceVersion: [3.0;NetFx] 12 | MaxDataServiceVersion: ['3.0'] 13 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 14 | x-ms-client-request-id: [6f7a067a-c5c1-11e7-a5a0-a08cfdf04b77] 15 | x-ms-date: ['Fri, 10 Nov 2017 02:47:04 GMT'] 16 | x-ms-version: ['2017-04-17'] 17 | method: MERGE 18 | uri: https://storagename.table.core.windows.net/uttable7671d3c(PartitionKey='pk7671d3c',RowKey='rk7671d3c') 19 | response: 20 | body: {string: ''} 21 | headers: 22 | Cache-Control: [no-cache] 23 | Content-Length: ['0'] 24 | Date: ['Fri, 10 Nov 2017 02:47:04 GMT'] 25 | ETag: [W/"datetime'2017-11-10T02%3A47%3A04.9475504Z'"] 26 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 27 | X-Content-Type-Options: [nosniff] 28 | x-ms-request-id: [ed5c7898-0002-012b-6ece-599197000000] 29 | x-ms-version: ['2017-04-17'] 30 | status: {code: 204, message: No Content} 31 | - request: 32 | body: null 33 | headers: 34 | Accept: [application/json;odata=minimalmetadata] 35 | Connection: [keep-alive] 36 | DataServiceVersion: [3.0;NetFx] 37 | MaxDataServiceVersion: ['3.0'] 38 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 39 | x-ms-client-request-id: [6fb5332c-c5c1-11e7-a542-a08cfdf04b77] 40 | x-ms-date: ['Fri, 10 Nov 2017 02:47:05 GMT'] 41 | x-ms-version: ['2017-04-17'] 42 | method: GET 43 | uri: https://storagename.table.core.windows.net/uttable7671d3c(PartitionKey='pk7671d3c',RowKey='rk7671d3c') 44 | response: 45 | body: {string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable7671d3c/@Element","odata.etag":"W/\"datetime''2017-11-10T02%3A47%3A04.9475504Z''\"","PartitionKey":"pk7671d3c","RowKey":"rk7671d3c","Timestamp":"2017-11-10T02:47:04.9475504Z","age":"abc","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","sex":"female","sign":"aquarius"}'} 46 | headers: 47 | Cache-Control: [no-cache] 48 | Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] 49 | Date: ['Fri, 10 Nov 2017 02:47:04 GMT'] 50 | ETag: [W/"datetime'2017-11-10T02%3A47%3A04.9475504Z'"] 51 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 52 | Transfer-Encoding: [chunked] 53 | X-Content-Type-Options: [nosniff] 54 | x-ms-request-id: [ed5c78a9-0002-012b-7dce-599197000000] 55 | x-ms-version: ['2017-04-17'] 56 | status: {code: 200, message: OK} 57 | version: 1 58 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table_entity.test_insert_or_replace_entity_with_non_existing_entity.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"PartitionKey": "pk419d1e08", "RowKey": "rk419d1e08", "age": "abc", "sex": 4 | "female", "sign": "aquarius", "birthday": "1991-10-04T00:00:00Z", "birthday@odata.type": 5 | "Edm.DateTime"}' 6 | headers: 7 | Accept: [application/json;odata=minimalmetadata] 8 | Connection: [keep-alive] 9 | Content-Length: ['180'] 10 | Content-Type: [application/json] 11 | DataServiceVersion: [3.0;NetFx] 12 | MaxDataServiceVersion: ['3.0'] 13 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 14 | x-ms-client-request-id: [710c7be4-c5c1-11e7-8da4-a08cfdf04b77] 15 | x-ms-date: ['Fri, 10 Nov 2017 02:47:07 GMT'] 16 | x-ms-version: ['2017-04-17'] 17 | method: PUT 18 | uri: https://storagename.table.core.windows.net/uttable419d1e08(PartitionKey='pk419d1e08',RowKey='rk419d1e08') 19 | response: 20 | body: {string: ''} 21 | headers: 22 | Cache-Control: [no-cache] 23 | Content-Length: ['0'] 24 | Date: ['Fri, 10 Nov 2017 02:47:07 GMT'] 25 | ETag: [W/"datetime'2017-11-10T02%3A47%3A07.5830597Z'"] 26 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 27 | X-Content-Type-Options: [nosniff] 28 | x-ms-request-id: [2191b328-0002-0044-0cce-597f16000000] 29 | x-ms-version: ['2017-04-17'] 30 | status: {code: 204, message: No Content} 31 | - request: 32 | body: null 33 | headers: 34 | Accept: [application/json;odata=minimalmetadata] 35 | Connection: [keep-alive] 36 | DataServiceVersion: [3.0;NetFx] 37 | MaxDataServiceVersion: ['3.0'] 38 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 39 | x-ms-client-request-id: [71474aca-c5c1-11e7-b495-a08cfdf04b77] 40 | x-ms-date: ['Fri, 10 Nov 2017 02:47:07 GMT'] 41 | x-ms-version: ['2017-04-17'] 42 | method: GET 43 | uri: https://storagename.table.core.windows.net/uttable419d1e08(PartitionKey='pk419d1e08',RowKey='rk419d1e08') 44 | response: 45 | body: {string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable419d1e08/@Element","odata.etag":"W/\"datetime''2017-11-10T02%3A47%3A07.5830597Z''\"","PartitionKey":"pk419d1e08","RowKey":"rk419d1e08","Timestamp":"2017-11-10T02:47:07.5830597Z","age":"abc","birthday@odata.type":"Edm.DateTime","birthday":"1991-10-04T00:00:00Z","sex":"female","sign":"aquarius"}'} 46 | headers: 47 | Cache-Control: [no-cache] 48 | Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] 49 | Date: ['Fri, 10 Nov 2017 02:47:07 GMT'] 50 | ETag: [W/"datetime'2017-11-10T02%3A47%3A07.5830597Z'"] 51 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 52 | Transfer-Encoding: [chunked] 53 | X-Content-Type-Options: [nosniff] 54 | x-ms-request-id: [2191b334-0002-0044-16ce-597f16000000] 55 | x-ms-version: ['2017-04-17'] 56 | status: {code: 200, message: OK} 57 | version: 1 58 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table_entity.test_merge_entity_not_existing.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"PartitionKey": "pke64a13f7", "RowKey": "rke64a13f7", "age": "abc", "sex": 4 | "female", "sign": "aquarius", "birthday": "1991-10-04T00:00:00Z", "birthday@odata.type": 5 | "Edm.DateTime"}' 6 | headers: 7 | Accept: [application/json;odata=minimalmetadata] 8 | Connection: [keep-alive] 9 | Content-Length: ['180'] 10 | Content-Type: [application/json] 11 | DataServiceVersion: [3.0;NetFx] 12 | If-Match: ['*'] 13 | MaxDataServiceVersion: ['3.0'] 14 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 15 | x-ms-client-request-id: [72a3bda4-c5c1-11e7-b87b-a08cfdf04b77] 16 | x-ms-date: ['Fri, 10 Nov 2017 02:47:10 GMT'] 17 | x-ms-version: ['2017-04-17'] 18 | method: MERGE 19 | uri: https://storagename.table.core.windows.net/uttablee64a13f7(PartitionKey='pke64a13f7',RowKey='rke64a13f7') 20 | response: 21 | body: {string: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The 22 | specified resource does not exist.\nRequestId:5ddb951b-0002-0128-58ce-599290000000\nTime:2017-11-10T02:47:10.1715676Z"}}}'} 23 | headers: 24 | Cache-Control: [no-cache] 25 | Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] 26 | Date: ['Fri, 10 Nov 2017 02:47:09 GMT'] 27 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 28 | Transfer-Encoding: [chunked] 29 | X-Content-Type-Options: [nosniff] 30 | x-ms-request-id: [5ddb951b-0002-0128-58ce-599290000000] 31 | x-ms-version: ['2017-04-17'] 32 | status: {code: 404, message: Not Found} 33 | version: 1 34 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table_entity.test_merge_entity_with_if_doesnt_match.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"PartitionKey": "pk9316171e", "RowKey": "rk9316171e", "age": "39", "age@odata.type": 4 | "Edm.Int64", "sex": "male", "married": true, "deceased": false, "optional": 5 | null, "evenratio": 3.0, "ratio": 3.1, "large": "933311100", "large@odata.type": 6 | "Edm.Int64", "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", 7 | "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", "binary": 8 | "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", 9 | "clsid@odata.type": "Edm.Guid"}' 10 | headers: 11 | Accept: [application/json;odata=minimalmetadata] 12 | Connection: [keep-alive] 13 | Content-Length: ['555'] 14 | Content-Type: [application/json] 15 | DataServiceVersion: [3.0;NetFx] 16 | MaxDataServiceVersion: ['3.0'] 17 | Prefer: [return-no-content] 18 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 19 | x-ms-client-request-id: [735a240a-c5c1-11e7-aac3-a08cfdf04b77] 20 | x-ms-date: ['Fri, 10 Nov 2017 02:47:11 GMT'] 21 | x-ms-version: ['2017-04-17'] 22 | method: POST 23 | uri: https://storagename.table.core.windows.net/uttable9316171e 24 | response: 25 | body: {string: ''} 26 | headers: 27 | Cache-Control: [no-cache] 28 | Content-Length: ['0'] 29 | DataServiceId: ['https://storagename.table.core.windows.net/uttable9316171e(PartitionKey=''pk9316171e'',RowKey=''rk9316171e'')'] 30 | Date: ['Fri, 10 Nov 2017 02:47:11 GMT'] 31 | ETag: [W/"datetime'2017-11-10T02%3A47%3A11.3241444Z'"] 32 | Location: ['https://storagename.table.core.windows.net/uttable9316171e(PartitionKey=''pk9316171e'',RowKey=''rk9316171e'')'] 33 | Preference-Applied: [return-no-content] 34 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 35 | X-Content-Type-Options: [nosniff] 36 | x-ms-request-id: [3d288b72-0002-013f-2bce-5952f3000000] 37 | x-ms-version: ['2017-04-17'] 38 | status: {code: 204, message: No Content} 39 | - request: 40 | body: '{"PartitionKey": "pk9316171e", "RowKey": "rk9316171e", "age": "abc", "sex": 41 | "female", "sign": "aquarius", "birthday": "1991-10-04T00:00:00Z", "birthday@odata.type": 42 | "Edm.DateTime"}' 43 | headers: 44 | Accept: [application/json;odata=minimalmetadata] 45 | Connection: [keep-alive] 46 | Content-Length: ['180'] 47 | Content-Type: [application/json] 48 | DataServiceVersion: [3.0;NetFx] 49 | If-Match: [W/"datetime'2012-06-15T22%3A51%3A44.9662825Z'"] 50 | MaxDataServiceVersion: ['3.0'] 51 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 52 | x-ms-client-request-id: [73952ef6-c5c1-11e7-9e01-a08cfdf04b77] 53 | x-ms-date: ['Fri, 10 Nov 2017 02:47:11 GMT'] 54 | x-ms-version: ['2017-04-17'] 55 | method: MERGE 56 | uri: https://storagename.table.core.windows.net/uttable9316171e(PartitionKey='pk9316171e',RowKey='rk9316171e') 57 | response: 58 | body: {string: '{"odata.error":{"code":"UpdateConditionNotSatisfied","message":{"lang":"en-US","value":"The 59 | update condition specified in the request was not satisfied.\nRequestId:3d288b84-0002-013f-38ce-5952f3000000\nTime:2017-11-10T02:47:11.4332484Z"}}}'} 60 | headers: 61 | Cache-Control: [no-cache] 62 | Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] 63 | Date: ['Fri, 10 Nov 2017 02:47:11 GMT'] 64 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 65 | Transfer-Encoding: [chunked] 66 | X-Content-Type-Options: [nosniff] 67 | x-ms-request-id: [3d288b84-0002-013f-38ce-5952f3000000] 68 | x-ms-version: ['2017-04-17'] 69 | status: {code: 412, message: Precondition Failed} 70 | version: 1 71 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table_entity.test_none_property_value.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"PartitionKey": "pk76561181", "RowKey": "rk76561181", "NoneValue": null}' 4 | headers: 5 | Accept: [application/json;odata=minimalmetadata] 6 | Connection: [keep-alive] 7 | Content-Length: ['73'] 8 | Content-Type: [application/json] 9 | DataServiceVersion: [3.0;NetFx] 10 | MaxDataServiceVersion: ['3.0'] 11 | Prefer: [return-no-content] 12 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 13 | x-ms-client-request-id: [74f19186-c5c1-11e7-857d-a08cfdf04b77] 14 | x-ms-date: ['Fri, 10 Nov 2017 02:47:13 GMT'] 15 | x-ms-version: ['2017-04-17'] 16 | method: POST 17 | uri: https://storagename.table.core.windows.net/uttable76561181 18 | response: 19 | body: {string: ''} 20 | headers: 21 | Cache-Control: [no-cache] 22 | Content-Length: ['0'] 23 | DataServiceId: ['https://storagename.table.core.windows.net/uttable76561181(PartitionKey=''pk76561181'',RowKey=''rk76561181'')'] 24 | Date: ['Fri, 10 Nov 2017 02:47:13 GMT'] 25 | ETag: [W/"datetime'2017-11-10T02%3A47%3A14.0728399Z'"] 26 | Location: ['https://storagename.table.core.windows.net/uttable76561181(PartitionKey=''pk76561181'',RowKey=''rk76561181'')'] 27 | Preference-Applied: [return-no-content] 28 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 29 | X-Content-Type-Options: [nosniff] 30 | x-ms-request-id: [bf5d5b6e-0002-0094-02ce-59c3b4000000] 31 | x-ms-version: ['2017-04-17'] 32 | status: {code: 204, message: No Content} 33 | - request: 34 | body: null 35 | headers: 36 | Accept: [application/json;odata=minimalmetadata] 37 | Connection: [keep-alive] 38 | DataServiceVersion: [3.0;NetFx] 39 | MaxDataServiceVersion: ['3.0'] 40 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 41 | x-ms-client-request-id: [752c342e-c5c1-11e7-ac38-a08cfdf04b77] 42 | x-ms-date: ['Fri, 10 Nov 2017 02:47:14 GMT'] 43 | x-ms-version: ['2017-04-17'] 44 | method: GET 45 | uri: https://storagename.table.core.windows.net/uttable76561181(PartitionKey='pk76561181',RowKey='rk76561181') 46 | response: 47 | body: {string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable76561181/@Element","odata.etag":"W/\"datetime''2017-11-10T02%3A47%3A14.0728399Z''\"","PartitionKey":"pk76561181","RowKey":"rk76561181","Timestamp":"2017-11-10T02:47:14.0728399Z"}'} 48 | headers: 49 | Cache-Control: [no-cache] 50 | Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] 51 | Date: ['Fri, 10 Nov 2017 02:47:13 GMT'] 52 | ETag: [W/"datetime'2017-11-10T02%3A47%3A14.0728399Z'"] 53 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 54 | Transfer-Encoding: [chunked] 55 | X-Content-Type-Options: [nosniff] 56 | x-ms-request-id: [bf5d5b95-0002-0094-26ce-59c3b4000000] 57 | x-ms-version: ['2017-04-17'] 58 | status: {code: 200, message: OK} 59 | version: 1 60 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table_entity.test_query_entities_with_filter.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"PartitionKey": "pkfce8146b", "RowKey": "rkfce8146b", "age": "39", "age@odata.type": 4 | "Edm.Int64", "sex": "male", "married": true, "deceased": false, "optional": 5 | null, "evenratio": 3.0, "ratio": 3.1, "large": "933311100", "large@odata.type": 6 | "Edm.Int64", "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", 7 | "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", "binary": 8 | "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", 9 | "clsid@odata.type": "Edm.Guid"}' 10 | headers: 11 | Accept: [application/json;odata=minimalmetadata] 12 | Connection: [keep-alive] 13 | Content-Length: ['555'] 14 | Content-Type: [application/json] 15 | DataServiceVersion: [3.0;NetFx] 16 | MaxDataServiceVersion: ['3.0'] 17 | Prefer: [return-no-content] 18 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 19 | x-ms-client-request-id: [81313e30-c5c1-11e7-b3c7-a08cfdf04b77] 20 | x-ms-date: ['Fri, 10 Nov 2017 02:47:34 GMT'] 21 | x-ms-version: ['2017-04-17'] 22 | method: POST 23 | uri: https://storagename.table.core.windows.net/uttablefce8146b 24 | response: 25 | body: {string: ''} 26 | headers: 27 | Cache-Control: [no-cache] 28 | Content-Length: ['0'] 29 | DataServiceId: ['https://storagename.table.core.windows.net/uttablefce8146b(PartitionKey=''pkfce8146b'',RowKey=''rkfce8146b'')'] 30 | Date: ['Fri, 10 Nov 2017 02:47:34 GMT'] 31 | ETag: [W/"datetime'2017-11-10T02%3A47%3A34.7116719Z'"] 32 | Location: ['https://storagename.table.core.windows.net/uttablefce8146b(PartitionKey=''pkfce8146b'',RowKey=''rkfce8146b'')'] 33 | Preference-Applied: [return-no-content] 34 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 35 | X-Content-Type-Options: [nosniff] 36 | x-ms-request-id: [2febe6b7-0002-010f-68ce-5908d9000000] 37 | x-ms-version: ['2017-04-17'] 38 | status: {code: 204, message: No Content} 39 | - request: 40 | body: null 41 | headers: 42 | Accept: [application/json;odata=minimalmetadata] 43 | Connection: [keep-alive] 44 | DataServiceVersion: [3.0;NetFx] 45 | MaxDataServiceVersion: ['3.0'] 46 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 47 | x-ms-client-request-id: [817dbf98-c5c1-11e7-a95e-a08cfdf04b77] 48 | x-ms-date: ['Fri, 10 Nov 2017 02:47:34 GMT'] 49 | x-ms-version: ['2017-04-17'] 50 | method: GET 51 | uri: https://storagename.table.core.windows.net/uttablefce8146b()?%24filter=PartitionKey+eq+%27pkfce8146b%27 52 | response: 53 | body: {string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablefce8146b","value":[{"odata.etag":"W/\"datetime''2017-11-10T02%3A47%3A34.7116719Z''\"","PartitionKey":"pkfce8146b","RowKey":"rkfce8146b","Timestamp":"2017-11-10T02:47:34.7116719Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"evenratio":3.0,"ratio":3.1,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}]}'} 54 | headers: 55 | Cache-Control: [no-cache] 56 | Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] 57 | Date: ['Fri, 10 Nov 2017 02:47:34 GMT'] 58 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 59 | Transfer-Encoding: [chunked] 60 | X-Content-Type-Options: [nosniff] 61 | x-ms-request-id: [2febe6d6-0002-010f-03ce-5908d9000000] 62 | x-ms-version: ['2017-04-17'] 63 | status: {code: 200, message: OK} 64 | version: 1 65 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table_entity.test_query_zero_entities.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"TableName": "querytable7732118a"}' 4 | headers: 5 | Accept: [application/json;odata=minimalmetadata] 6 | Connection: [keep-alive] 7 | Content-Length: ['35'] 8 | Content-Type: [application/json] 9 | DataServiceVersion: [3.0;NetFx] 10 | MaxDataServiceVersion: ['3.0'] 11 | Prefer: [return-no-content] 12 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 13 | x-ms-client-request-id: [85fc8f82-c5c1-11e7-9acb-a08cfdf04b77] 14 | x-ms-date: ['Fri, 10 Nov 2017 02:47:42 GMT'] 15 | x-ms-version: ['2017-04-17'] 16 | method: POST 17 | uri: https://storagename.table.core.windows.net/Tables 18 | response: 19 | body: {string: ''} 20 | headers: 21 | Cache-Control: [no-cache] 22 | Content-Length: ['0'] 23 | DataServiceId: ['https://storagename.table.core.windows.net/Tables(''querytable7732118a'')'] 24 | Date: ['Fri, 10 Nov 2017 02:47:42 GMT'] 25 | Location: ['https://storagename.table.core.windows.net/Tables(''querytable7732118a'')'] 26 | Preference-Applied: [return-no-content] 27 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 28 | X-Content-Type-Options: [nosniff] 29 | x-ms-request-id: [1b23fbef-0002-00b8-03ce-594189000000] 30 | x-ms-version: ['2017-04-17'] 31 | status: {code: 204, message: No Content} 32 | - request: 33 | body: '--batch_8636bce8-c5c1-11e7-b255-a08cfdf04b77 34 | 35 | Content-Type: multipart/mixed; boundary=changeset_8636bce9-c5c1-11e7-af4b-a08cfdf04b77 36 | 37 | 38 | --changeset_8636bce9-c5c1-11e7-af4b-a08cfdf04b77-- 39 | 40 | --batch_8636bce8-c5c1-11e7-b255-a08cfdf04b77--' 41 | headers: 42 | Connection: [keep-alive] 43 | Content-Length: ['230'] 44 | Content-Type: [multipart/mixed; boundary=batch_8636bce8-c5c1-11e7-b255-a08cfdf04b77] 45 | DataServiceVersion: [3.0;NetFx] 46 | MaxDataServiceVersion: ['3.0'] 47 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 48 | x-ms-client-request-id: [8636bcea-c5c1-11e7-b077-a08cfdf04b77] 49 | x-ms-date: ['Fri, 10 Nov 2017 02:47:42 GMT'] 50 | x-ms-version: ['2017-04-17'] 51 | method: POST 52 | uri: https://storagename.table.core.windows.net/$batch 53 | response: 54 | body: {string: "--batchresponse_b339b635-548d-4696-8323-e6914e588e37\r\nContent-Type:\ 55 | \ multipart/mixed; boundary=changesetresponse_d7036860-5ae9-4d47-856e-3c7f5012b4dc\r\ 56 | \n\r\n--changesetresponse_d7036860-5ae9-4d47-856e-3c7f5012b4dc--\r\n--batchresponse_b339b635-548d-4696-8323-e6914e588e37--\r\ 57 | \n"} 58 | headers: 59 | Cache-Control: [no-cache] 60 | Content-Type: [multipart/mixed; boundary=batchresponse_b339b635-548d-4696-8323-e6914e588e37] 61 | Date: ['Fri, 10 Nov 2017 02:47:42 GMT'] 62 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 63 | Transfer-Encoding: [chunked] 64 | X-Content-Type-Options: [nosniff] 65 | x-ms-request-id: [1b23fbf4-0002-00b8-06ce-594189000000] 66 | x-ms-version: ['2017-04-17'] 67 | status: {code: 202, message: Accepted} 68 | - request: 69 | body: null 70 | headers: 71 | Accept: [application/json;odata=minimalmetadata] 72 | Connection: [keep-alive] 73 | DataServiceVersion: [3.0;NetFx] 74 | MaxDataServiceVersion: ['3.0'] 75 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 76 | x-ms-client-request-id: [8646c55c-c5c1-11e7-a6ba-a08cfdf04b77] 77 | x-ms-date: ['Fri, 10 Nov 2017 02:47:43 GMT'] 78 | x-ms-version: ['2017-04-17'] 79 | method: GET 80 | uri: https://storagename.table.core.windows.net/querytable7732118a() 81 | response: 82 | body: {string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#querytable7732118a","value":[]}'} 83 | headers: 84 | Cache-Control: [no-cache] 85 | Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] 86 | Date: ['Fri, 10 Nov 2017 02:47:42 GMT'] 87 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 88 | Transfer-Encoding: [chunked] 89 | X-Content-Type-Options: [nosniff] 90 | x-ms-request-id: [1b23fbfb-0002-00b8-0dce-594189000000] 91 | x-ms-version: ['2017-04-17'] 92 | status: {code: 200, message: OK} 93 | version: 1 94 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table_entity.test_timezone.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"PartitionKey": "pkcd510cdc", "RowKey": "rkcd510cdc", "date": "2003-09-27T12:52:43Z", 4 | "date@odata.type": "Edm.DateTime"}' 5 | headers: 6 | Accept: [application/json;odata=minimalmetadata] 7 | Connection: [keep-alive] 8 | Content-Length: ['121'] 9 | Content-Type: [application/json] 10 | DataServiceVersion: [3.0;NetFx] 11 | MaxDataServiceVersion: ['3.0'] 12 | Prefer: [return-no-content] 13 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 14 | x-ms-client-request-id: [892edc38-c5c1-11e7-b54c-a08cfdf04b77] 15 | x-ms-date: ['Fri, 10 Nov 2017 02:47:47 GMT'] 16 | x-ms-version: ['2017-04-17'] 17 | method: POST 18 | uri: https://storagename.table.core.windows.net/uttablecd510cdc 19 | response: 20 | body: {string: ''} 21 | headers: 22 | Cache-Control: [no-cache] 23 | Content-Length: ['0'] 24 | DataServiceId: ['https://storagename.table.core.windows.net/uttablecd510cdc(PartitionKey=''pkcd510cdc'',RowKey=''rkcd510cdc'')'] 25 | Date: ['Fri, 10 Nov 2017 02:47:47 GMT'] 26 | ETag: [W/"datetime'2017-11-10T02%3A47%3A48.1817151Z'"] 27 | Location: ['https://storagename.table.core.windows.net/uttablecd510cdc(PartitionKey=''pkcd510cdc'',RowKey=''rkcd510cdc'')'] 28 | Preference-Applied: [return-no-content] 29 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 30 | X-Content-Type-Options: [nosniff] 31 | x-ms-request-id: [987bbdbb-0002-0055-23ce-59480d000000] 32 | x-ms-version: ['2017-04-17'] 33 | status: {code: 204, message: No Content} 34 | - request: 35 | body: null 36 | headers: 37 | Accept: [application/json;odata=minimalmetadata] 38 | Connection: [keep-alive] 39 | DataServiceVersion: [3.0;NetFx] 40 | MaxDataServiceVersion: ['3.0'] 41 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 42 | x-ms-client-request-id: [8968e174-c5c1-11e7-a19b-a08cfdf04b77] 43 | x-ms-date: ['Fri, 10 Nov 2017 02:47:48 GMT'] 44 | x-ms-version: ['2017-04-17'] 45 | method: GET 46 | uri: https://storagename.table.core.windows.net/uttablecd510cdc(PartitionKey='pkcd510cdc',RowKey='rkcd510cdc') 47 | response: 48 | body: {string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttablecd510cdc/@Element","odata.etag":"W/\"datetime''2017-11-10T02%3A47%3A48.1817151Z''\"","PartitionKey":"pkcd510cdc","RowKey":"rkcd510cdc","Timestamp":"2017-11-10T02:47:48.1817151Z","date@odata.type":"Edm.DateTime","date":"2003-09-27T12:52:43Z"}'} 49 | headers: 50 | Cache-Control: [no-cache] 51 | Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] 52 | Date: ['Fri, 10 Nov 2017 02:47:48 GMT'] 53 | ETag: [W/"datetime'2017-11-10T02%3A47%3A48.1817151Z'"] 54 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 55 | Transfer-Encoding: [chunked] 56 | X-Content-Type-Options: [nosniff] 57 | x-ms-request-id: [987bbdc6-0002-0055-2cce-59480d000000] 58 | x-ms-version: ['2017-04-17'] 59 | status: {code: 200, message: OK} 60 | version: 1 61 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/recordings/test_table_entity.test_update_entity_with_if_doesnt_match.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"PartitionKey": "pkabcb1791", "RowKey": "rkabcb1791", "age": "39", "age@odata.type": 4 | "Edm.Int64", "sex": "male", "married": true, "deceased": false, "optional": 5 | null, "evenratio": 3.0, "ratio": 3.1, "large": "933311100", "large@odata.type": 6 | "Edm.Int64", "Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", 7 | "birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "Edm.DateTime", "binary": 8 | "YmluYXJ5", "binary@odata.type": "Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833", 9 | "clsid@odata.type": "Edm.Guid"}' 10 | headers: 11 | Accept: [application/json;odata=minimalmetadata] 12 | Connection: [keep-alive] 13 | Content-Length: ['555'] 14 | Content-Type: [application/json] 15 | DataServiceVersion: [3.0;NetFx] 16 | MaxDataServiceVersion: ['3.0'] 17 | Prefer: [return-no-content] 18 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 19 | x-ms-client-request-id: [8c6846f6-c5c1-11e7-99c5-a08cfdf04b77] 20 | x-ms-date: ['Fri, 10 Nov 2017 02:47:53 GMT'] 21 | x-ms-version: ['2017-04-17'] 22 | method: POST 23 | uri: https://storagename.table.core.windows.net/uttableabcb1791 24 | response: 25 | body: {string: ''} 26 | headers: 27 | Cache-Control: [no-cache] 28 | Content-Length: ['0'] 29 | DataServiceId: ['https://storagename.table.core.windows.net/uttableabcb1791(PartitionKey=''pkabcb1791'',RowKey=''rkabcb1791'')'] 30 | Date: ['Fri, 10 Nov 2017 02:47:53 GMT'] 31 | ETag: [W/"datetime'2017-11-10T02%3A47%3A53.4303279Z'"] 32 | Location: ['https://storagename.table.core.windows.net/uttableabcb1791(PartitionKey=''pkabcb1791'',RowKey=''rkabcb1791'')'] 33 | Preference-Applied: [return-no-content] 34 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 35 | X-Content-Type-Options: [nosniff] 36 | x-ms-request-id: [8295ed05-0002-0026-17ce-5938ce000000] 37 | x-ms-version: ['2017-04-17'] 38 | status: {code: 204, message: No Content} 39 | - request: 40 | body: '{"PartitionKey": "pkabcb1791", "RowKey": "rkabcb1791", "age": "abc", "sex": 41 | "female", "sign": "aquarius", "birthday": "1991-10-04T00:00:00Z", "birthday@odata.type": 42 | "Edm.DateTime"}' 43 | headers: 44 | Accept: [application/json;odata=minimalmetadata] 45 | Connection: [keep-alive] 46 | Content-Length: ['180'] 47 | Content-Type: [application/json] 48 | DataServiceVersion: [3.0;NetFx] 49 | If-Match: [W/"datetime'2012-06-15T22%3A51%3A44.9662825Z'"] 50 | MaxDataServiceVersion: ['3.0'] 51 | User-Agent: [Azure-Storage/0.37.1-None (Python CPython 3.6.0; Windows 10)] 52 | x-ms-client-request-id: [8ca385f8-c5c1-11e7-bbdc-a08cfdf04b77] 53 | x-ms-date: ['Fri, 10 Nov 2017 02:47:53 GMT'] 54 | x-ms-version: ['2017-04-17'] 55 | method: PUT 56 | uri: https://storagename.table.core.windows.net/uttableabcb1791(PartitionKey='pkabcb1791',RowKey='rkabcb1791') 57 | response: 58 | body: {string: '{"odata.error":{"code":"UpdateConditionNotSatisfied","message":{"lang":"en-US","value":"The 59 | update condition specified in the request was not satisfied.\nRequestId:8295ed19-0002-0026-29ce-5938ce000000\nTime:2017-11-10T02:47:53.5374325Z"}}}'} 60 | headers: 61 | Cache-Control: [no-cache] 62 | Content-Type: [application/json;odata=minimalmetadata;streaming=true;charset=utf-8] 63 | Date: ['Fri, 10 Nov 2017 02:47:53 GMT'] 64 | Server: [Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0] 65 | Transfer-Encoding: [chunked] 66 | X-Content-Type-Options: [nosniff] 67 | x-ms-request-id: [8295ed19-0002-0026-29ce-5938ce000000] 68 | x-ms-version: ['2017-04-17'] 69 | status: {code: 412, message: Precondition Failed} 70 | version: 1 71 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/run-storage.bat: -------------------------------------------------------------------------------- 1 | @echo OFF 2 | SETLOCAL 3 | REM---------------------------------------------------------------------------- 4 | REM Copyright (c) Microsoft. All rights reserved. 5 | REM 6 | REM Licensed under the Apache License, Version 2.0 (the "License"); 7 | REM you may not use this file except in compliance with the License. 8 | REM You may obtain a copy of the License at 9 | REM http://www.apache.org/licenses/LICENSE-2.0 10 | REM 11 | REM Unless required by applicable law or agreed to in writing, software 12 | REM distributed under the License is distributed on an "AS IS" BASIS, 13 | REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | REM See the License for the specific language governing permissions and 15 | REM limitations under the License. 16 | REM---------------------------------------------------------------------------- 17 | cls 18 | 19 | if "%1%" == "" ( 20 | set PYTHONDIR=%SystemDrive%\Python27 21 | ) else ( 22 | set PYTHONDIR=%1% 23 | ) 24 | 25 | if "%PYTHONPATH%" == "" ( 26 | set PYTHONPATH=. 27 | ) 28 | 29 | set PYTHONPATH=%PYTHONPATH%;.. 30 | 31 | echo Running tests using %PYTHONDIR% 32 | %PYTHONDIR%\python.exe -m unittest discover -p "test_*.py" 33 | 34 | 35 | set UNITTEST_EC=%ERRORLEVEL% 36 | echo Finished running tests! 37 | 38 | 39 | REM --------------------------------------------------------------------------- 40 | :exit_door 41 | exit /B %UNITTEST_EC% -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/settings_fake.py: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------------------- 2 | # Copyright (c) Microsoft. All rights reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | #-------------------------------------------------------------------------- 15 | 16 | # NOTE: these keys are fake, but valid base-64 data, they were generated using: 17 | # base64.b64encode(os.urandom(64)) 18 | 19 | STORAGE_ACCOUNT_NAME = "storagename" 20 | STORAGE_ACCOUNT_KEY = "NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==" 21 | BLOB_STORAGE_ACCOUNT_NAME = "blobstoragename" 22 | BLOB_STORAGE_ACCOUNT_KEY = "NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==" 23 | REMOTE_STORAGE_ACCOUNT_NAME = "remotestoragename" 24 | REMOTE_STORAGE_ACCOUNT_KEY = "3pJwX7wjxoQEW2nKAhJZARpQWpKvPOUN9JwoV/HhlMmJlS1pORhzzHpPfQqgFcwGsriu6dwYqnugWOjGShC5VQ==" 25 | PREMIUM_STORAGE_ACCOUNT_NAME = "premiumstoragename" 26 | PREMIUM_STORAGE_ACCOUNT_KEY = "NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==" 27 | 28 | # Use instead of STORAGE_ACCOUNT_NAME and STORAGE_ACCOUNT_KEY if custom settings are needed 29 | CONNECTION_STRING = "" 30 | BLOB_CONNECTION_STRING = "" 31 | PREMIUM_CONNECTION_STRING = "" 32 | 33 | # Use 'https' or 'http' protocol for sending requests, 'https' highly recommended 34 | PROTOCOL = "https" 35 | 36 | # Set to true to target the development storage emulator 37 | IS_EMULATED = False 38 | 39 | # Set to true if server side file encryption is enabled 40 | IS_SERVER_SIDE_FILE_ENCRYPTION_ENABLED = False 41 | 42 | # Decide which test mode to run against. Possible options: 43 | # - Playback: run against stored recordings 44 | # - Record: run tests against live storage and update recordings 45 | # - RunLiveNoRecord: run tests against live storage without altering recordings 46 | TEST_MODE = 'RunLiveNoRecord' 47 | 48 | # Set up proxy support 49 | USE_PROXY = False 50 | PROXY_HOST = "192.168.15.116" 51 | PROXY_PORT = "8118" 52 | PROXY_USER = "" 53 | PROXY_PASSWORD = "" 54 | -------------------------------------------------------------------------------- /azure-cosmosdb-table/tests/table/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-cosmos-table-python/25e99050f93b1f76f19bbd2534502955d0247aac/azure-cosmosdb-table/tests/table/__init__.py -------------------------------------------------------------------------------- /build_packages.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # ------------------------------------------------------------------------- 4 | # Copyright (c) Microsoft. All rights reserved. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # -------------------------------------------------------------------------- 17 | 18 | import argparse 19 | import os 20 | from subprocess import check_call 21 | 22 | DEFAULT_DESTINATION_FOLDER = "../dist" 23 | package_list = ['azure-cosmosdb-table', 'azure-cosmosdb-nspkg'] 24 | 25 | 26 | def create_package(name, dest_folder=DEFAULT_DESTINATION_FOLDER): 27 | absdirpath = os.path.abspath(name) 28 | check_call(['python', 'setup.py', 'bdist_wheel', '-d', dest_folder], cwd=absdirpath) 29 | check_call(['python', 'setup.py', "sdist", '-d', dest_folder], cwd=absdirpath) 30 | 31 | 32 | if __name__ == '__main__': 33 | parser = argparse.ArgumentParser(description='Build Azure package.') 34 | parser.add_argument('name', help='The package name') 35 | parser.add_argument('--dest', '-d', default=DEFAULT_DESTINATION_FOLDER, 36 | help='Destination folder. Relative to the package dir. [default: %(default)s]') 37 | 38 | args = parser.parse_args() 39 | if args.name == 'all': 40 | for package in package_list: 41 | create_package(package, args.dest) 42 | else: 43 | create_package(args.name, args.dest) -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | futures;python_version<="2.7" 2 | python-dateutil 3 | requests>=2.9.2 4 | vcrpy 5 | azure-common 6 | cryptography>=1.3.0 --------------------------------------------------------------------------------