Questions tagged [pycurl]

PycURL is a Python interface to libcurl.

PycURL is a Python interface to libcurl. PycURL can be used to fetch objects identified by a URL from a Python program, similar to the urllib Python module. PycURL is mature, very fast, and supports a lot of features.

609 questions
0
votes
1 answer

problem sending an HTTPGET with PyCurl

I am having problems converting the following curl command into PyCurl: curl -k --cert /tmp/blablabla "https://blablabla" My attempt so far is shown below: c = pycurl.Curl() c.setopt(pycurl.URL, submit_url) c.setopt(pycurl.HTTPGET, 1) b =…
MWright
  • 1,681
  • 3
  • 19
  • 31
0
votes
1 answer

from curl to pycurl - how to make a mutli-part post - works with curl, fails with 422 with pycurl

I have a cURL post that works fine: curl -X POST http://some-server.com/working_endpoint-F "package[distro_version_id]=1" -F "package[package_file]=@/tmp/myfile.bin" When I try to translate this into pycurl, the request fails with 422 …
marathon
  • 7,881
  • 17
  • 74
  • 137
0
votes
0 answers

How to using pycurl resolve this curl call?

curl -v -S -k -u 'user:pwd' -X POST -H 'X-USER-SERVICE-NAME:usertenacy' --form 'data=@manager_logs.zip' "https://testservice/serviceapi/logan.uploads?uploadName=param1&appendUpload=param2&logSourceName=param3" How to use pycurl to resolve this curl…
0
votes
1 answer

Equivalent python code for curl command for https call

I have a curl command that works and gives me back the JSON. Curl command: curl -sS -k -L -H "Authorization: bearer " -X GET https://IP:PORT/api/v1/namespaces I tried with requestsand pycurl modules which I found in the other posts but…
Mohammed
  • 637
  • 13
  • 26
0
votes
0 answers

Python: How to delete multiple files from server at once using OVH cloud API ( I am using Python Request Delete method)

I want to delete files from the server using the Pycurl or Python request method. I have a list of file names and I want to delete all files from OVH server by comparing name with the List items. I am using OVH cloud API. this is the code for delete…
0
votes
1 answer

Handling http 100 response with cURL/ pycurl (oauth 2.0)

I'm trying to authenticate a bot which posts on stocktwits (see API) with Python/pycurl. As I understand it, first I need to request that the application is authorized to use Stocktwits user data via oauth/authorize, which returns an authorization…
Phil Dwan
  • 91
  • 1
  • 9
0
votes
1 answer

How to send message to tcp server using pycurl

I was trying to curl a tcp server using pycurl class Detector(): def __init__(self, api_addr="tcp://localhost:8000"): self.c = pycurl.Curl() self.c.setopt(self.c.URL, api_addr) def close_connection(self): …
Jiang Wenbo
  • 469
  • 2
  • 9
  • 20
0
votes
1 answer

Verifying peer separate of sending https post

I need to send an https post to an external server. Is it best practice to first verify the external peer and then afterwards in a separate request to send the post data? Or is it ok to ask to verify the peer and send the post data in the same…
whatWhat
  • 3,987
  • 7
  • 37
  • 44
0
votes
0 answers

AttributeError: 'cStringIO.StringO' object has no attribute 'getValue'

I am new in python (but not in php) and doing some test to learn it by myself. When I run the code with urls in the array, I get this error: print req[1].getValue() AttributeError: 'cStringIO.StringO' object has no attribute 'getValue' When I check…
zeflex
  • 1,487
  • 1
  • 14
  • 29
0
votes
2 answers

Trouble in installation pycurl

I really have trouble installing pycurl on my Mac, spent few hours trying solve it but unfortunately I did not find any useful solution. When I execute: pip install pycurl or pip3.6 install pycurl I got the following error: Collecting pycurl …
0
votes
1 answer

python 3.6 pip install fails for distutils installed projects on ubuntu 16.04

I am running ubuntu 16.04 and have some python code that uses features from python 3.6. I have been able to install some libraries (scipy) with python3.6 and pip3.6. However there have been a few libraries (pycurl) for which using pip install is not…
guys
  • 1
  • 2
0
votes
0 answers

Transform curl into pycurl

can anyone help me to transform the following curl(from IBM watson speech to text) into pycurl please: curl -X POST -u {username}:{password} \ --header "Content-Type: audio/flac" \ --data-binary @{path_to_file}audio-file.flac…
0
votes
1 answer

Python Curl - Illegal Characters Found in URL

error: (3, 'Illegal characters found in URL') My url has got special characters like [AVC_(1)_(P1)_0] i cant get this to work, i tried encoding but that would give me "Could not resolve host: https%3A" Please advice import sys import Queue import…
CodeGuru
  • 3,645
  • 14
  • 55
  • 99
0
votes
1 answer

Python Curl with Variable Encoding

I'm working on a Python 3 function to check various websites to make sure they are OK (200 responses, correct metadata, page size, etc). These sites are using different encodings. I'm using pycurl to decode the page bodies. According to the pycurl…
Ken J
  • 4,312
  • 12
  • 50
  • 86
0
votes
0 answers

libcurl ssl support on macosx

Please, can someone help me to enable SSL support for libcurl on my Mac - MacOSX High Sierra? I am trying to run a script in Canopy that uses pycurl, but I get the following: error: (1, 'Protocol "https" not supported or disabled in libcurl') I…
Monty
  • 1,161
  • 2
  • 15
  • 26