Questions tagged [xmlrpclib]

xmlrpclib is the Python standard library module for transparently handling XML Remote Procedure Call. (Available since v2.2)

xmlrpclib is the Python standard library module for handling XML Remote Procedure Call. It has been available since Python 2.2, and is capable of sending the following types of data:

  • Booleans
  • Numbers
  • Strings
  • Arrays
  • Dicts
  • Dates
  • Binary data

The library's main class, ServerProxy, transparently calls its methods across a network, without having to use any special syntax. For example,

proxy = xmlrpclib.ServerProxy("http://www.example.com/rpc-example")
x = proxy.stdev([1,2,3,4,5])

will, behind the scenes, do this:

  1. Transmit a call to the stdev method (along with arguments, changed into XML RPC format) across the network, to the XML RPC server at "http://www.example.com/rpc-example".

  2. The server will read the command respond with the results of the call.

  3. The proxy object will read the results.

  4. The results will be cast from XML RPC format into a native Python object, and returned.

The Python documentation site hosts the xmlrpclib documentation.

149 questions
4
votes
1 answer

xmlrpclib: dictionary key must be string type error

I would like some advice. I have encountered the following error in Python 2.6: Traceback (most recent call last): File "", line 1, in s.Search(query) File "/usr/lib/python2.6/xmlrpclib.py", line 1199, in __call__ …
Martyn
  • 1,107
  • 1
  • 10
  • 12
4
votes
1 answer

How to send custom http_headers for RPC calls using python xmlrpclib?

How can I send custom HTTP Headers using python xmlrpclib library ! ? I need to send some special custom http_headers at the time of calling RPC methods.
shahjapan
  • 13,637
  • 22
  • 74
  • 104
4
votes
1 answer

Using gevent with python xmlrpclib

Is it possible to use python's standard libs xmlrpclib with gevent? Currently i'm tried to use monkey.patch_all(), but without success. from gevent import monkey monkey.patch_all() import gevent import time import xmlrpclib from…
frx
  • 492
  • 5
  • 15
4
votes
0 answers

Python: xmlrpc out of memory when sending binary

I got this simple xmlrpc server script written in python. I limited the memory to 512mb to simulate the environment where the script will be running. import SimpleXMLRPCServer import resource MEMORY_LIMIT =…
secador de pelo
  • 687
  • 5
  • 26
4
votes
2 answers

How to retain cookies for xmlrpc.client in Python 3?

The default Python xmlrpc.client.Transport (can be used with xmlrpc.client.ServerProxy) does not retain cookies, which are sometimes needed for cookie based logins. For example, the following proxy, when used with the TapaTalk API (for which the…
GermainZ
  • 1,893
  • 3
  • 15
  • 20
4
votes
5 answers

Timeout for xmlrpclib client requests

I am using Python's xmlrpclib to make requests to an xml-rpc service. Is there a way to set a client timeout, so my requests don't hang forever when the server is not available? I know I can globally set a socket timeout with…
Corey Goldberg
  • 59,062
  • 28
  • 129
  • 143
4
votes
1 answer

Mandrill python API attachment error message

I'm writing a web app for customer/order handling in python with asana integration. For a registered incoming order, an invoice is created as .pdf. This file I want to send to asana as an email attachment using mandrill, because the asana python API…
creimers
  • 4,975
  • 4
  • 33
  • 55
4
votes
1 answer

xmlrpc response datatype long possible?

Is there any possibility to allow xmlrpc extensions (datatype long int) for the Python simplexmlrpc server? The client uses Apache xmlrpc, which allows 8 byte integers. Basically, I'm using the example code with this function to test it: def…
Daniel
  • 36,610
  • 3
  • 36
  • 69
4
votes
1 answer

Errors while converting Python script to Ruby

I am using a Python script which uses xmlrpclib: import xmlrpclib srv = xmlrpclib.ServerProxy("http://demo.myslice.info:7080/", allow_none=True) # authentication token auth = {"AuthMethod": "password", "Username": "guest", "AuthString":…
Yasin
  • 287
  • 5
  • 15
3
votes
2 answers

problem with xmlrpc server

I run simple example with xmlrpc server and press Ctrl-C on keyboard :). from SimpleXMLRPCServer import SimpleXMLRPCServer from time import sleep import threading,time class Test(threading.Thread): def __init__(self): …
Bdfy
  • 23,141
  • 55
  • 131
  • 179
3
votes
1 answer

how to provide a Lot/Serial number for the product through xmlrpc in odoo

I have in my code via xmlrpc a function to validate the picking but it asks me to place the batch number of the product. How can I validate that lot? pick_assign = models.execute_kw(db, uid, password, 'stock.picking',…
3
votes
4 answers

Export a single Confluence page as PDF (Python)

I have a python script which is trying to export a confluence page as pdf and have tried several methods unsuccessfully: 1.WGET: wget --ask-password --user xxxxxxxx -O out.pdf -q…
DomAyre
  • 828
  • 1
  • 11
  • 23
3
votes
1 answer

ImporError: No module named 'SimpleXMLRPCServer'

I was trying to get on hands with frozen astropy. But when I try to install it it gives ImporError: No module named 'SimpleXMLRPCServer' I also tried to install using pip, but it shows: Could not find a version that satisfies the requirement…
Dragon
  • 1,194
  • 17
  • 24
3
votes
1 answer

How to make more than one xmlrpc calls to different xmlrpc servers at a time

Is there any way to make multiple calls from an xmlrpc client to different xmlrpc servers at a time. My Server code looks like this: (I'll have this code runnning in two machines, server1 & server2) class TestMethods(object): def…
3
votes
3 answers

Get product's name in the local language in OpenERP?

This is a very simple but a difficult question to answer, because I think only a "few" people work with this. I have this simple script in Python: import xmlrpclib username = 'my_openerp_user' pwd = 'my_password' dbname =…
forvas
  • 9,801
  • 7
  • 62
  • 158
1
2
3
9 10