Skip to main content

DPT database API wrappers built using SWIG

Project description

Notice

Github.com/RogerMarsh/dptdb builds dpt3.0-dptdb wheels with Build Tools for Visual Studio 2017. It uses Msys2 to extract and patch the C++ source code on Microsoft Windows. Neither Build Tools for Visual Studio 2017 nor Msys2 is needed to run these dpt3.0-dptdb versions.

Development versions of dpt3.0-dptdb for 64-bit Pythons (*-amd64.exe) can be built this way.

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dpt3.0-dptdb-0.8.2.zip (33.6 kB view details)

Uploaded Source

File details

Details for the file dpt3.0-dptdb-0.8.2.zip.

File metadata

  • Download URL: dpt3.0-dptdb-0.8.2.zip
  • Upload date:
  • Size: 33.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for dpt3.0-dptdb-0.8.2.zip
Algorithm Hash digest
SHA256 178a1339c9f58349a70e849c50b3e0235a56bf7bcf3f9263c4d33810e8d150ba
MD5 e08e5831418818f3a20c6e9b8c78cec0
BLAKE2b-256 2398407ab62f1e26f39b21b08d03d06f5e96aaa5a0efbbbb25f5604af97a5829

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page