Code Monkey home page Code Monkey logo

sip2-client-for-python's Introduction

SIP2 Python Client: Simple Interchange Protocol Client for Python

About

A Python SIP2 client. It also supports Gossip.

Purpose

This was (nearly) my first go with Python. I thought the source might have a better time on Github (well, after a two month break I forgot what I already figured out about publishing a real Python package) than on my hard drive. Ideas: Could be used to build some selfcheck device application for libraries. Or use it for some kind of automation...

Usage

There are just three files. File sip2.py is a low level implementation of SIP2/Gossip while wrapper.py makes the handling a little bit more comfortable. Check comments of both files. File message_lookup.py could be used for advanced programming purposes. Maybe...

Changelog

  • 2021-06-10 Release v1.1.0
    • Fixed typo (wrong case) and merged an exception handling for TSL. Thank @yefuwang and @MarkTr
  • 2018-06-11 Release v1.0.0

More about SIP2

Standard Interchange Protocol 2, Standard: https://developers.exlibrisgroup.com/wp-content/uploads/2020/01/3M-Standard-Interchange-Protocol-Version-2.00.pdf (link might break)

Gossip is short for "Good Old Server for Standard Interchange Protocol". Gossip is an SIP2 server implementation (Java) with an extension for enhanced payment options. It's possible to pay

  • a single outstanding position; "subtotal-payment"
  • an amount being below the total fees (but that sums up to complete positions being paid); "subtotal-payment"
  • an amount being below the total fees (but that might only pay one or more positions partially); "subtotal-payment + partial-fee-payment"

Note: Sadly no official documentation for Gossip is available online. You can only contact the developer via https://www.gbv.de/Verbundzentrale/serviceangebote/gossip-service-der-vzg

Source

The primary source is at https://github.com/tzeumer/SIP2-Client-for-Python. There is also a package at pypi.org: https://pypi.org/project/Sip2/. It's the only one I ever released, so I have to figure out the process every time - and might forget it completely ;)

sip2-client-for-python's People

Contributors

marktr avatar tzeumer avatar yefuwang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

sip2-client-for-python's Issues

setup.py Issue after Git clone

After Cloning your repository(under Ubuntu & debian) & running the Command
sudo python3 setup.py install
Error's through up

  1. FileNotFoundError: [Errno 2] No such file or directory: 'README.md'

after renaming readme.md another error through up

  1. error: package directory 'Sip2' does not exist

I was able to rectify all issues, just suggesting you please update the repository or update setup.py so that it can easily overcome these issues & other users can easily install your library.

One more Update for other users, if you are not able to communicate to your sip accounts via ssl certificate then try Unencrypted way by turning the value of self.tlsEnable=False

Thanks
Regards
Marcus

How to check out books with out patron login?

Hi @tzeumer,

I am trying to write a very basic app for a RFID kiosk. The kiosk will read the RFID enabled patron card, and this will serve as an authentication.

So is it possible to perform a check out to the patron's account without asking the patron to enter his password?

Regards,

Provide setup.py

So this package can be properly installed.
Optionally, publish it to pypi.

OSError: [Errno 9] Bad file descriptor

When I give a invalid location or institiution, I get this error:

Sip2Wrapper object unset
Exception ignored in: <bound method Sip2Wrapper.__del__ of <sip2.wrapper.Sip2Wrapper object at 0x7fb5ab2dce80>>
Traceback (most recent call last):
  File "/home/kiosk/library-kiosk/library_kiosk/check_out/sip2/wrapper.py", line 135, in __del__
  File "/home/kiosk/library-kiosk/library_kiosk/check_out/sip2/wrapper.py", line 155, in disconnect
  File "/home/kiosk/library-kiosk/library_kiosk/check_out/sip2/sip2.py", line 501, in disconnect
OSError: [Errno 9] Bad file descriptor
Sip2 object unset
Exception ignored in: <bound method Sip2.__del__ of <sip2.sip2.Sip2 object at 0x7fb5a976bef0>>
Traceback (most recent call last):
  File "/home/kiosk/library-kiosk/library_kiosk/check_out/sip2/sip2.py", line 152, in __del__
  File "/home/kiosk/library-kiosk/library_kiosk/check_out/sip2/sip2.py", line 501, in disconnect
OSError: [Errno 9] Bad file descriptor

Better throw an appropriate exception

Logging problems

Two separate issues:

  1. Code will crash if SIP.log has not been set - should default to logging.getLogger(__name__)
  2. Uses print for logging - all output should go through the log at an appropriate level

Gossip2 - new custom field FI

As of Gossip v2+ there is a new field FI (yet undocumented). Example

64 00120190802 164645000000010001 0001AOTUHH|AA08300173390|AE Tobias Zeumer|BLY|CQY|BHEUR|BV5.00|CG213998-3|FA1.00|FB830$24590745|FC01.08.2019|FDDas SQL-Lehrbuch / Lans, Rick F. van der 1958- (1988)|FE3|FFSäumnisgebühr|FH1.00|FI|CG768441-3|FA1.00|FB830$28450894|FC02.08.2019|FDLinked Data : structured data on the Web / Wood, David (2014)|FE3|FFSäumnisgebühr|FH0.00|FIDas zu dieser Gebühr gehörende Medium ist noch von Ihnen entliehen. Sie müssen das Medium zurückgeben, bevor Sie diese Gebühr bezahlen können.|CG1059233-15|FA3.00|FB|FC30.07.2019|FDSonstiges|FE15|FFSonstiges|FH3.00|FI|BDUniversitätsbibliothek, TUHH / TUB, Alter Postweg 75, 21075 Hamburg|[email protected]|FU20|FVStudent-TUHH|AY3AZ1901

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.