okigan / awscurl

curl-like access to AWS resources with AWS Signature Version 4 request signing.
MIT License
735 stars 91 forks source link

Support import as module??? #151

Open katrinevr412 opened 1 year ago

katrinevr412 commented 1 year ago

Hey what's the reason this tool must be invoked as a standalone script??? I see there's a make_request method but if I do

import awscurl
awscurl.make_request(...)

will throw exception! Can we support this???

djrmarques commented 1 year ago

What is the exception you are getting? Currently also trying to make this work.

katrinevr412 commented 1 year ago

It just can't find the module. awscurl module doesn't seem to have any submodules

djrmarques commented 1 year ago

This seems to work for me:

from awscurl.awscurl import make_request

Then you just have to call make_request with the same parameters as in here.

okigan commented 1 year ago

The above should work - thanks @djrmarques and good luck @katrinevr412!