Skip to main content

XML-RPC Server App for the Django framework.

Project description

Django_xmlrpc offers a means by which a Django developer can expose their views (or indeed any other function) using XML-RPC.

This is a fork of the original version made by Svetlyak40wt compatible with Django >= 1.8 and Python >= 2.5.

If you want to use django_xmlrpc for an older version of Django or Python, please use an old release.

Installation

You could retrieve the last sources from http://github.com/Fantomas42/django-xmlrpc and run the installation script

$ python setup.py install

or use pip

$ pip install -e git://github.com/Fantomas42/django-xmlrpc.git#egg=django-xmlrpc

Usage

Register django_xmlrpc in your INSTALLED_APPS section of your project’ settings.

There are two ways to register methods that you want to handle:

In your project’s settings.

XMLRPC_METHODS = (('path.to.your.method', 'Method name'),
                  ('path.to.your.othermethod', 'Other Method name'),)

In a file called xmlrpc.py in your application directory.

XMLRPC_METHODS = (('path.to.your.method', 'Method name'),
                  ('path.to.your.othermethod', 'Other Method name'),)

A registered method should look like this:

from django_xmlrpc.decorators import xmlrpc_func

@xmlrpc_func(returns='string', args=['string'])
def test_xmlrpc(text):
    """Simply returns the args passed to it as a string"""
    return "Here's a response! %s" % str(text)

Finally we need to register the url of the XML-RPC server. Insert something like this in your project’s urls.py:

from django_xmlrpc.views import handle_xmlrpc

url(r'^xmlrpc/$', handle_xmlrpc, name='xmlrpc'),

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-xmlrpc-0.1.8.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

django_xmlrpc-0.1.8-py2.py3-none-any.whl (17.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django-xmlrpc-0.1.8.tar.gz.

File metadata

File hashes

Hashes for django-xmlrpc-0.1.8.tar.gz
Algorithm Hash digest
SHA256 6e47d760a3ba9d5f7aff987f4d4a3872f3b0ba920d0677feeb70beb3b42f2020
MD5 277014e621ba9db603e3699b8075641c
BLAKE2b-256 881c418d9881cd72d1e0d19523d11e4380f09b9b166aaabb45d1cbed1694306c

See more details on using hashes here.

File details

Details for the file django_xmlrpc-0.1.8-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_xmlrpc-0.1.8-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ffa439964e7b4f32e87b9c072c50f6c643074e6830af54542b817210b8b5fe02
MD5 9e8e86ef496165f41319bfdae7e9ee43
BLAKE2b-256 560df74c288f63cad0add557d6cdcd752f200f9ff25b2417bc64d82f540325a4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page