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

Update sample_create_client.py for Beta 3 API #18657

Closed
4 tasks done
annelo-msft opened this issue May 12, 2021 · 3 comments · Fixed by #18711
Closed
4 tasks done

Update sample_create_client.py for Beta 3 API #18657

annelo-msft opened this issue May 12, 2021 · 3 comments · Fixed by #18711
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. Container Registry
Milestone

Comments

@annelo-msft
Copy link
Member

annelo-msft commented May 12, 2021

The sample_create_client.py feels like it fits to the shape of the original Beta 1 sample. Please consider making the following updates:

  • Refer to ContainerRepository as something other than client here and here
  • Since ContainerRepository isn't a client, we shouldn't be able to create an instance of it directly as we do here, unless this is a Python-specific requirement.
  • In the proposed Beta3 API, we're not exposing functionality to list tags on a repository directly as we do here.
  • If you'd like to illustrate the use of ContainerRepository in this sample, consider also including an illustration of ArtifactRegistry, as it is another Helper type that makes service calls.
@annelo-msft annelo-msft added Client This issue points to a problem in the data-plane of the library. Container Registry labels May 12, 2021
@annelo-msft annelo-msft added this to the [2021] July milestone May 12, 2021
@seankane-msft seankane-msft self-assigned this May 13, 2021
@seankane-msft
Copy link
Member

@annelo-msft Regarding your second point, is it impossible to create an instance of ContainerRepository directly? I haven't discovered a way to completely forbid this on the Python side.

@annelo-msft
Copy link
Member Author

I'm not sure what's possible in Python for these mini-client types. Do you have an example of something similar to the .NET CosmosDatabase type in the Python Cosmos library?

If Python does allow creating an instance directly, consider not illustrating this in a sample, and instead using the getter method on the ContainerRegistryClient?

@seankane-msft
Copy link
Member

I don't see this functionality on the cosmos python library. For now I won't show creating the client directly and refer to the get_repository method.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. Container Registry
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants