俄罗斯流行图书馆计算机系统irbis64客户端开发框架
irbis的Python项目详细描述
Python
PythonIrbis
包只是ManagedIrbis从c移植到python 3的包
支持的环境
PythonIrbis
目前在32位和64位Windows、Linux、Mac OS X和IRBIS64服务器版本2014或更高版本上支持Python3.6.x和3.7.x。
示例程序
importirbis.coreasbars# Connect to the serverclient=bars.Connection()client.parse_connection_string('host=127.0.0.1;database=IBIS;user=librarian;password=secret;')client.connect()# Search for books written by Byronfound=client.search('"A=Byron$"')print(f'Records found: {len(found)}')# Take first 10 recordsformfninfound[:10]:# Read the record from the serverrecord=client.read_record(mfn)# Extract the field and subfield from the recordtitle=record.fm(200,'a')print('Title:',title)# Format the record by the serverdescription=client.format_record(bars.BRIEF,mfn)print('Description:',description)print()# Print empty line# Disconnect from the serverclient.disconnect()