https://github.com/wind39/spartacus
Generic database wrapper
https://github.com/wind39/spartacus
Last synced: 12 months ago
JSON representation
Generic database wrapper
- Host: GitHub
- URL: https://github.com/wind39/spartacus
- Owner: wind39
- License: mit
- Created: 2017-03-28T15:26:23.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-02-08T11:00:51.000Z (over 4 years ago)
- Last Synced: 2025-05-30T07:37:06.561Z (about 1 year ago)
- Language: Python
- Homepage:
- Size: 80.8 MB
- Stars: 11
- Watchers: 2
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: LICENSE
Awesome Lists containing this project
README
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')