adapya: Adabas API for Python with LOB Demo Center Example

What is adapya?

With adapya you can access Adabas databases from Python programs using the Adabas API.

It comes with sample programs to show its use and demonstrates new Adabas features like reading and storing of large binary objects using the extended Adabas API (ACBX).

Python is a scripting language that allows rapid prototyping, object-oriented or functional style programming. It is open source and is used in a large number of projects:

adapya does not implement a SQL interface as defined with
the Python DBAPI. You may do Adabas DBAPI access with the
product ADABAS SQL Gateway via the ODBC interface.

Working with adapya requires a good knowledge of the Adabas API.

adapya is a pure Python package: it does not require compilation of extensions. It should work on all platforms where CPython and Adabas are available.

It has been tested on Windows, Solaris and z/Linux. It can access local Adabas databases and with the product NET-WORK remote Adabas databases on all platforms including mainframe z/OS, VSE, BS2000).

Prerequisite for adapya is Python version 2.5, or Python version 2.3 and
2.4 where it requires the extra ctypes package.

adapya licensed under Apache License 2.0

Copyright 2004-2008 Software AG

Licensed under the Apache License, Version 2.0 (the “License”);
you may not use ‘adapya’ except in compliance with the License.
You may obtain a copy of the License at                            

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
See the License for the specific language governing permissions and
limitations under the License.
adapya.pdf (479 KB) (1.2 MB)

$ uname -sr
SunOS 5.10
$ type python
python not found
$ type perl
perl is /usr/bin/perl


Hi Matthias,

our Solaris didn’t have Python installed either.

This is the recommended install

cd /tmp
rm -dr Python-2.5.2
tar xfz Python-2.5.2.tgz
cd Python-2.5.2
#  Check if you may want other target directories than system
./configure > configure.txt       
make > make.out
# next requires root if installed to system directories
make install                 

Alternatively, prebuilt packages for Python 2.5.1 plus glibcc 3.4 are found here:

For the LOB Demo we installed also:

Marbod Mueller

Thanks for your detailed instructions. Since I’m not the administrator of our Solaris host, I got no right to install anything (i. e. outsourcing).

Has this been maintained? A lot of the code has been deprecated, is quite non-pythonic, and at times rather hard to follow. A more modern API written in python 3 would be incredibly helpful.

Hello Jerod,
thank you for you interest in adapya.

Quite some time has passed since its first public release and in the meantime Python has evolved with new releases nearly every year. And recently even IBM has made efforts to have ported Python 2.7 to z/OS with the help of!

Development of adapya has continued and the next update could include the following:

  • Python V3 support
  • pip install
  • smaller packages with base, adabas, broker, replication, analytics, etc.
  • deprecation of the Apache mod_python sample web application replaced by Python’s WSGI
  • API documentation with Sphinx

In the meantime, adapya still can be used with the most recent Python 2.7 runtime of which some people say it still performs better than Python 3.

If you have specific requirements that are not covered with adapya feel free to let us know.

Kind regards,
Marbod Mueller

Is there a new download link? The only version I’ve been able to find is the one posted here which is the same as the python package on pypi circa 2008.

Oh no, currently there is no more recent version available.
I am sorry to say that it will take some more time until there is a new one published.

What sort of time-frame would you ascribe this? 6-months-ish, 1-yr-ish, longer?

Following the instructions in the attached PDF, I was able to install the “Adabas Community Edition Free Trial” successfully.

I tried installing “adapya”, also following the instructions of adapya.pdf, but did not work.

I made the install of the adapya by hand.

When I ran I received the following message:

C:\Users\Flavio> python C:\Python27\Scripts\ -d 1
Traceback (most recent call last):
File “C:\Python27\Scripts\”, line 38, in
From adabas.api import *
File “C:\Python27\Lib\site-packages\adabas\”, line 40, in
Adalink = ctypes.cdll.LoadLibrary (‘’)
File “C:\Python27\Lib\ctypes__”, line 440, in LoadLibrary
Return self.dlltype (name)
File "C:\Python27\Lib\ctypes_", line 362, in init
Self._handle = _dlopen (self._name, mode)
WindowsError: [Error 126] The specified module could not be found

In the “C:\SoftwareAG\common\lib” library there is no file “”

Can you help me?

Best Regards,

Well, on Windows you would be looking for adalnkx.dll which is in C:\SoftwareAG\AdabasClient\bin

The was tried because the adalnkx.dll could not be found.

The directory where adalnkx.dll is located should be set in the PATH variable.

Hello, access adabas in local machine from adapya is ok, is possible to access adabas in a remote machine by IP or another method?

Thank’s for advance.


For remote communication the product NET-WORK can be used.
On the machine where the Python program runs either NET-WORK client (WCL) or NET-WORK server for LUW is needed,
on the target machine NET-WORK server.
For local or remote access the program’s interface is always adalnkx

On which platform is your target database ?

I need help, anyone remains in this site ? email me, I need to conecct to an Adabas DB from python and this installation didn´t work. Plz Help me ?