azure-data-tables


Nameazure-data-tables JSON
Version 12.4.3 PyPI version JSON
download
home_pagehttps://github.com/Azure/azure-sdk-for-python/tree/main/sdk/table/azure-table
SummaryMicrosoft Azure Azure Data Tables Client Library for Python
upload_time2023-06-13 22:49:54
maintainerNone
docs_urlNone
authorMicrosoft Corporation
requires_python>=3.7
licenseMIT License
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # Azure Tables client library for Python

Azure Tables is a NoSQL data storage service that can be accessed from anywhere in the world via authenticated calls using HTTP or HTTPS.
Tables scales as needed to support the amount of data inserted, and allow for the storing of data with non-complex accessing.
The Azure Tables client can be used to access Azure Storage or Cosmos accounts. This document covers [`azure-data-tables`][Tables_pypi].

Please note, this package is a replacement for [`azure-cosmosdb-tables`](https://github.com/Azure/azure-cosmos-table-python/tree/master/azure-cosmosdb-table) which is now deprecated. See the [migration guide][migration_guide] for more details.

[Source code][source_code]
| [Package (PyPI)][Tables_pypi]
| [Package (Conda)](https://anaconda.org/microsoft/azure-data-tables/)
| [API reference documentation][Tables_ref_docs]
| [Samples][Tables_samples]

## _Disclaimer_

_Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For more information and questions, please refer to https://github.com/Azure/azure-sdk-for-python/issues/20691_
_Python 3.7 or later is required to use this package. For more details, please refer to [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy)._

## Getting started
The Azure Tables SDK can access an Azure Storage or CosmosDB account.

### Prerequisites
* Python 3.7 or later is required to use this package.
* You must have an [Azure subscription][azure_subscription] and either
    * an [Azure Storage account][azure_storage_account] or
    * an [Azure Cosmos Account][azure_cosmos_account].

#### Create account
* To create a new storage account, you can use [Azure Portal][azure_portal_create_account], [Azure PowerShell][azure_powershell_create_account], or [Azure CLI][azure_cli_create_account]:
* To create a new cosmos storage account, you can use the [Azure CLI][azure_cli_create_cosmos] or [Azure Portal][azure_portal_create_cosmos].

### Install the package
Install the Azure Tables client library for Python with [pip][pip_link]:
```bash
pip install azure-data-tables
```

#### Create the client
The Azure Tables library allows you to interact with two types of resources:
* the tables in your account
* the entities within those tables.
Interaction with these resources starts with an instance of a [client](#clients). To create a client object, you will need the account's table service endpoint URL and a credential that allows you to access the account. The `endpoint` can be found on the page for your storage account in the [Azure Portal][azure_portal_account_url] under the "Access Keys" section or by running the following Azure CLI command:

```bash
# Get the table service URL for the account
az storage account show -n mystorageaccount -g MyResourceGroup --query "primaryEndpoints.table"
```

Once you have the account URL, it can be used to create the service client:
```python
from azure.data.tables import TableServiceClient
service = TableServiceClient(endpoint="https://<my_account_name>.table.core.windows.net/", credential=credential)
```

For more information about table service URL's and how to configure custom domain names for Azure Storage check out the [official documentation][azure_portal_account_url]

#### Types of credentials
The `credential` parameter may be provided in a number of different forms, depending on the type of authorization you wish to use. The Tables library supports the following authorizations:
* Shared Key
* Connection String
* Shared Access Signature Token

##### Creating the client from a shared key
To use an account [shared key][azure_shared_key] (aka account key or access key), provide the key as a string. This can be found in your storage account in the [Azure Portal][azure_portal_account_url] under the "Access Keys" section or by running the following Azure CLI command:

```bash
az storage account keys list -g MyResourceGroup -n MyStorageAccount
```

Use the key as the credential parameter to authenticate the client:
```python
from azure.core.credentials import AzureNamedKeyCredential
from azure.data.tables import TableServiceClient

credential = AzureNamedKeyCredential("my_account_name", "my_access_key")

service = TableServiceClient(endpoint="https://<my_account_name>.table.core.windows.net", credential=credential)
```

##### Creating the client from a connection string
Depending on your use case and authorization method, you may prefer to initialize a client instance with a connection string instead of providing the account URL and credential separately. To do this, pass the
connection string to the client's `from_connection_string` class method. The connection string can be found in your storage account in the [Azure Portal][azure_portal_account_url] under the "Access Keys" section or with the following Azure CLI command:

```bash
az storage account show-connection-string -g MyResourceGroup -n MyStorageAccount
```

```python
from azure.data.tables import TableServiceClient
connection_string = "DefaultEndpointsProtocol=https;AccountName=<my_account_name>;AccountKey=<my_account_key>;EndpointSuffix=core.windows.net"
service = TableServiceClient.from_connection_string(conn_str=connection_string)
```

##### Creating the client from a SAS token
To use a [shared access signature (SAS) token][azure_sas_token], provide the token as a string. If your account URL includes the SAS token, omit the credential parameter. You can generate a SAS token from the Azure Portal under [Shared access signature](https://docs.microsoft.com/rest/api/storageservices/create-service-sas) or use one of the `generate_*_sas()`
   functions to create a sas token for the account or table:

```python
from datetime import datetime, timedelta
from azure.data.tables import TableServiceClient, generate_account_sas, ResourceTypes, AccountSasPermissions
from azure.core.credentials import AzureNamedKeyCredential, AzureSasCredential

credential = AzureNamedKeyCredential("my_account_name", "my_access_key")
sas_token = generate_account_sas(
    credential,
    resource_types=ResourceTypes(service=True),
    permission=AccountSasPermissions(read=True),
    expiry=datetime.utcnow() + timedelta(hours=1),
)

table_service_client = TableServiceClient(endpoint="https://<my_account_name>.table.core.windows.net", credential=AzureSasCredential(sas_token))
```


## Key concepts
Common uses of the Table service included:
* Storing TBs of structured data capable of serving web scale applications
* Storing datasets that do not require complex joins, foreign keys, or stored procedures and can be de-normalized for fast access
* Quickly querying data using a clustered index
* Accessing data using the OData protocol and LINQ filter expressions

[comment]: # ( cspell:ignore LINQ )

The following components make up the Azure Tables Service:
* The account
* A table within the account, which contains a set of entities
* An entity within a table, as a dictionary

The Azure Tables client library for Python allows you to interact with each of these components through the
use of a dedicated client object.

### Clients
Two different clients are provided to interact with the various components of the Table Service:
1. **`TableServiceClient`** -
    * Get and set account setting
    * Query, create, and delete tables within the account.
    * Get a `TableClient` to access a specific table using the `get_table_client` method.
2. **`TableClient`** -
    * Interacts with a specific table (which need not exist yet).
    * Create, delete, query, and upsert entities within the specified table.
    * Create or delete the specified table itself.

### Entities
Entities are similar to rows. An entity has a **`PartitionKey`**, a **`RowKey`**, and a set of properties. A property is a name value pair, similar to a column. Every entity in a table does not need to have the same properties. Entities can be represented as dictionaries like this as an example:
```python
entity = {
    'PartitionKey': 'color',
    'RowKey': 'brand',
    'text': 'Marker',
    'color': 'Purple',
    'price': '5'
}
```
* **[create_entity][create_entity]** - Add an entity to the table.
* **[delete_entity][delete_entity]** - Delete an entity from the table.
* **[update_entity][update_entity]** - Update an entity's information by either merging or replacing the existing entity.
    * `UpdateMode.MERGE` will add new properties to an existing entity it will not delete an existing properties
    * `UpdateMode.REPLACE` will replace the existing entity with the given one, deleting any existing properties not included in the submitted entity
* **[query_entities][query_entities]** - Query existing entities in a table using [OData filters][odata_syntax].
* **[get_entity][get_entity]** - Get a specific entity from a table by partition and row key.
* **[upsert_entity][upsert_entity]** - Merge or replace an entity in a table, or if the entity does not exist, inserts the entity.
    * `UpdateMode.MERGE` will add new properties to an existing entity it will not delete an existing properties
    * `UpdateMode.REPLACE` will replace the existing entity with the given one, deleting any existing properties not included in the submitted entity

## Examples

The following sections provide several code snippets covering some of the most common Table tasks, including:

* [Creating a table](#creating-a-table "Creating a table")
* [Creating entities](#creating-entities "Creating entities")
* [Querying entities](#querying-entities "Querying entities")


### Creating a table
Create a table in your account and get a `TableClient` to perform operations on the newly created table:

```python
from azure.data.tables import TableServiceClient
table_service_client = TableServiceClient.from_connection_string(conn_str="<connection_string>")
table_name = "myTable"
table_client = table_service_client.create_table(table_name=table_name)
```

### Creating entities
Create entities in the table:

```python
from azure.data.tables import TableServiceClient
from datetime import datetime

PRODUCT_ID = u'001234'
PRODUCT_NAME = u'RedMarker'

my_entity = {
    u'PartitionKey': PRODUCT_NAME,
    u'RowKey': PRODUCT_ID,
    u'Stock': 15,
    u'Price': 9.99,
    u'Comments': u"great product",
    u'OnSale': True,
    u'ReducedPrice': 7.99,
    u'PurchaseDate': datetime(1973, 10, 4),
    u'BinaryRepresentation': b'product_name'
}

table_service_client = TableServiceClient.from_connection_string(conn_str="<connection_string>")
table_client = table_service_client.get_table_client(table_name="myTable")

entity = table_client.create_entity(entity=my_entity)
```

### Querying entities
Querying entities in the table:

```python
from azure.data.tables import TableClient
my_filter = "PartitionKey eq 'RedMarker'"
table_client = TableClient.from_connection_string(conn_str="<connection_string>", table_name="myTable")
entities = table_client.query_entities(my_filter)
for entity in entities:
    for key in entity.keys():
        print("Key: {}, Value: {}".format(key, entity[key]))
```

## Optional Configuration
Optional keyword arguments can be passed in at the client and per-operation level. The azure-core [reference documentation][azure_core_ref_docs] describes available configurations for retries, logging, transport protocols, and more.


### Retry Policy configuration

Use the following keyword arguments when instantiating a client to configure the retry policy:

* __retry_total__ (int): Total number of retries to allow. Takes precedence over other counts.
Pass in `retry_total=0` if you do not want to retry on requests. Defaults to 10.
* __retry_connect__ (int): How many connection-related errors to retry on. Defaults to 3.
* __retry_read__ (int): How many times to retry on read errors. Defaults to 3.
* __retry_status__ (int): How many times to retry on bad status codes. Defaults to 3.
* __retry_to_secondary__ (bool): Whether the request should be retried to secondary, if able.
This should only be enabled of RA-GRS accounts are used and potentially stale data can be handled.
Defaults to `False`.

### Other client / per-operation configuration

Other optional configuration keyword arguments that can be specified on the client or per-operation.

**Client keyword arguments:**

* __connection_timeout__ (int): Optionally sets the connect and read timeout value, in seconds.
* __transport__ (Any): User-provided transport to send the HTTP request.

**Per-operation keyword arguments:**

* __raw_response_hook__ (callable): The given callback uses the response returned from the service.
* __raw_request_hook__ (callable): The given callback uses the request before being sent to service.
* __client_request_id__ (str): Optional user specified identification of the request.
* __user_agent__ (str): Appends the custom value to the user-agent header to be sent with the request.
* __logging_enable__ (bool): Enables logging at the DEBUG level. Defaults to False. Can also be passed in at
the client level to enable it for all requests.
* __headers__ (dict): Pass in custom headers as key, value pairs. E.g. `headers={'CustomValue': value}`


## Troubleshooting

### General
Azure Tables clients raise exceptions defined in [Azure Core][azure_core_readme].
When you interact with the Azure table library using the Python SDK, errors returned by the service respond ot the same HTTP status codes for [REST API][tables_rest] requests. The Table service operations will throw a `HttpResponseError` on failure with helpful [error codes][tables_error_codes].

For examples, if you try to create a table that already exists, a `409` error is returned indicating "Conflict".
```python
from azure.data.tables import TableServiceClient
from azure.core.exceptions import HttpResponseError
table_name = 'YourTableName'

service_client = TableServiceClient.from_connection_string(connection_string)

# Create the table if it does not already exist
tc = service_client.create_table_if_not_exists(table_name)

try:
    service_client.create_table(table_name)
except HttpResponseError:
    print("Table with name {} already exists".format(table_name))
```

### Logging
This library uses the standard
[logging][python_logging] library for logging.
Basic information about HTTP sessions (URLs, headers, etc.) is logged at INFO
level.

Detailed DEBUG level logging, including request/response bodies and unredacted
headers, can be enabled on a client with the `logging_enable` argument:
```python
import sys
import logging
from azure.data.tables import TableServiceClient
# Create a logger for the 'azure' SDK
logger = logging.getLogger('azure')
logger.setLevel(logging.DEBUG)

# Configure a console output
handler = logging.StreamHandler(stream=sys.stdout)
logger.addHandler(handler)

# This client will log detailed information about its HTTP sessions, at DEBUG level
service_client = TableServiceClient.from_connection_string("your_connection_string", logging_enable=True)
```

Similarly, `logging_enable` can enable detailed logging for a single operation,
even when it is not enabled for the client:
```python
service_client.create_entity(entity=my_entity, logging_enable=True)
```

## Next steps

Get started with our [Table samples][tables_samples].

Several Azure Tables Python SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered while working with Tables.

### Common Scenarios
These code samples show common scenario operations with the Azure Tables client library. The async versions of the samples (the python sample files appended with _async) show asynchronous operations.

* Create and delete tables: [sample_create_delete_table.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables/samples/sample_create_delete_table.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables/samples/async_samples/sample_create_delete_table_async.py))
* List and query tables: [sample_query_tables.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables/samples/sample_query_tables.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables/samples/async_samples/sample_query_tables_async.py))
* Insert and delete entities: [sample_insert_delete_entities.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables/samples/sample_insert_delete_entities.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables/samples/async_samples/sample_insert_delete_entities_async.py))
* Query and list entities: [sample_query_table.py](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/tables/azure-data-tables/samples/sample_query_table.py) ([async version](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/tables/azure-data-tables/samples/async_samples/sample_query_table_async.py))
* Update, upsert, and merge entities: [sample_update_upsert_merge_entities.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables/samples/sample_update_upsert_merge_entities.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables/samples/async_samples/sample_update_upsert_merge_entities_async.py))
* Committing many requests in a single transaction: [sample_batching.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables/samples/sample_batching.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables/samples/async_samples/sample_batching_async.py))

### Additional documentation
For more extensive documentation on Azure Tables, see the [Azure Tables documentation][Tables_product_doc] on docs.microsoft.com.

## Known Issues
A list of currently known issues relating to Cosmos DB table endpoints can be found [here](https://aka.ms/tablesknownissues).

## Contributing
This project welcomes contributions and suggestions.  Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the [Microsoft Open Source Code of Conduct][msft_oss_coc]. For more information see the [Code of Conduct FAQ][msft_oss_coc_faq] or contact [opencode@microsoft.com][contact_msft_oss] with any additional questions or comments.

<!-- LINKS -->
[source_code]:https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables
[Tables_pypi]:https://aka.ms/azsdk/python/tablespypi
[Tables_ref_docs]:https://docs.microsoft.com/python/api/overview/azure/data-tables-readme?view=azure-python
[Tables_product_doc]:https://docs.microsoft.com/azure/cosmos-db/table-introduction
[Tables_samples]:https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables/samples
[migration_guide]:https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/tables/azure-data-tables/migration_guide.md

[azure_subscription]:https://azure.microsoft.com/free/
[azure_storage_account]:https://docs.microsoft.com/azure/storage/common/storage-account-create?tabs=azure-portal
[azure_cosmos_account]:https://docs.microsoft.com/azure/cosmos-db/create-cosmosdb-resources-portal
[pip_link]:https://pypi.org/project/pip/

[azure_create_cosmos]:https://docs.microsoft.com/azure/cosmos-db/create-cosmosdb-resources-portal
[azure_cli_create_cosmos]:https://docs.microsoft.com/azure/cosmos-db/scripts/cli/table/create
[azure_portal_create_cosmos]:https://docs.microsoft.com/azure/cosmos-db/create-cosmosdb-resources-portal
[azure_portal_create_account]:https://docs.microsoft.com/azure/storage/common/storage-account-create?tabs=azure-portal
[azure_powershell_create_account]:https://docs.microsoft.com/azure/storage/common/storage-account-create?tabs=azure-powershell
[azure_cli_create_account]: https://docs.microsoft.com/azure/storage/common/storage-account-create?tabs=azure-cli

[azure_cli_account_url]:https://docs.microsoft.com/cli/azure/storage/account?view=azure-cli-latest#az-storage-account-show
[azure_powershell_account_url]:https://docs.microsoft.com/powershell/module/az.storage/get-azstorageaccount?view=azps-4.6.1
[azure_portal_account_url]:https://docs.microsoft.com/azure/storage/common/storage-account-overview#storage-account-endpoints

[azure_sas_token]:https://docs.microsoft.com/azure/storage/common/storage-sas-overview
[azure_shared_key]:https://docs.microsoft.com/rest/api/storageservices/authorize-with-shared-key

[odata_syntax]:https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/tables/azure-data-tables/samples/README.md#writing-filters

[azure_core_ref_docs]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-core/latest/azure.core.html
[azure_core_readme]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/README.md

[python_logging]: https://docs.python.org/3/library/logging.html
[tables_error_codes]: https://docs.microsoft.com/rest/api/storageservices/table-service-error-codes

[msft_oss_coc]:https://opensource.microsoft.com/codeofconduct/
[msft_oss_coc_faq]:https://opensource.microsoft.com/codeofconduct/faq/
[contact_msft_oss]:mailto:opencode@microsoft.com

[tables_rest]: https://docs.microsoft.com/rest/api/storageservices/table-service-rest-api

[create_entity]:https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/tables/azure-data-tables/samples/sample_insert_delete_entities.py#L67-L73
[delete_entity]:https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/tables/azure-data-tables/samples/sample_insert_delete_entities.py#L89-L92
[update_entity]:https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/tables/azure-data-tables/samples/sample_update_upsert_merge_entities.py#L165-L181
[query_entities]:https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/tables/azure-data-tables/samples/sample_query_table.py#L75-L89
[get_entity]:https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/tables/azure-data-tables/samples/sample_update_upsert_merge_entities.py#L67-L71
[upsert_entity]:https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/tables/azure-data-tables/samples/sample_update_upsert_merge_entities.py#L155-L163

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python/sdk/tables/azure-data-tables/README.png)


# Release History

## 12.4.3 (2023-06-13)

### Bugs Fixed
* Fixed a bug in getting error attribute values when operations failed. ([#27410](https://github.com/Azure/azure-sdk-for-python/issues/27410))

### Other Changes
* Adjusted dependency on `isodate` to `<1.0.0,>=0.6.1`.

## 12.4.2 (2023-02-07)

### Bugs Fixed
* Fixed a bug when deleting an entity with partition key or row key in empty string.([#24480](https://github.com/Azure/azure-sdk-for-python/issues/24480))

### Other Changes
* Added support for Python 3.11.
* Dropped `msrest` requirement.
* Added dependency `isodate` with version range `>=0.6.0`(`isodate` was required by `msrest`).
* Added dependency `typing-extensions` with version range `>=4.3.0`.

## 12.4.1 (2022-10-11)

### Bugs Fixed
* Fix handling of client-side exceptions that get raised during service requests (such as [#21416](https://github.com/Azure/azure-sdk-for-python/issues/21416)) ([#24788](https://github.com/Azure/azure-sdk-for-python/pull/24788))

### Other Changes
* Python 3.6 is no longer supported. Please use Python version 3.7 or later.
* Bumped minimum dependency on `azure-core` to `>=1.24.0`.
* Bumped minimum dependency on `msrest` to `>=0.7.1`.
* Added dependency `yarl` with version range `<2.0,>=1.0`.

## 12.4.0 (2022-05-10)

### Features Added
* Support for multitenant authentication ([#24278](https://github.com/Azure/azure-sdk-for-python/pull/24278))

### Bugs Fixed
* Fixed bug where odmtype tag was not being included for boolean and int32 types even when a full EdmProperty tuple was passed in. This is needed for CLI compatibility.

[comment]: # ( cspell:ignore odmtype )

## 12.3.0 (2022-03-10)

### Bugs Fixed
* Validation of the table name has been removed from the constructor of the TableClient. Instead individual APIs will validate the table name and raise a ValueError only if the service rejects the request due to the table name not being valid (#23106)
* Fixed hard-coded URL scheme in batch requests (#21953)
* Improved documentation for query formatting in `query_entities` APIs (#23235)
* Removed unsecure debug logging

### Other Changes
* Python 2.7 is no longer supported. Please use Python version 3.6 or later.
* Bumped dependency on `azure-core` to `>=1.15.0`

## 12.2.0 (2021-11-10)
**Warning** This release involves a bug fix that may change the behaviour for some users. Partition and Row keys that contain a single quote character (`'`) will now be automatically escaped for upsert, update and delete entity operations. Partition and Row keys that were already escaped, or contained duplicate single quote char (`''`) will now be treated as unescaped values.


### Bugs Fixed
* Resolved bug where strings couldn't be used instead of enum value for entity Update Mode (#20247).
* Resolved bug where single quote characters in Partition and Row keys were not escaped correctly (#20301).

### Features Added
* Added support for async iterators in `aio.TableClient.submit_transaction (#21083, thank you yashbhutoria).

[comment]: # ( cspell:ignore yashbhutoria )

### Other Changes
* Bumped dependency on `msrest` to `>=0.6.21`

## 12.1.0 (2021-07-06)

### Features Added
* Storage Accounts only: `TableClient` and `TableServiceClient`s can now use `azure-identity` credentials for authentication. Note: A `TableClient` authenticated with a `TokenCredential` cannot use the `get_table_access_policy` or `set_table_access_policy` methods.

## 12.0.0 (2021-06-08)
**Breaking**
* EdmType.Binary data in entities will now be deserialized as `bytes` in Python 3 and `str` in Python 2, rather than an `EdmProperty` instance. Likewise on serialization, `bytes` in Python 3 and `str` in Python 2 will be interpreted as binary (this is unchanged for Python 3, but breaking for Python 2, where `str` was previously serialized as EdmType.String)
* `TableClient.create_table` now returns an instance of `TableItem`.
* All optional parameters for model constructors are now keyword-only.
* Storage service configuration models have now been prefixed with `Table`, including
  `TableAccessPolicy`, `TableMetrics`, `TableRetentionPolicy`, `TableCorsRule`
* All parameters for `TableServiceClient.set_service_properties` are now keyword-only.
* The `credential` parameter for all Clients is now keyword-only.
* The method `TableClient.get_access_policy` will now return `None` where previously it returned an "empty" access policy object.
* Timestamp properties on `TableAccessPolicy` instances returned from `TableClient.get_access_policy` will now be deserialized to `datetime` instances.

**Fixes**
* Fixed support for Cosmos emulator endpoint, via URL/credential or connection string.
* Fixed table name from URL parsing in `TableClient.from_table_url` classmethod.
* The `account_name` attribute on clients will now be pulled from an `AzureNamedKeyCredential` if used.
* Any additional odata metadata is returned in entity's metadata.
* The timestamp in entity metadata is now deserialized to a timestamp.
* If the `prefer` header is added in the `create_entity` operation, the echo will be returned.
* Errors raised on a 412 if-not-match error will now be a specific `azure.core.exceptions.ResourceModifiedError`.
* `EdmType.DOUBLE` values are now explicitly typed in the request payload.
* Fixed de/serialization of list attributes on `TableCorsRule`.

## 12.0.0b7 (2021-05-11)
**Breaking**
* The `account_url` parameter in the client constructors has been renamed to `endpoint`.
* The `TableEntity` object now acts exclusively like a dictionary, and no longer supports key access via attributes.
* Metadata of an entity is now accessed via `TableEntity.metadata` attribute rather than a method.
* Removed explicit `LinearRetry` and `ExponentialRetry` in favor of keyword parameter.
* Renamed `filter` parameter in query APIs to `query_filter`.
* The `location_mode` attribute on clients is now read-only. This has been added as a keyword parameter to the constructor.
* The `TableItem.table_name` has been renamed to `TableItem.name`.
* Removed the `TableClient.create_batch` method along with the `TableBatchOperations` object. The transactional batching is now supported via a simple Python list of tuples.
* `TableClient.send_batch` has been renamed to `TableClient.submit_transaction`.
* Removed `BatchTransactionResult` object in favor of returning an iterable of batched entities with returned metadata.
* Removed Batching context-manager behavior
* `EntityProperty` is now a NampedTuple, and can be represented by a tuple of `(entity, EdmType)`.
* Renamed `EntityProperty.type` to `EntityProperty.edm_type`.
* `BatchErrorException` has been renamed to `TableTransactionError`.
* The `location_mode` is no longer a public attribute on the Clients.
* The only supported credentials are `AzureNamedKeyCredential`, `AzureSasCredential`, or authentication by connection string
* Removed `date` and `api_version` from the `TableItem` class.

**Fixes**
* Fixed issue with Cosmos merge operations.
* Removed legacy Storage policies from pipeline.
* Removed unused legacy client-side encryption attributes from client classes.
* Fixed sharing of pipeline between service/table clients.
* Added support for Azurite storage emulator
* Throws a `RequestTooLargeError` on transaction requests that return a 413 error code
* Added support for Int64 and Binary types in query filters
* Added support for `select` keyword parameter to `TableClient.get_entity()`.
* On `update_entity` and `delete_entity` if no `etag` is supplied via kwargs, the `etag` in the entity will be used if it is in the entity.

## 12.0.0b6 (2021-04-06)
* Updated deserialization of datetime fields in entities to support preservation of the service format with additional decimal place.
* Passing a string parameter into a query filter will now be escaped to protect against injection.
* Fixed bug in incrementing retries in async retry policy

## 12.0.0b5 (2021-03-09)
* This version and all future versions will require Python 2.7 or Python 3.6+, Python 3.5 is no longer supported.
* Adds SAS credential as an authentication option
* Bumps minimum requirement of `azure-core` to 1.10.0
* Bumped minimum requirement of msrest from `0.6.10` to `0.6.19`.
* Adds support for datetime entities with milliseconds
* Adds support for Shared Access Signature authentication

## 12.0.0b4 (2021-01-12)
* Fixes an [issue](https://github.com/Azure/azure-sdk-for-python/issues/15554) where `query_entities` kwarg `parameters` would not work with multiple parameters or with non-string parameters. This now works with multiple parameters and numeric, string, boolean, UUID, and datetime objects.
* Fixes an [issue](https://github.com/Azure/azure-sdk-for-python/issues/15653) where `delete_entity` will return a `ClientAuthenticationError` when the '@' symbol is included in the entity.

## 12.0.0b3 (2020-11-12)
* Add support for transactional batching of entity operations.
* Fixed deserialization bug in `list_tables` and `query_tables` where `TableItem.table_name` was an object instead of a string.
* Fixed issue where unrecognized entity data fields were silently ignored. They will now raise a `TypeError`.
* Fixed issue where query filter parameters were being ignored (#15094)

## 12.0.0b2 (2020-10-07)
* Adds support for Enumerable types by converting the Enum to a string before sending to the service

## 12.0.0b1 (2020-09-08)
This is the first beta of the `azure-data-tables` client library. The Azure Tables client library can seamlessly target either Azure Table storage or Azure Cosmos DB table service endpoints with no code changes.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/table/azure-table",
    "name": "azure-data-tables",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": null,
    "author": "Microsoft Corporation",
    "author_email": "ascl@microsoft.com",
    "download_url": "https://files.pythonhosted.org/packages/ba/ac/408a1a30a4f9a1e288c65d619f24a9a02c8ff385b34816a3ce1f63f43bcc/azure-data-tables-12.4.3.zip",
    "platform": null,
    "description": "# Azure Tables client library for Python\n\nAzure Tables is a NoSQL data storage service that can be accessed from anywhere in the world via authenticated calls using HTTP or HTTPS.\nTables scales as needed to support the amount of data inserted, and allow for the storing of data with non-complex accessing.\nThe Azure Tables client can be used to access Azure Storage or Cosmos accounts. This document covers [`azure-data-tables`][Tables_pypi].\n\nPlease note, this package is a replacement for [`azure-cosmosdb-tables`](https://github.com/Azure/azure-cosmos-table-python/tree/master/azure-cosmosdb-table) which is now deprecated. See the [migration guide][migration_guide] for more details.\n\n[Source code][source_code]\n| [Package (PyPI)][Tables_pypi]\n| [Package (Conda)](https://anaconda.org/microsoft/azure-data-tables/)\n| [API reference documentation][Tables_ref_docs]\n| [Samples][Tables_samples]\n\n## _Disclaimer_\n\n_Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For more information and questions, please refer to https://github.com/Azure/azure-sdk-for-python/issues/20691_\n_Python 3.7 or later is required to use this package. For more details, please refer to [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy)._\n\n## Getting started\nThe Azure Tables SDK can access an Azure Storage or CosmosDB account.\n\n### Prerequisites\n* Python 3.7 or later is required to use this package.\n* You must have an [Azure subscription][azure_subscription] and either\n    * an [Azure Storage account][azure_storage_account] or\n    * an [Azure Cosmos Account][azure_cosmos_account].\n\n#### Create account\n* To create a new storage account, you can use [Azure Portal][azure_portal_create_account], [Azure PowerShell][azure_powershell_create_account], or [Azure CLI][azure_cli_create_account]:\n* To create a new cosmos storage account, you can use the [Azure CLI][azure_cli_create_cosmos] or [Azure Portal][azure_portal_create_cosmos].\n\n### Install the package\nInstall the Azure Tables client library for Python with [pip][pip_link]:\n```bash\npip install azure-data-tables\n```\n\n#### Create the client\nThe Azure Tables library allows you to interact with two types of resources:\n* the tables in your account\n* the entities within those tables.\nInteraction with these resources starts with an instance of a [client](#clients). To create a client object, you will need the account's table service endpoint URL and a credential that allows you to access the account. The `endpoint` can be found on the page for your storage account in the [Azure Portal][azure_portal_account_url] under the \"Access Keys\" section or by running the following Azure CLI command:\n\n```bash\n# Get the table service URL for the account\naz storage account show -n mystorageaccount -g MyResourceGroup --query \"primaryEndpoints.table\"\n```\n\nOnce you have the account URL, it can be used to create the service client:\n```python\nfrom azure.data.tables import TableServiceClient\nservice = TableServiceClient(endpoint=\"https://<my_account_name>.table.core.windows.net/\", credential=credential)\n```\n\nFor more information about table service URL's and how to configure custom domain names for Azure Storage check out the [official documentation][azure_portal_account_url]\n\n#### Types of credentials\nThe `credential` parameter may be provided in a number of different forms, depending on the type of authorization you wish to use. The Tables library supports the following authorizations:\n* Shared Key\n* Connection String\n* Shared Access Signature Token\n\n##### Creating the client from a shared key\nTo use an account [shared key][azure_shared_key] (aka account key or access key), provide the key as a string. This can be found in your storage account in the [Azure Portal][azure_portal_account_url] under the \"Access Keys\" section or by running the following Azure CLI command:\n\n```bash\naz storage account keys list -g MyResourceGroup -n MyStorageAccount\n```\n\nUse the key as the credential parameter to authenticate the client:\n```python\nfrom azure.core.credentials import AzureNamedKeyCredential\nfrom azure.data.tables import TableServiceClient\n\ncredential = AzureNamedKeyCredential(\"my_account_name\", \"my_access_key\")\n\nservice = TableServiceClient(endpoint=\"https://<my_account_name>.table.core.windows.net\", credential=credential)\n```\n\n##### Creating the client from a connection string\nDepending on your use case and authorization method, you may prefer to initialize a client instance with a connection string instead of providing the account URL and credential separately. To do this, pass the\nconnection string to the client's `from_connection_string` class method. The connection string can be found in your storage account in the [Azure Portal][azure_portal_account_url] under the \"Access Keys\" section or with the following Azure CLI command:\n\n```bash\naz storage account show-connection-string -g MyResourceGroup -n MyStorageAccount\n```\n\n```python\nfrom azure.data.tables import TableServiceClient\nconnection_string = \"DefaultEndpointsProtocol=https;AccountName=<my_account_name>;AccountKey=<my_account_key>;EndpointSuffix=core.windows.net\"\nservice = TableServiceClient.from_connection_string(conn_str=connection_string)\n```\n\n##### Creating the client from a SAS token\nTo use a [shared access signature (SAS) token][azure_sas_token], provide the token as a string. If your account URL includes the SAS token, omit the credential parameter. You can generate a SAS token from the Azure Portal under [Shared access signature](https://docs.microsoft.com/rest/api/storageservices/create-service-sas) or use one of the `generate_*_sas()`\n   functions to create a sas token for the account or table:\n\n```python\nfrom datetime import datetime, timedelta\nfrom azure.data.tables import TableServiceClient, generate_account_sas, ResourceTypes, AccountSasPermissions\nfrom azure.core.credentials import AzureNamedKeyCredential, AzureSasCredential\n\ncredential = AzureNamedKeyCredential(\"my_account_name\", \"my_access_key\")\nsas_token = generate_account_sas(\n    credential,\n    resource_types=ResourceTypes(service=True),\n    permission=AccountSasPermissions(read=True),\n    expiry=datetime.utcnow() + timedelta(hours=1),\n)\n\ntable_service_client = TableServiceClient(endpoint=\"https://<my_account_name>.table.core.windows.net\", credential=AzureSasCredential(sas_token))\n```\n\n\n## Key concepts\nCommon uses of the Table service included:\n* Storing TBs of structured data capable of serving web scale applications\n* Storing datasets that do not require complex joins, foreign keys, or stored procedures and can be de-normalized for fast access\n* Quickly querying data using a clustered index\n* Accessing data using the OData protocol and LINQ filter expressions\n\n[comment]: # ( cspell:ignore LINQ )\n\nThe following components make up the Azure Tables Service:\n* The account\n* A table within the account, which contains a set of entities\n* An entity within a table, as a dictionary\n\nThe Azure Tables client library for Python allows you to interact with each of these components through the\nuse of a dedicated client object.\n\n### Clients\nTwo different clients are provided to interact with the various components of the Table Service:\n1. **`TableServiceClient`** -\n    * Get and set account setting\n    * Query, create, and delete tables within the account.\n    * Get a `TableClient` to access a specific table using the `get_table_client` method.\n2. **`TableClient`** -\n    * Interacts with a specific table (which need not exist yet).\n    * Create, delete, query, and upsert entities within the specified table.\n    * Create or delete the specified table itself.\n\n### Entities\nEntities are similar to rows. An entity has a **`PartitionKey`**, a **`RowKey`**, and a set of properties. A property is a name value pair, similar to a column. Every entity in a table does not need to have the same properties. Entities can be represented as dictionaries like this as an example:\n```python\nentity = {\n    'PartitionKey': 'color',\n    'RowKey': 'brand',\n    'text': 'Marker',\n    'color': 'Purple',\n    'price': '5'\n}\n```\n* **[create_entity][create_entity]** - Add an entity to the table.\n* **[delete_entity][delete_entity]** - Delete an entity from the table.\n* **[update_entity][update_entity]** - Update an entity's information by either merging or replacing the existing entity.\n    * `UpdateMode.MERGE` will add new properties to an existing entity it will not delete an existing properties\n    * `UpdateMode.REPLACE` will replace the existing entity with the given one, deleting any existing properties not included in the submitted entity\n* **[query_entities][query_entities]** - Query existing entities in a table using [OData filters][odata_syntax].\n* **[get_entity][get_entity]** - Get a specific entity from a table by partition and row key.\n* **[upsert_entity][upsert_entity]** - Merge or replace an entity in a table, or if the entity does not exist, inserts the entity.\n    * `UpdateMode.MERGE` will add new properties to an existing entity it will not delete an existing properties\n    * `UpdateMode.REPLACE` will replace the existing entity with the given one, deleting any existing properties not included in the submitted entity\n\n## Examples\n\nThe following sections provide several code snippets covering some of the most common Table tasks, including:\n\n* [Creating a table](#creating-a-table \"Creating a table\")\n* [Creating entities](#creating-entities \"Creating entities\")\n* [Querying entities](#querying-entities \"Querying entities\")\n\n\n### Creating a table\nCreate a table in your account and get a `TableClient` to perform operations on the newly created table:\n\n```python\nfrom azure.data.tables import TableServiceClient\ntable_service_client = TableServiceClient.from_connection_string(conn_str=\"<connection_string>\")\ntable_name = \"myTable\"\ntable_client = table_service_client.create_table(table_name=table_name)\n```\n\n### Creating entities\nCreate entities in the table:\n\n```python\nfrom azure.data.tables import TableServiceClient\nfrom datetime import datetime\n\nPRODUCT_ID = u'001234'\nPRODUCT_NAME = u'RedMarker'\n\nmy_entity = {\n    u'PartitionKey': PRODUCT_NAME,\n    u'RowKey': PRODUCT_ID,\n    u'Stock': 15,\n    u'Price': 9.99,\n    u'Comments': u\"great product\",\n    u'OnSale': True,\n    u'ReducedPrice': 7.99,\n    u'PurchaseDate': datetime(1973, 10, 4),\n    u'BinaryRepresentation': b'product_name'\n}\n\ntable_service_client = TableServiceClient.from_connection_string(conn_str=\"<connection_string>\")\ntable_client = table_service_client.get_table_client(table_name=\"myTable\")\n\nentity = table_client.create_entity(entity=my_entity)\n```\n\n### Querying entities\nQuerying entities in the table:\n\n```python\nfrom azure.data.tables import TableClient\nmy_filter = \"PartitionKey eq 'RedMarker'\"\ntable_client = TableClient.from_connection_string(conn_str=\"<connection_string>\", table_name=\"myTable\")\nentities = table_client.query_entities(my_filter)\nfor entity in entities:\n    for key in entity.keys():\n        print(\"Key: {}, Value: {}\".format(key, entity[key]))\n```\n\n## Optional Configuration\nOptional keyword arguments can be passed in at the client and per-operation level. The azure-core [reference documentation][azure_core_ref_docs] describes available configurations for retries, logging, transport protocols, and more.\n\n\n### Retry Policy configuration\n\nUse the following keyword arguments when instantiating a client to configure the retry policy:\n\n* __retry_total__ (int): Total number of retries to allow. Takes precedence over other counts.\nPass in `retry_total=0` if you do not want to retry on requests. Defaults to 10.\n* __retry_connect__ (int): How many connection-related errors to retry on. Defaults to 3.\n* __retry_read__ (int): How many times to retry on read errors. Defaults to 3.\n* __retry_status__ (int): How many times to retry on bad status codes. Defaults to 3.\n* __retry_to_secondary__ (bool): Whether the request should be retried to secondary, if able.\nThis should only be enabled of RA-GRS accounts are used and potentially stale data can be handled.\nDefaults to `False`.\n\n### Other client / per-operation configuration\n\nOther optional configuration keyword arguments that can be specified on the client or per-operation.\n\n**Client keyword arguments:**\n\n* __connection_timeout__ (int): Optionally sets the connect and read timeout value, in seconds.\n* __transport__ (Any): User-provided transport to send the HTTP request.\n\n**Per-operation keyword arguments:**\n\n* __raw_response_hook__ (callable): The given callback uses the response returned from the service.\n* __raw_request_hook__ (callable): The given callback uses the request before being sent to service.\n* __client_request_id__ (str): Optional user specified identification of the request.\n* __user_agent__ (str): Appends the custom value to the user-agent header to be sent with the request.\n* __logging_enable__ (bool): Enables logging at the DEBUG level. Defaults to False. Can also be passed in at\nthe client level to enable it for all requests.\n* __headers__ (dict): Pass in custom headers as key, value pairs. E.g. `headers={'CustomValue': value}`\n\n\n## Troubleshooting\n\n### General\nAzure Tables clients raise exceptions defined in [Azure Core][azure_core_readme].\nWhen you interact with the Azure table library using the Python SDK, errors returned by the service respond ot the same HTTP status codes for [REST API][tables_rest] requests. The Table service operations will throw a `HttpResponseError` on failure with helpful [error codes][tables_error_codes].\n\nFor examples, if you try to create a table that already exists, a `409` error is returned indicating \"Conflict\".\n```python\nfrom azure.data.tables import TableServiceClient\nfrom azure.core.exceptions import HttpResponseError\ntable_name = 'YourTableName'\n\nservice_client = TableServiceClient.from_connection_string(connection_string)\n\n# Create the table if it does not already exist\ntc = service_client.create_table_if_not_exists(table_name)\n\ntry:\n    service_client.create_table(table_name)\nexcept HttpResponseError:\n    print(\"Table with name {} already exists\".format(table_name))\n```\n\n### Logging\nThis library uses the standard\n[logging][python_logging] library for logging.\nBasic information about HTTP sessions (URLs, headers, etc.) is logged at INFO\nlevel.\n\nDetailed DEBUG level logging, including request/response bodies and unredacted\nheaders, can be enabled on a client with the `logging_enable` argument:\n```python\nimport sys\nimport logging\nfrom azure.data.tables import TableServiceClient\n# Create a logger for the 'azure' SDK\nlogger = logging.getLogger('azure')\nlogger.setLevel(logging.DEBUG)\n\n# Configure a console output\nhandler = logging.StreamHandler(stream=sys.stdout)\nlogger.addHandler(handler)\n\n# This client will log detailed information about its HTTP sessions, at DEBUG level\nservice_client = TableServiceClient.from_connection_string(\"your_connection_string\", logging_enable=True)\n```\n\nSimilarly, `logging_enable` can enable detailed logging for a single operation,\neven when it is not enabled for the client:\n```python\nservice_client.create_entity(entity=my_entity, logging_enable=True)\n```\n\n## Next steps\n\nGet started with our [Table samples][tables_samples].\n\nSeveral Azure Tables Python SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered while working with Tables.\n\n### Common Scenarios\nThese code samples show common scenario operations with the Azure Tables client library. The async versions of the samples (the python sample files appended with _async) show asynchronous operations.\n\n* Create and delete tables: [sample_create_delete_table.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables/samples/sample_create_delete_table.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables/samples/async_samples/sample_create_delete_table_async.py))\n* List and query tables: [sample_query_tables.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables/samples/sample_query_tables.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables/samples/async_samples/sample_query_tables_async.py))\n* Insert and delete entities: [sample_insert_delete_entities.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables/samples/sample_insert_delete_entities.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables/samples/async_samples/sample_insert_delete_entities_async.py))\n* Query and list entities: [sample_query_table.py](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/tables/azure-data-tables/samples/sample_query_table.py) ([async version](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/tables/azure-data-tables/samples/async_samples/sample_query_table_async.py))\n* Update, upsert, and merge entities: [sample_update_upsert_merge_entities.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables/samples/sample_update_upsert_merge_entities.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables/samples/async_samples/sample_update_upsert_merge_entities_async.py))\n* Committing many requests in a single transaction: [sample_batching.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables/samples/sample_batching.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables/samples/async_samples/sample_batching_async.py))\n\n### Additional documentation\nFor more extensive documentation on Azure Tables, see the [Azure Tables documentation][Tables_product_doc] on docs.microsoft.com.\n\n## Known Issues\nA list of currently known issues relating to Cosmos DB table endpoints can be found [here](https://aka.ms/tablesknownissues).\n\n## Contributing\nThis project welcomes contributions and suggestions.  Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct][msft_oss_coc]. For more information see the [Code of Conduct FAQ][msft_oss_coc_faq] or contact [opencode@microsoft.com][contact_msft_oss] with any additional questions or comments.\n\n<!-- LINKS -->\n[source_code]:https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables\n[Tables_pypi]:https://aka.ms/azsdk/python/tablespypi\n[Tables_ref_docs]:https://docs.microsoft.com/python/api/overview/azure/data-tables-readme?view=azure-python\n[Tables_product_doc]:https://docs.microsoft.com/azure/cosmos-db/table-introduction\n[Tables_samples]:https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables/samples\n[migration_guide]:https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/tables/azure-data-tables/migration_guide.md\n\n[azure_subscription]:https://azure.microsoft.com/free/\n[azure_storage_account]:https://docs.microsoft.com/azure/storage/common/storage-account-create?tabs=azure-portal\n[azure_cosmos_account]:https://docs.microsoft.com/azure/cosmos-db/create-cosmosdb-resources-portal\n[pip_link]:https://pypi.org/project/pip/\n\n[azure_create_cosmos]:https://docs.microsoft.com/azure/cosmos-db/create-cosmosdb-resources-portal\n[azure_cli_create_cosmos]:https://docs.microsoft.com/azure/cosmos-db/scripts/cli/table/create\n[azure_portal_create_cosmos]:https://docs.microsoft.com/azure/cosmos-db/create-cosmosdb-resources-portal\n[azure_portal_create_account]:https://docs.microsoft.com/azure/storage/common/storage-account-create?tabs=azure-portal\n[azure_powershell_create_account]:https://docs.microsoft.com/azure/storage/common/storage-account-create?tabs=azure-powershell\n[azure_cli_create_account]: https://docs.microsoft.com/azure/storage/common/storage-account-create?tabs=azure-cli\n\n[azure_cli_account_url]:https://docs.microsoft.com/cli/azure/storage/account?view=azure-cli-latest#az-storage-account-show\n[azure_powershell_account_url]:https://docs.microsoft.com/powershell/module/az.storage/get-azstorageaccount?view=azps-4.6.1\n[azure_portal_account_url]:https://docs.microsoft.com/azure/storage/common/storage-account-overview#storage-account-endpoints\n\n[azure_sas_token]:https://docs.microsoft.com/azure/storage/common/storage-sas-overview\n[azure_shared_key]:https://docs.microsoft.com/rest/api/storageservices/authorize-with-shared-key\n\n[odata_syntax]:https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/tables/azure-data-tables/samples/README.md#writing-filters\n\n[azure_core_ref_docs]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-core/latest/azure.core.html\n[azure_core_readme]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/README.md\n\n[python_logging]: https://docs.python.org/3/library/logging.html\n[tables_error_codes]: https://docs.microsoft.com/rest/api/storageservices/table-service-error-codes\n\n[msft_oss_coc]:https://opensource.microsoft.com/codeofconduct/\n[msft_oss_coc_faq]:https://opensource.microsoft.com/codeofconduct/faq/\n[contact_msft_oss]:mailto:opencode@microsoft.com\n\n[tables_rest]: https://docs.microsoft.com/rest/api/storageservices/table-service-rest-api\n\n[create_entity]:https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/tables/azure-data-tables/samples/sample_insert_delete_entities.py#L67-L73\n[delete_entity]:https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/tables/azure-data-tables/samples/sample_insert_delete_entities.py#L89-L92\n[update_entity]:https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/tables/azure-data-tables/samples/sample_update_upsert_merge_entities.py#L165-L181\n[query_entities]:https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/tables/azure-data-tables/samples/sample_query_table.py#L75-L89\n[get_entity]:https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/tables/azure-data-tables/samples/sample_update_upsert_merge_entities.py#L67-L71\n[upsert_entity]:https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/tables/azure-data-tables/samples/sample_update_upsert_merge_entities.py#L155-L163\n\n![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python/sdk/tables/azure-data-tables/README.png)\n\n\n# Release History\n\n## 12.4.3 (2023-06-13)\n\n### Bugs Fixed\n* Fixed a bug in getting error attribute values when operations failed. ([#27410](https://github.com/Azure/azure-sdk-for-python/issues/27410))\n\n### Other Changes\n* Adjusted dependency on `isodate` to `<1.0.0,>=0.6.1`.\n\n## 12.4.2 (2023-02-07)\n\n### Bugs Fixed\n* Fixed a bug when deleting an entity with partition key or row key in empty string.([#24480](https://github.com/Azure/azure-sdk-for-python/issues/24480))\n\n### Other Changes\n* Added support for Python 3.11.\n* Dropped `msrest` requirement.\n* Added dependency `isodate` with version range `>=0.6.0`(`isodate` was required by `msrest`).\n* Added dependency `typing-extensions` with version range `>=4.3.0`.\n\n## 12.4.1 (2022-10-11)\n\n### Bugs Fixed\n* Fix handling of client-side exceptions that get raised during service requests (such as [#21416](https://github.com/Azure/azure-sdk-for-python/issues/21416)) ([#24788](https://github.com/Azure/azure-sdk-for-python/pull/24788))\n\n### Other Changes\n* Python 3.6 is no longer supported. Please use Python version 3.7 or later.\n* Bumped minimum dependency on `azure-core` to `>=1.24.0`.\n* Bumped minimum dependency on `msrest` to `>=0.7.1`.\n* Added dependency `yarl` with version range `<2.0,>=1.0`.\n\n## 12.4.0 (2022-05-10)\n\n### Features Added\n* Support for multitenant authentication ([#24278](https://github.com/Azure/azure-sdk-for-python/pull/24278))\n\n### Bugs Fixed\n* Fixed bug where odmtype tag was not being included for boolean and int32 types even when a full EdmProperty tuple was passed in. This is needed for CLI compatibility.\n\n[comment]: # ( cspell:ignore odmtype )\n\n## 12.3.0 (2022-03-10)\n\n### Bugs Fixed\n* Validation of the table name has been removed from the constructor of the TableClient. Instead individual APIs will validate the table name and raise a ValueError only if the service rejects the request due to the table name not being valid (#23106)\n* Fixed hard-coded URL scheme in batch requests (#21953)\n* Improved documentation for query formatting in `query_entities` APIs (#23235)\n* Removed unsecure debug logging\n\n### Other Changes\n* Python 2.7 is no longer supported. Please use Python version 3.6 or later.\n* Bumped dependency on `azure-core` to `>=1.15.0`\n\n## 12.2.0 (2021-11-10)\n**Warning** This release involves a bug fix that may change the behaviour for some users. Partition and Row keys that contain a single quote character (`'`) will now be automatically escaped for upsert, update and delete entity operations. Partition and Row keys that were already escaped, or contained duplicate single quote char (`''`) will now be treated as unescaped values.\n\n\n### Bugs Fixed\n* Resolved bug where strings couldn't be used instead of enum value for entity Update Mode (#20247).\n* Resolved bug where single quote characters in Partition and Row keys were not escaped correctly (#20301).\n\n### Features Added\n* Added support for async iterators in `aio.TableClient.submit_transaction (#21083, thank you yashbhutoria).\n\n[comment]: # ( cspell:ignore yashbhutoria )\n\n### Other Changes\n* Bumped dependency on `msrest` to `>=0.6.21`\n\n## 12.1.0 (2021-07-06)\n\n### Features Added\n* Storage Accounts only: `TableClient` and `TableServiceClient`s can now use `azure-identity` credentials for authentication. Note: A `TableClient` authenticated with a `TokenCredential` cannot use the `get_table_access_policy` or `set_table_access_policy` methods.\n\n## 12.0.0 (2021-06-08)\n**Breaking**\n* EdmType.Binary data in entities will now be deserialized as `bytes` in Python 3 and `str` in Python 2, rather than an `EdmProperty` instance. Likewise on serialization, `bytes` in Python 3 and `str` in Python 2 will be interpreted as binary (this is unchanged for Python 3, but breaking for Python 2, where `str` was previously serialized as EdmType.String)\n* `TableClient.create_table` now returns an instance of `TableItem`.\n* All optional parameters for model constructors are now keyword-only.\n* Storage service configuration models have now been prefixed with `Table`, including\n  `TableAccessPolicy`, `TableMetrics`, `TableRetentionPolicy`, `TableCorsRule`\n* All parameters for `TableServiceClient.set_service_properties` are now keyword-only.\n* The `credential` parameter for all Clients is now keyword-only.\n* The method `TableClient.get_access_policy` will now return `None` where previously it returned an \"empty\" access policy object.\n* Timestamp properties on `TableAccessPolicy` instances returned from `TableClient.get_access_policy` will now be deserialized to `datetime` instances.\n\n**Fixes**\n* Fixed support for Cosmos emulator endpoint, via URL/credential or connection string.\n* Fixed table name from URL parsing in `TableClient.from_table_url` classmethod.\n* The `account_name` attribute on clients will now be pulled from an `AzureNamedKeyCredential` if used.\n* Any additional odata metadata is returned in entity's metadata.\n* The timestamp in entity metadata is now deserialized to a timestamp.\n* If the `prefer` header is added in the `create_entity` operation, the echo will be returned.\n* Errors raised on a 412 if-not-match error will now be a specific `azure.core.exceptions.ResourceModifiedError`.\n* `EdmType.DOUBLE` values are now explicitly typed in the request payload.\n* Fixed de/serialization of list attributes on `TableCorsRule`.\n\n## 12.0.0b7 (2021-05-11)\n**Breaking**\n* The `account_url` parameter in the client constructors has been renamed to `endpoint`.\n* The `TableEntity` object now acts exclusively like a dictionary, and no longer supports key access via attributes.\n* Metadata of an entity is now accessed via `TableEntity.metadata` attribute rather than a method.\n* Removed explicit `LinearRetry` and `ExponentialRetry` in favor of keyword parameter.\n* Renamed `filter` parameter in query APIs to `query_filter`.\n* The `location_mode` attribute on clients is now read-only. This has been added as a keyword parameter to the constructor.\n* The `TableItem.table_name` has been renamed to `TableItem.name`.\n* Removed the `TableClient.create_batch` method along with the `TableBatchOperations` object. The transactional batching is now supported via a simple Python list of tuples.\n* `TableClient.send_batch` has been renamed to `TableClient.submit_transaction`.\n* Removed `BatchTransactionResult` object in favor of returning an iterable of batched entities with returned metadata.\n* Removed Batching context-manager behavior\n* `EntityProperty` is now a NampedTuple, and can be represented by a tuple of `(entity, EdmType)`.\n* Renamed `EntityProperty.type` to `EntityProperty.edm_type`.\n* `BatchErrorException` has been renamed to `TableTransactionError`.\n* The `location_mode` is no longer a public attribute on the Clients.\n* The only supported credentials are `AzureNamedKeyCredential`, `AzureSasCredential`, or authentication by connection string\n* Removed `date` and `api_version` from the `TableItem` class.\n\n**Fixes**\n* Fixed issue with Cosmos merge operations.\n* Removed legacy Storage policies from pipeline.\n* Removed unused legacy client-side encryption attributes from client classes.\n* Fixed sharing of pipeline between service/table clients.\n* Added support for Azurite storage emulator\n* Throws a `RequestTooLargeError` on transaction requests that return a 413 error code\n* Added support for Int64 and Binary types in query filters\n* Added support for `select` keyword parameter to `TableClient.get_entity()`.\n* On `update_entity` and `delete_entity` if no `etag` is supplied via kwargs, the `etag` in the entity will be used if it is in the entity.\n\n## 12.0.0b6 (2021-04-06)\n* Updated deserialization of datetime fields in entities to support preservation of the service format with additional decimal place.\n* Passing a string parameter into a query filter will now be escaped to protect against injection.\n* Fixed bug in incrementing retries in async retry policy\n\n## 12.0.0b5 (2021-03-09)\n* This version and all future versions will require Python 2.7 or Python 3.6+, Python 3.5 is no longer supported.\n* Adds SAS credential as an authentication option\n* Bumps minimum requirement of `azure-core` to 1.10.0\n* Bumped minimum requirement of msrest from `0.6.10` to `0.6.19`.\n* Adds support for datetime entities with milliseconds\n* Adds support for Shared Access Signature authentication\n\n## 12.0.0b4 (2021-01-12)\n* Fixes an [issue](https://github.com/Azure/azure-sdk-for-python/issues/15554) where `query_entities` kwarg `parameters` would not work with multiple parameters or with non-string parameters. This now works with multiple parameters and numeric, string, boolean, UUID, and datetime objects.\n* Fixes an [issue](https://github.com/Azure/azure-sdk-for-python/issues/15653) where `delete_entity` will return a `ClientAuthenticationError` when the '@' symbol is included in the entity.\n\n## 12.0.0b3 (2020-11-12)\n* Add support for transactional batching of entity operations.\n* Fixed deserialization bug in `list_tables` and `query_tables` where `TableItem.table_name` was an object instead of a string.\n* Fixed issue where unrecognized entity data fields were silently ignored. They will now raise a `TypeError`.\n* Fixed issue where query filter parameters were being ignored (#15094)\n\n## 12.0.0b2 (2020-10-07)\n* Adds support for Enumerable types by converting the Enum to a string before sending to the service\n\n## 12.0.0b1 (2020-09-08)\nThis is the first beta of the `azure-data-tables` client library. The Azure Tables client library can seamlessly target either Azure Table storage or Azure Cosmos DB table service endpoints with no code changes.\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Microsoft Azure Azure Data Tables Client Library for Python",
    "version": "12.4.3",
    "project_urls": {
        "Homepage": "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/table/azure-table"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3c5705761e67c427dff18a5de6f7c4e9343821fbe4162ad431908258af67ee82",
                "md5": "6d394366fc28eafb55b7cdbc668c6bae",
                "sha256": "9495c00c4223c58b309ea008d0cd04cdc9e997ae863abdf300cba38aa7d0dc59"
            },
            "downloads": -1,
            "filename": "azure_data_tables-12.4.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6d394366fc28eafb55b7cdbc668c6bae",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 132893,
            "upload_time": "2023-06-13T22:49:57",
            "upload_time_iso_8601": "2023-06-13T22:49:57.354174Z",
            "url": "https://files.pythonhosted.org/packages/3c/57/05761e67c427dff18a5de6f7c4e9343821fbe4162ad431908258af67ee82/azure_data_tables-12.4.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "baac408a1a30a4f9a1e288c65d619f24a9a02c8ff385b34816a3ce1f63f43bcc",
                "md5": "dd7e8da707339cfc6b4dd488239ba3bb",
                "sha256": "a8b034bcd47222edfac4ac01e79043fd30933affa79b23ad937f98e0ff926a52"
            },
            "downloads": -1,
            "filename": "azure-data-tables-12.4.3.zip",
            "has_sig": false,
            "md5_digest": "dd7e8da707339cfc6b4dd488239ba3bb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 315421,
            "upload_time": "2023-06-13T22:49:54",
            "upload_time_iso_8601": "2023-06-13T22:49:54.787980Z",
            "url": "https://files.pythonhosted.org/packages/ba/ac/408a1a30a4f9a1e288c65d619f24a9a02c8ff385b34816a3ce1f63f43bcc/azure-data-tables-12.4.3.zip",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-13 22:49:54",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Azure",
    "github_project": "azure-sdk-for-python",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "azure-data-tables"
}
        
Elapsed time: 0.07617s