Sign inSign up

ibaytar/python3.12-odbc-pandas-requests

By ibaytar

•Updated almost 2 years ago

Python 3.12 with ODBC, Pandas, and Requests

Image
Data science
Databases & storage
0

1.3K

ibaytar/python3.12-odbc-pandas-requests repository overview

⁠Python 3.12 with ODBC, Pandas, and Requests

This Docker image provides a Python 3.12 environment with the following pre-installed:

  • pyodbc: For connecting Python applications to ODBC-compliant databases, including Microsoft SQL Server.
  • pandas: A powerful data analysis and manipulation library.
  • requests: A user-friendly HTTP library for making API requests.
  • Microsoft ODBC Driver 17 for SQL Server: To enable ODBC connectivity with SQL Server databases.

⁠Image Details

  • Base Image: python:3.12-slim
  • Installed Libraries:
    • pyodbc
    • pandas
    • requests
  • ODBC Driver: Microsoft ODBC Driver 17

⁠Usage

To use this image, pull it from Docker Hub:

podman pull docker.io/ibaytar/python3.12-odbc-pandas-requests:latest

⁠Example: Connecting to SQL server

Here is an example of how you might connect to an SQL Server database using pyodbc:

import pyodbc

conn = pyodbc.connect(
    'DRIVER={ODBC Driver 17 for SQL Server};'
    'SERVER=your_server_name;'
    'DATABASE=your_db_name;'
    'UID=your_username;'
    'PWD=your_password'
)
cursor = conn.cursor()
cursor.execute('SELECT * FROM your_table')
for row in cursor:
    print(row)
conn.close()

Tag summary

Content type

Image

Digest

sha256:ab9190222…

Size

143.8 MB

Last updated

almost 2 years ago

docker pull ibaytar/python3.12-odbc-pandas-requests