DPT database API wrappers built using SWIG
Project description
Description
This package provides Python applications with the database API used by DPT.
DPT is a multi-user database system for Microsoft Windows.
The Python application can be as simple as a single-threaded process embedding the DPT API.
The package is available only as a source distribution. It is built on Microsoft Windows in a Msys2 environment using the mingw-w64-i686-gcc, mingw-w64-i686-python, and swig, ports.
Versions of dptdb earlier than 0.8 are built in a MinGW environment, but will not work at Python 3.8 or later even if a build succeeds.
The package can be used with the mingw-w64-i686-python port on Microsoft Windows.
The package cannot be used with any Python version installed by a Microsoft Python installer.
Setup will download the DPT API source and documentation zip files if an internet connection is available.
There is no separate documentation for Python.
Installation Instructions
The package can be installed and used with the mingw-w64-i686-python port in a Msys2 environment on Microsoft Windows.
Build dependencies
Download and install the Msys2 environment.
Follow the Msys2 instructions to install Msys2.
Install SWIG and Python using the pacman utility.
Install the package by typing
python setup.py install –user
at the command prompt of a MINGW32 shell with setup.py in the current directory.
Runtime dependencies
Msys2 environment with the mingw-w64-i686-python port used to build dptdb.
A directory named like dpt3.0_dptdb-0.5-py2.7.egg is put in site-packages by the install command. The name means version 0.5 of dptdb for Python 2.7 wrapping version 3.0 of the DPT API. This directory contains the dptdb and EGG-INFO directories.
The DPT documentation zip file is in the source distribution.
Sample code
The dptdb/test directory contains a simple application which populates a database, using some contrived data, and does some simple data retrievals.
This can be run on Microsoft Windows by typing
python pydpt-test.py
at the command prompt of a MINGW32 shell with pydpt-test.py in the current directory.
You may need to use ‘<path to python>/python pydpt-test.py’ if several versions of Python are installed.
The sample application offers seven options which create databases with different numbers of records. Each record has 6 fields and all fields are indexed.
One option, called normal, adds 246,625 records to a database in a 16 Mb file in about 3.33 minutes with transaction backout enabled.
The shortest option adds 246,625 records to a database in a 16 Mb file in about 0.6 minutes with transaction backout disabled.
The longest option adds 7,892,000 records to a database in a 526 Mb file in about 18.75 minutes with transaction backout disabled.
The figures are for a 2Gb 667MHz memory, 1.8GHz CPU, solid state drive, Microsoft Windows XP installation.
Restrictions
It is not known if dptdb is now usable in a Msys2 environment under Wine, or if the restrictions which affected the old versions built in a MinGW environment would be relevant.
Notes
This package is built from DPT_V3R0_DBMS.ZIP, a recent DPT API source code distribution, by default.
You will need the DPT API documentation to use this package. This is included as DBAPI.html in DPT_V3R0_DOCS.ZIP.
The DPT documentation zip file is in a directory named like C:/Python27/Lib/site-packages/dpt3.0_dptdb-0.5-py2.7.egg/dptdb, using the example at the end of Installation Instructions.
A _dptapi.pyd built for Python 2.7 will work only on Python 2.7 and so on.
The DPT API distribution contains independent scripts and instructions to build dptdb mentioning much earlier versions of the build dependencies.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file dpt3.0-dptdb-0.8.1.zip
.
File metadata
- Download URL: dpt3.0-dptdb-0.8.1.zip
- Upload date:
- Size: 33.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a8755e88922fd9583ea3eb54649bd43c1d152de07ca65e9fcde3de564340be1 |
|
MD5 | 5b3f5d0129ddc962058b1a7dc7c0fa69 |
|
BLAKE2b-256 | 520b6d1ee29dd964fe15a734bd680f129345a0353f4d3d79d6e5c677318cc0d6 |