Skip to content

Intersystems Cache Object-Relational Mapper based on Intersystems Python Binding module

License

Notifications You must be signed in to change notification settings

healiseu/IntersystemsCacheORM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IntersystemsCacheORM

Intersystems Cache Object-Relational Mapper based on Intersystems Python Binding module.

About CacheORM

This module is an enhanced OOP porting of Intersystems Cache-Python binding. It serves the purpose of an object-relational mapper in python for Intersystems Cache database There are three classes implemented:

The intersys.pythonbind package is a Python C extension that provides Python application with transparent connectivity to the objects stored in the Caché database.

The Caché Object Server, a high performance server process, manages communication between Python clients and a Caché database server. It communicates using standard networking protocols (TCP/IP), and can run on any platform supported by Caché.

Source Code

Open and view cacheorm.py The code released here was originally written and used as a module of TRIADB project.

Tests and Demos

There are two folders in this release:

  • testCacheORM contains python jupyter notebook files that demonstrate CacheQuery and CacheClass
  • testCacheBinding are tests written for Intersystems Cache python binding

One can simply compare tests with demos to appreciate the work in this project to leverage intersystems cache python binding.

Documentation

Currently there is no documentation written for the project. Python jupyter notebooks in testCacheORM folder demonstrate the use of CacheQuery and CacheClass. You may also study the code that is well commented (see cacheorm.py).

Bonus

I wrote these SocketReceiver, SocketSender classes for Python 3 so now it is super easy for anyone to run a simple TCP socket communication test on two Python consoles. This was done in order to capture "writes" from Caché. In that case you need to redirect your IO and write the data to python console.

Installation

Caché provides client-side Python support through the intersys.pythonbind module, which implements the connection and caching mechanisms required to communicate with a Caché server. This module must be compiled and installed in your environment. Set up your environment variables to support C compilation and linking, as described in the installation guide of Intersystems Cache Python Binding. Also make sure that you are using Python 3 interpreter when you run the setup.

If installation is successful the module will be placed under your python site-packages in a folder with the name pythonbind3-1.0-py3.6-linux-x86_64.egg. Now you may run any of the sample programs that are provided by Intersystems Cache to verify that Python interpreter references properly intersys.pythonbind module.

If you passed successfully this stage then download CacheORM, unzip it and rename the folder as CacheORM. Locate your Python 3 installation and copy the folder under site-packages e.g. ../lib/python3.6/site-packages/CacheORM/

Finally try to execute my tests and demos. I have also placed jupyter notebook files at my Microsoft Azure library and you can ONLY view them or download and open them locally at your machine (I think you must login first).

About

Intersystems Cache Object-Relational Mapper based on Intersystems Python Binding module

Resources

License

Stars

Watchers

Forks

Packages

No packages published