Giter Club home page Giter Club logo

pysip2's Introduction

Python3 SIP2 Client Library

Running Example Code

$ cp pysip2-client.ini.example pysip2-client.ini
  • Modify the [client] section of pysip2-client.ini to point it at your SIP2 server.

$ PYTHONPATH=src examples/sc-status.py
$ PYTHONPATH=src examples/item-info-request.py <item_barcode>
$ PYTHONPATH=src examples/checkout.py <item_barcode> <patron_barcode>
$ PYTHONPATH=src examples/checkin.py <item_barcode>
# ...
  • There is also a SIP shell for manually entering commands and seeing message responses. The shell will look for a pysip2-client.ini in the working directory. If found, it will be used to initialize the shell. Otherwise, all connection values must be manually entered into the shell.

$ PYTHONPATH=src python3 src/pysip2/shell.py
sipsh% server
my-sip-server1.example.org
sipsh% server my-sip-server2.example.org
Set SIP attribute "server" to "my-sip-server2.example.org"
sipsh% username sip-username
Set SIP attribute "username" to "sip-username"
sipsh% password sip-password
Set SIP attribute "password" to "sip-password"
sipsh% start
Connect OK
Login OK
Server is online
sipsh% patron-status 123456789
Label                           : Patron Status Response
Code                            : 24
patron status                   :   Y
language                        : 000
transaction date                : 20170913    092221
[AE] personal name              : JANE Q PATRON
[AA] patron identifier          : 123456789
[BL] valid patron               : Y
[CQ] valid patron password      : N
[BH] currency type              : USD
[AO] institution id             : my-institution
sipsh% help
Commands:
  help
    - Display help message
  echo
    - Echo command with arguments
...

TODO

  • checksums

  • hold message + response

  • renew message + response

  • renew all message + response

pysip2's People

Contributors

berick avatar jeff avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.