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))

Metadata

Release files for odbcdol 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for odbcdol 0.0.5
File Size Uploaded
odbcdol-0.0.5.tar.gz 15.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for odbcdol 0.0.5
File Interpreter ABI Platform
odbcdol-0.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 29.1 kB

Release files / odbcdol-0.0.5.tar.gz

Download URL odbcdol-0.0.5.tar.gz
Size 15.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e29ab239365a02791901abfbbb75cd64ec375168dc4d26b6409cfb08e834f526
BLAKE2b-256 checksum
How to use checksums
35522e2c06e247574eae621cf900b4c9fb63b43707469683f15e850f5426d2d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","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}

Release files / odbcdol-0.0.5-py3-none-any.whl

Download URL odbcdol-0.0.5-py3-none-any.whl
Size 14.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9f7ba46f30786b00bb161faa27d3e60c8654bd1e2cc1d8c2f5243b570cf61d32
BLAKE2b-256 checksum
How to use checksums
d19d8bc2df26c56238ca1d509dd2eddf084000bb35a9b1e3b85732e7459accef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","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}

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release 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