Skip to main content

Generic database wrapper

Project description

Spartacus is a database wrapper for the most widely used RDBMS Python drivers.

Currently, Spartacus supports:

  • SQLite

    pip install Spartacus

  • Memory (in-memory SQLite)

    pip install Spartacus

  • PostgreSQL

    pip install Spartacus[postgresql]

  • MySQL

    pip install Spartacus[mysql]

  • MariaDB

    pip install Spartacus[mariadb]

  • Firebird

    pip install Spartacus[firebird]

  • Oracle

    # make sure you have Oracle Database or Instant Client installed and configured pip install Spartacus[oracle]

  • MS SQL

    sudo apt install freetds-bin freetds-dev pip install Spartacus[mssql]

  • IBM DB2

    pip install Spartacus[ibmdb2]

  • All supported RDBMS:

    pip install Spartacus[complete]

Instantiate this way:


v_database = Spartacus.Database.SQLite(‘../employees.db’)


v_database = Spartacus.Database.Memory()


v_database = Spartacus.Database.PostgreSQL(‘’, ‘5432’, ‘employees’, ‘william’, ‘password’)


v_database = Spartacus.Database.MySQL(‘’, ‘3306’, ‘employees’, ‘root’, ‘password’)


v_database = Spartacus.Database.MariaDB(‘’, ‘3306’, ‘employees’, ‘root’, ‘password’)


v_database = Spartacus.Database.Firebird(‘’, ‘3050’, ‘/path/to/employees.fdb’, ‘sysdba’, ‘masterkey’)


v_database = Spartacus.Database.Oracle(‘’, ‘1521’, ‘XE’, ‘employees’, ‘password’)

Microsoft SQL Server

v_database = Spartacus.Database.MSSQL(‘’, ‘1433’, ‘employees’, ‘sa’, ‘password’)


v_database = Spartacus.Database.IBMDB2(‘’, ‘50000’, ‘employes’, ‘db2inst1’, ‘password’)

Project details

Release history Release notifications

This version


Download files

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

Files for Spartacus, version 3.34
Filename, size File type Python version Upload date Hashes
Filename, size Spartacus-3.34.tar.gz (25.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page