Code Monkey home page Code Monkey logo

pyz3950's Introduction

PyZ3950

Build Status

Summary

Pure-python Z39.50 implementation

Update Notes

This code is updated to support both Python 2.7+ and Python 3.5+ using 2to3 and some hand changes. The one test I got working in Python 2.7 is updated to both remain a test script and a "unit test", and that leads to test coverage of about 40%.

However, only code in PyZ3950 is actually covered by these tests. It should be assumed that the code in the example, ill, and other directories are not working properly, despite the use of 2to3.

Updating test/test2.py indicates only that the NLM Z39.50 server does not support concurrent searches.

As such, it is too early to release a new version, but there is enough here to continue. In particular, it will be good to see whether we can utilize the asn1 library and pymarc.

Dan Davis [email protected]

Original README

This code is licensed under the X license. It requires Dave Beazley's PLY parsing package from http://systems.cs.uchicago.edu/ply/, licensed under the LGPL (I've tested with both 1.0 and 1.1), and Python 2.1 (or, in all probability, later versions.)

For Z39.50 functionality, you probably just want to use ZOOM, in zoom.py. An example is in test/test1.py, which just queries the Library of Congress for works whose title begins with "1066 and all that". The documentation for the language-independent API is available at http://zoom.z3950.org/api, and I hope that should be sufficient when combined with the docstrings in zoom.py and the example. (If not, please write me.)

The ASN.1 functionality is designed to be usable separately, and lives entirely in asn1.py. I probably should split this out into its own package.

Aaron Lav [email protected]

License

X Consortium License (Note that since X-Windows is now covered by the MIT License, this may be soon, but I hesitate to change it without the constructive agreement of the author.)

pyz3950's People

Contributors

alexdutton avatar asl2 avatar azaroth42 avatar cclauss avatar cnorthwood avatar danizen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyz3950's Issues

"No module named lex" error

Hi There,

This is a great project, thanks for putting it together.
I'm having an error when trying to run the hello.py script from my (windows) python 2.7.x instance:

C:\Python27\python.exe hello.py
Traceback (most recent call last):
  File "hello.py", line 2, in <module>
    from PyZ3950 import zoom
  File "C:\Python27\lib\site-packages\PyZ3950\zoom.py", line 73, in <module>
    from PyZ3950 import ccl
  File "C:\Python27\lib\site-packages\PyZ3950\ccl.py", line 124, in <module>
    import lex
ImportError: No module named lex

any suggestions?

Maintainability

Hello,

is this repository still maintained? Could I help in any way? Is there a way to start maintaining it?

PyPI

If you use pip install PyZ5950, you'll get some very outdated (non-working) code.
Could you please update the package?
I don't feel comfortable using pip install git+... in production code.

Thank you very much for your great library, though!

Python 3 compability

Let me know if you're interested in a pull request. Not sure how much work it is, but I could give it a try.

Revamp docs

I no longer remember what I hacked pydoc for. I should remove it, since it has a syntax error and reimplement the documentation workflow with more modern tooling. @cclauss in case you're interested.

Typos discovered by codespell

Your mileage may vary on which are worth fixing...

$ codespell --ignore-words-list="ba,te,teh" --skip="*.asn,*.l,*.pdf,*.txt,*.y"

Maybe add hist,parm,selt to ignore-words-list?

./CHANGELOG:63: authetication ==> authentication
./compiler/py_output.py:209: explict ==> explicit
./compiler/tests/v3.txt,v:1128: madatory ==> mandatory
./compiler/tests/v3.txt,v:1377: occurence ==> occurrence
./compiler/tests/v3.txt,v:1697: retreive ==> retrieve
./compiler/tests/v3.txt,v:1855: facilites ==> facilities
./compiler/tests/v3.txt,v:2204: overidden ==> overridden
./PyZ3950/z3950.py:270: parm ==> param, pram, parma
./PyZ3950/asn1.py:272: selt ==> set, self, sold
./PyZ3950/asn1.py:273: selt ==> set, self, sold
./PyZ3950/asn1.py:1695: reencode ==> re-encode
./PyZ3950/asn1.py:1764: reencode ==> re-encode
./PyZ3950/CQLUtils.py:124: langauge ==> language
./PyZ3950/bib1msg.py:157: permissable ==> permissible
./PyZ3950/bib1msg.py:158: permissable ==> permissible
./PyZ3950/zoom.py:552: parms ==> params, prams
./PyZ3950/zmarc.py:146: occurence ==> occurrence
./PyZ3950/zmarc.py:440: directry ==> directory
./PyZ3950/zmarc.py:440: directry ==> directory
./PyZ3950/zmarc.py:627: Tranform ==> Transform
./PyZ3950/CQLParser.py:338: charater ==> character
./example/test_sort.py:4: hist ==> heist, his
./example/explain.py:96: hist ==> heist, his
./apache/CQLParser.py:934: charater ==> character
./other_docs/zthes-05.dtd:8: occurence ==> occurrence
./other_docs/asn1.html:1239: madatory ==> mandatory
./other_docs/asn1.html:1512: occurence ==> occurrence
./other_docs/asn1.html:1867: retreive ==> retrieve
./other_docs/asn1.html:2046: facilites ==> facilities
./other_docs/asn1.html:2433: overidden ==> overridden
./other_docs/ASN1layman.htm:1023: arbtrary ==> arbitrary
./other_docs/ASN1layman.htm:1478: occurences ==> occurrences
./other_docs/ASN1layman.htm:1487: occurence ==> occurrence
./other_docs/ASN1layman.htm:1491: occurence ==> occurrence
./other_docs/ASN1layman.htm:1603: arbtrary ==> arbitrary
./other_docs/ASN1layman.htm:1610: interepretations ==> interpretations
./other_docs/ASN1layman.htm:1776: occurences ==> occurrences
./docs/zmarc.html:53: occurence ==> occurrence
./docs/zmarc.html:78: Tranform ==> Transform
./docs/zoom.html:619: parms ==> params, prams

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.