Skip to main content

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

Project description

odbcdol

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

To install: pip install odbcdol

Here's how it looks:

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

Project details


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.3.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

odbcdol-0.0.3-py3-none-any.whl (7.7 kB view hashes)

Uploaded Python 3

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