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

what should be type value ? #6

Closed
sarjunwadkar opened this issue Feb 23, 2020 · 2 comments
Closed

what should be type value ? #6

sarjunwadkar opened this issue Feb 23, 2020 · 2 comments

Comments

@sarjunwadkar
Copy link

Hi Jeshan

thanks for developing this tool. its very useful.

I am new to aws and wants to do programming.But I am stuck here. when botostubs
is installed and checked it started working for the example you have shown.
s3 = boto3.client('s3') # type: botostubs.S3
s3 properties are shown. no issue.

But when I exit from the vscode and come back again then all things disappear and auto complete doesn't work. This is consistently happening sometimes it works other don't.

what I observed is that, If i import 'sys' or 'os' package and then used 'sys.path.append()' using
autocomplete feature of vs code then invoked s3. autocomplete then it start displaying properties. But behavior is not consistent. its very frustrating.

now I also want to create object for dynamodb , I am using below command but its not showing the properties.
dynamo = boto3.client('dynamodb') # type: botostubs.Dynamodb
dynamo = boto3.client('dynamodb') # type: botostubs.DYNAMODB
so I don't know if problem is with type definition .

type: botostubs.Dynamodb

type: botostubs.DYNAMODB

I think 'type :' is very important here otherwise it won't show property. do you have complete list of types for each aws object? so that no guessing.

Also in your video, you have shown when you type # type : , you automatically gets "botostubs" and subsequent property, how to get that? Its not working on my end.

Your help is highly appreciated.

Regards

swanand

@jeshan
Copy link
Owner

jeshan commented Feb 25, 2020

Hello Swanand,
My experience with VS Code is limited.

This is consistently happening sometimes it works other don't

Somebody raised an issue with it a while ago. Please take a look:
#2

In particular, you may have some luck by disabling Jedi intellisense if you have it enabled:
#2 (comment)

But behavior is not consistent. its very frustrating.

I'm afraid that's an issue with VS Code that you need to raise on some forum. You can ask them how to get code completion on the pip packages that you install (i.e botostubs).

I also want to create object for dynamodb

For DynamoDB, you'd type: # type: botostubs.DynamoDB

do you have complete list of types for each aws object?

No but it's based on boto3 service names, you can check the available services on the left here:
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ecs.html

e.g for ECS, type: botostubs.ECS, for Alexa for Business, type: botostubs.AlexaForBusiness

Patterns for other types follow the examples in the Features section of the README:
https://github.com/jeshan/botostubs#features

you have shown when you type # type : , you automatically gets "botostubs" and subsequent property, how to get that?

What you're seeing is me typing on JetBrains Intellij IDEA / PyCharm. You can try free PyCharm Community edition https://www.jetbrains.com/pycharm/

botostubs is IDE-independent and assumes you have code completion that works well in your favourite IDE.

@jeshan jeshan closed this as completed Mar 5, 2020
@sarjunwadkar
Copy link
Author

sarjunwadkar commented Mar 5, 2020 via email

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

No branches or pull requests

2 participants