Skip to main content

odbcdol

odbc (through pyodbc) with a simple (dict-like or list-like) interface

System Requirements

Important: Before installing odbcdol, you need to install system-level ODBC drivers that cannot be installed via pip.

macOS

brew install unixodbc

Ubuntu/Debian

# Install unixODBC
sudo apt-get update
sudo apt-get install -y unixodbc unixodbc-dev

# Install Microsoft ODBC Driver for SQL Server
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list | \
    sudo tee /etc/apt/sources.list.d/mssql-release.list
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18

RHEL/CentOS/Fedora

# Install unixODBC
sudo yum install -y unixODBC unixODBC-devel

# Install Microsoft ODBC Driver for SQL Server
curl https://packages.microsoft.com/config/rhel/8/prod.repo | \
    sudo tee /etc/yum.repos.d/mssql-release.repo
sudo ACCEPT_EULA=Y yum install -y msodbcsql18

Windows

ODBC drivers are typically pre-installed on Windows. If you encounter issues, you may need to install the Microsoft ODBC Driver for SQL Server.

Installation

After installing the system requirements above:

pip install odbcdol

If you encounter import errors, the package will provide detailed instructions about which system dependencies are missing.

Usage

from odbcdol import SQLServerPersister

sql_server_persister = SQLServerPersister()

print("Fetching a Record")
print(sql_server_persister[1])
print(sql_server_persister[3])
print("=========================")

print("Adding a Record")
sql_server_persister[3] = {"id": "3", "name": "new name"}
sql_server_persister[4] = {"id": "4", "name": "Hamid NEW"}
sql_server_persister[5] = {"id": "5", "name": "Hamid NEW AGAIN"}

print(sql_server_persister[3])
print(sql_server_persister[4])
print(sql_server_persister[5])
print("======================")

print("Deleting a Record")
del sql_server_persister[3]
del sql_server_persister[4]
del sql_server_persister[5]
print(sql_server_persister[3])
print("=====================")

print("Iterating over the records")
for record in sql_server_persister:
    print(record)
print("=========================")

print("Getting the length")
print(len(sql_server_persister))

Download files

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

Source Distribution

odbcdol-0.0.4.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

odbcdol-0.0.4-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file odbcdol-0.0.4.tar.gz.

File metadata

  • Download URL: odbcdol-0.0.4.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for odbcdol-0.0.4.tar.gz
Algorithm Hash digest
SHA256 311d7fab82deba227e675de83f313ab8e20b54e8071e05a4ed6839ee5967a18e
MD5 74564cad8735214b207e8b3aec6869a4
BLAKE2b-256 e281e3db5d253d0e9b56a9528eb1edb04d9becbdf6f985740afb453b577e249e

See more details on using hashes here.

File details

Details for the file odbcdol-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: odbcdol-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for odbcdol-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f3fc8577dd5314c7e95b6dd3d9ff975fdc6e704f2242d9ae63425720a5cb8ffc
MD5 c837dda74ffb808407adbdb95c6d379a
BLAKE2b-256 57e35d97f985fd51fdf50f4fbab7dfec7c4e8b26075503d8cee7cfe8db28f20b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 files

0.0.3

2 files

0.0.2

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page