Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

small changes to documentation, updated link in samples README, updat… #14249

Merged
1 commit merged into from
Oct 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/tables/azure-data-tables/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Release History

## 12.0.0b2 (Unreleased)

* 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.
Expand Down
2 changes: 1 addition & 1 deletion sdk/tables/azure-data-tables/samples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ what you can do with the Azure Data Tables client library.


<!-- LINKS -->
[api_reference_documentation]: https://aka.ms/azsdk/python/tables/docs
[api_reference_documentation]: https://docs.microsoft.com/rest/api/storageservices/table-service-rest-api

[sample_authentication]:https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/sample_authentication.py
[sample_authentication_async]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/tables/azure-data-tables/samples/async_samples/sample_authentication_async.py
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ async def authentication_by_shared_access_signature(self):
)

async with TableServiceClient(account_url=self.account_url, credential=sas_token) as token_auth_table_service:
properties = await table_service.get_service_properties()
properties = await token_auth_table_service.get_service_properties()
print("Shared Access Signature: {}".format(properties))
# [END auth_by_sas]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ async def list_all_entities(self):
async for e in table.list_entities():
entities.append(e)

for entity, i in enumerate(entities):
for i, entity in enumerate(entities):
print("Entity #{}: {}".format(entity, i))
# [END list_entities]

Expand Down
5 changes: 2 additions & 3 deletions sdk/tables/azure-data-tables/samples/sample_authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,9 @@ def authentication_by_shared_key(self):
def authentication_by_shared_access_signature(self):
# Instantiate a TableServiceClient using a connection string
from azure.data.tables import TableServiceClient
table_service = TableServiceClient.from_connection_string(conn_str=self.connection_string)

# Create a SAS token to use for authentication of a client
# [START auth_from_sas]
# Create a SAS token to use for authentication of a client
from azure.data.tables import generate_account_sas, ResourceTypes, AccountSasPermissions
print(self.account_name)
sas_token = generate_account_sas(
Expand All @@ -74,7 +73,7 @@ def authentication_by_shared_access_signature(self):

token_auth_table_service = TableServiceClient(account_url=self.account_url, credential=sas_token)

properties = table_service.get_service_properties()
properties = token_auth_table_service.get_service_properties()
print("Shared Access Signature: {}".format(properties))
# [END auth_from_sas]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ def delete_from_table_client(self):
try:
table_client.delete_table()
print("Deleted table {}!".format(self.table_name))
except ResourceExistsError:
print("Table already exists")
except ResourceNotFoundError:
print("Table could not be found")
# [END delete_table_from_table_client]


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def tables_in_account(self):
# [START tsc_query_tables]
table_name = "mytable1"
name_filter = "TableName eq '{}'".format(table_name)
queried_tables = table_service.query_tables(filter=name_filter, results_per_page=10)
queried_tables = table_service.query_tables(filter=name_filter)

print("Queried_tables")
for table in queried_tables:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def list_all_entities(self):
# Query the entities in the table
entities = list(table.list_entities())

for entity, i in enumerate(entities):
for i, entity in enumerate(entities):
print("Entity #{}: {}".format(entity, i))
# [END query_entities]

Expand Down