Azure / azure-sdk-for-python

This repository is for active development of the Azure SDK for Python. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/python/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-python.
MIT License
4.59k stars 2.8k forks source link

Provide Cognitive Service create account Python function #4669

Closed roalexan closed 2 years ago

roalexan commented 5 years ago

I don't see a way how to create a Cognitive Service account programmatically using Python - in my case I want to create a LUIS account. I see how to do it from the portal. Other services, such as for ResourceGroups or AzureSearch, provide a 'create_or_update' function. This would be nice to have when automating deployment.

roalexan commented 5 years ago

I suppose I could call the resource management REST API from Python, but my request is to have this built into the Python SDK. BTW, for now I'll use the Azure CLI.

lmazuel commented 5 years ago

Hi @roalexan The CLI is using this very SDK repo :) What you want is inside https://pypi.org/project/azure-mgmt-cognitiveservices/ Thanks!

roalexan commented 5 years ago

Thanks, but I don't think I expressed myself very clearly. I am familiar with the REST API, CLI, and SDKs, and I'm happy to be corrected, but I don't believe they support the ability to create a LUIS account programmatically. App, intent, entities, etc. yes, but not an account with associated authoring key. I muddied the water when I said I could resort to using the CLI - this (I think) cannot be done using REST, CLI, or SDK.

I think this person did a better job expressing my request - see Programatic access to LUIS authoring key.

lmazuel commented 5 years ago

Hi @roalexan I confirm this is possible with this package, but I admit there is no documentation on how to do it.

roalexan commented 5 years ago

oh? it's possible to create a LUIS account programmatically? I'll have to look at the code.

lmazuel commented 5 years ago

@roalexan I didn't try yet, but I see a LUIS option in the package which is a good sign, take my assumption with a grain of salt still since I didn't executed any code :) This link might be useful as well: https://github.com/Azure-Samples/cognitive-services-python-sdk-samples/tree/master/samples/language/luis

It's likely that you can create an ARM runtime account, but maybe not a authoring account.

I will try to investigate in more details and give a more concrete example with real code. Thanks!

ghost commented 2 years ago

Hi @roalexan. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “/unresolve” to remove the “issue-addressed” label and continue the conversation.

ghost commented 2 years ago

Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!