Giter Site home page Giter Site logo

thihara / pytds Goto Github PK

View Code? Open in Web Editor NEW

This project forked from denisenkom/pytds

0.0 2.0 0.0 2.03 MB

Python DBAPI driver for MSSQL using pure Python TDS (Tabular Data Stream) protocol implementation

License: MIT License

Batchfile 0.09% Shell 0.08% Python 99.82%

pytds's Introduction

pytds

https://secure.travis-ci.org/denisenkom/pytds.png?branch=master https://ci.appveyor.com/api/projects/status/a5h4y29063crqtet?svg=true

Python DBAPI driver for MSSQL using pure Python TDS (Tabular Data Stream) protocol implementation. Doesn't depend on ADO or FreeTDS. Can be used on any platform, including Linux, MacOS, Windows.

It can be used with https://pypi.python.org/pypi/django-sqlserver as a Django database backend.

Features

  • Fully supports new MSSQL 2008 date types: datetime2, date, time, datetimeoffset
  • MARS
  • Bulk insert
  • Table-valued parameters
  • TLS connection encryption

Installation

To install run this command:

$ pip install python-tds

If you want to use TLS you should also install pyOpenSSL package:

$ pip install pyOpenSSL

For a better performance install bitarray package too:

$ pip install bitarray

Documentation

Documentation is available at https://python-tds.readthedocs.io/en/latest/.

Example

To connect to database do

import pytds
with pytds.connect('server', 'database', 'user', 'password') as conn:
    with conn.cursor() as cur:
        cur.execute("select 1")
        cur.fetchall()

To enable TLS you should also provide cafile parameter which should be a file name containing trusted CAs in PEM format.

For detailed documentation of connection parameters see: pytds.connect

pytds's People

Contributors

chadcatlett avatar denisenkom avatar diegueus9 avatar niphlod avatar radyz avatar tpow avatar vflashm avatar zdxerr avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.