fling logo of SQL30 - An ORM for SQLITE on ESX

SQL30 - An ORM for SQLITE on ESX

version 1.0 — September 30, 2020

Contributors 1

View All

Comments 0

View All

Summary

Persistence is an integral part of any real world software application. A widely used method of achieving (file based) persistence is through SQLITE database. Python natively provides support for interacting with SQLITE with the help of module "sqlite" (sqlite3 in python3). SQLAlchemy is a popular ORM used for interacting with sqlite database in Python. However, this and many other similar ORMs do not work on ESX Hypervisor as is. It is because these packages have dependency on other packages which are not supported / installable on ESX hypervisor further.

In this fling, we present SQL30, a ZERO weight ORM for SQLITE database written using only native python constructs. This python package has no dependency on any external python package and works as is on ESX version 6.5 and above.

SQL30 is useful as :

  • It helps developers achieve persistence in Python applications even on platforms such as ESX which have limited / trailing support for Python.
  • It improves productivity as developers can write (SQL based) database applications without having to learn SQL itself.

Requirements

Python and sqlite
(Both are available as of now on ESX 6.5)

Python is still 3.5 version on ESX 6.5 , while widely used on now is Python 3.6. However, beauty of this fling submission is that it works with very limited support of Python as well.

Instructions

Installation

SQL30 python package, sql30.egg, with applicable license can be downloaded from fling site under the file name sql30.zip. The package can also be built locally with the steps below or installed directly from pypi server ( https://pypi.org/project/sql30/ ). However, the license attached (in sql30.zip) would still be applicable to this fling.

$ virtualenv -p python3 . 
$ mkdir unpacked
$ bin/pip install --target=./unpacked/ sql30
$ cd unpacked
$ zip -r9 ../sql30.egg *
$ cd -
# 

sql30.egg file generated by above steps can now be taken and used with any machine with python3 and sqlite3 (python module) available. An example of the same is shown below. Here sql30.egg is being taken to an ESX Hypervisor with a Python 3.5.6 version and shown to consume egg file.

[root@prom-0505695d9ce:~] PYTHONPATH=sql30.egg python
Python 3.5.6 (default, Feb  2 2019, 01:09:51)
[GCC 4.6.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
No entry for terminal type "screen.xterm-256color";
using dumb terminal settings.
>>> from sql30 import db
>>> import os
>>> os.system('uname -a')
VMkernel prom-0505695d9ce.nsbucqesystem.test 6.5.0 #1 SMP Release build-13753126 May 19 2019 21:13:25 x86_64 x86_64 x86_64 ESXi
0
>>> class Dummy(db.Model):
...     pass
...
>>> dir(Dummy)
['DB_SCHEMA', 'VALIDATE_BEFORE_WRITE', '__class__', '__delattr__', '__dict_




Similar Flings

No similar flings found. Check these out instead...
Dec 12, 2022
fling logo of Control My Update

Control My Update

version 2.1.4

This Fling is a full 360 degree solution for Windows Update management. Create full supported Windows Update configurations and use the fling for install and monitor Windows Updates.

Oct 28, 2015
fling logo of Onyx for the Web Client

Onyx for the Web Client

version 1.0

Onyx for the Web Client is a Fling that translates actions taken in the vSphere Web Client to PowerCLI.Net code. This Fling was the winning entry in last year’s 2014 Fling Contest. It’s an update, of sorts, to the Onyx fling, as it allows for similar functionality in the web client.

Nov 07, 2016
fling logo of NSX for App Volumes

NSX for App Volumes

version 1.0.0

NSX for App Volumes offers the ability to manage network policies associated with applications in App Volumes.

Aug 13, 2012
fling logo of vFabric Data Director Service Gateway for CloudFoundry

vFabric Data Director Service Gateway for CloudFoundry

version 1.0

vFabric Data Director Service Gateway for Cloud Foundry enables service providers to deliver a vFabric Postgres database-as-a-service solution based on CloudFoundry.org and vFabric Data Director.

May 17, 2022
fling logo of VMware OS Optimization Tool

VMware OS Optimization Tool

The VMware OS Optimization Tool helps optimize Windows desktops for use with VMware Horizon View.

Feb 04, 2021
fling logo of VMware Machine Learning Platform

VMware Machine Learning Platform

version 0.4.1

This Fling provides a platform for Data Scientists to quickly setup a virtualized cloud infrastructure to conduct data science experiments.

View More