User Tools

Site Tools


You were redirected from opensrf:python.
osrf-devel:python

Configuring OpenSRF Python clients

  1. Install the prerequisites
  2. Test your installation with srfsh.py calling the math_bench test
  3. (Optional): Connect to

Prerequisites

  • Python 2.4+ (2.3 may work, but is untested)
  • pyxmpp for Jabber protocol support
  • simplejson for JSON encoding/decoding support

If you try running srfsh.py and dnspython raises an exception concerning dns.resolver.NXDOMAIN you may need to use dnsmasq or the like to provide local DNS resolution for your hostname. This is quite likely to occur if it is localhost, as dnspython does not understand /etc/hosts files. The dnsmasq option that worked for me (using localhost as my hostname) was -A/*/127.0.0.1 – your mileage may vary.

Making requests to Evergreen services

To make a request to an Evergreen service:

  1. Add a link from Open-ILS/src/python/oils to /usr/lib/python2.4/site-packages/. (or the equivalent):
    ln -sf /path/to/Open-ILS/src/python/oils /usr/lib/python2.4/site-packages/.
  2. Add the following section to your .srfsh.xml configuration file:
      <plugins>
        <plugin>
          <module>oils.utils.idl</module>
          <init>IDLParser.parse</init>
        </plugin>
      </plugins>
osrf-devel/python.txt · Last modified: 2022/02/10 13:34 by 127.0.0.1

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

© 2008-2022 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a U.S. 501(c)3 non-profit organization.