Skip to content
This repository has been archived by the owner on Jul 14, 2023. It is now read-only.

Samples : Missing create_table_service() in cloudstorageaccount.py #51

Open
puthurr opened this issue Apr 22, 2020 · 2 comments
Open

Samples : Missing create_table_service() in cloudstorageaccount.py #51

puthurr opened this issue Apr 22, 2020 · 2 comments

Comments

@puthurr
Copy link

puthurr commented Apr 22, 2020

Hi All,

Trying to run the samples but facing the below issue.
samples/test_sample.py
from azure.cosmosdb.table.common import CloudStorageAccount
...
self.account = CloudStorageAccount(account_name=account_name,
account_key=account_key,
sas_token=sas)

Later in the table_usage.py
self.service = self.account.create_table_service()

Issue is that specific method doesn't exist in
cloudstorageaccount.py

The latter is a copy of cloudstorageaccount hence has no create_table_service() implementation.

2 cts.

@ansario
Copy link

ansario commented Apr 22, 2020

Hey @puthurr - the documentation is a bit out of date since some recent refactoring. Here is some sample usage:

from azure.cosmosdb.table import TableService

service = TableService(account_name="name", account_key="key")
entity = service.get_entity("table", "partition", "row_key")

@puthurr
Copy link
Author

puthurr commented Apr 23, 2020

Thanks @ansario I fixed the same, just wanted to report the code discrepancy 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants