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:

SQLite

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

Memory

v_database = Spartacus.Database.Memory()

PostgreSQL

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

MySQL

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

MariaDB

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

Firebird

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

Oracle

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

Microsoft SQL Server

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

IBM DB2

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

Project details


Release history Release notifications | RSS feed

This version

3.47

Download files

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

Source Distribution

Spartacus-3.47.tar.gz (27.5 kB view details)

Uploaded Source

File details

Details for the file Spartacus-3.47.tar.gz.

File metadata

  • Download URL: Spartacus-3.47.tar.gz
  • Upload date:
  • Size: 27.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.6

File hashes

Hashes for Spartacus-3.47.tar.gz
Algorithm Hash digest
SHA256 0dd27b3de6c6a882fb106c1b6a86f472536c0157d2214aa7f62c525a720fabef
MD5 952cd2e8a2a550ddcd03391a6731c7d8
BLAKE2b-256 deb0a4da16b42eeaf7ff8f26eebdbc16b1120e46f01f9695289da797db8ba779

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