How to translate cURL to Python web request?
Sorry to ask such entry level question. I need to translate the following `cURL` into python language. I tried to use `requests` function, which failed. So could anyone give me some hints? Is it right to choose requests? Should I consider urllib?
Thanks!

cURL code:

    $ curl -k -u 'key:secret_key' -X POST https://api.picloud.com/file/new/ -d name=your_file_name

My bad attempt:


    r = requests.put('https://api.picloud.com/file/new/',auth=(api_key,api_secretkey),data={'name':'your_file_name'})

I got the following errors:

    requests.exceptions.SSLError: [Errno 1] _ssl.c:503: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

Do I need to encoded my key and secret key first?
How to translate cURL to Python web request?
===

Sorry to ask such entry level question. I need to translate the following `cURL` into python language. I tried to use `requests` function, which failed. So could anyone give me some hints? Is it right to choose requests? Should I consider urllib?
Thanks!

cURL code:

    $ curl -k -u 'key:secret_key' -X POST https://api.picloud.com/file/new/ -d name=your_file_name

My bad attempt:


    r = requests.put('https://api.picloud.com/file/new/',auth=(api_key,api_secretkey),data={'name':'your_file_name'})

I got the following errors:

    requests.exceptions.SSLError: [Errno 1] _ssl.c:503: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

Do I need to encoded my key and secret key first?