Coder Social home page Coder Social logo

cyanodbc's Introduction

cyanodbc

A Cython Wrapper for Nanodbc which dubs itself as a "A small C++ wrapper for the native C ODBC API".

Build Status

Branch Linux/OSX Windows Coverage
master master master master

Building

To build Cyanodbc, you'll need CMake, Ninja, Cython, and Python. Additionally to run tests you will need pytest. The good news is all of these are available on PyPi, so they are just a pip install away.

pip install requirements.txt

On all platforms the first step is cloning the repo and seting up the build directory

git clone --recurse-submodules https://github.com/cyanodbc/cyanodbc.git
cd cyanodbc
mkdir build
cd build

From there, the next step is to build the shared library, using the cmake build system:

cmake -G Ninja -DNANODBC_ODBC_VERSION=SQL_OV_ODBC3 -DCMAKE_BUILD_TYPE=Release -DCYANODBC_TARGET_PYTHON=3.5 ..
cmake --build .

Cmake notes:

  • Make sure the variable DCYANODBC_TARGET_PYTHON is set to the corresponding python version you are using - this works around certain quirks of CMake python identification.
  • Nanodbc is built and linked automatically when you build cyanodbc. We expose the following cmake compile-time options:
CMake Option Possible Values Details
NANODBC_ENABLE_BOOST OFF or ON Use Boost for Unicode string convertions (requires [Boost.Locale][boost-locale]). Workaround to issue #24.
NANODBC_ODBC_VERSION SQL_OV_ODBC3[...] Forces ODBC version to use. Default is SQL_OV_ODBC3_80 if available, otherwise SQL_OV_ODBC3.

Please check the Nanodbc Project for more information on these as well as other options that can be made available, if there is a need.

Finally, once the shared library is built, you can install the package using pip

pip install -e src/cython

Testing

Pytest is used for running the tests.

simply run

cd cyanodbc
pytest tests

cyanodbc's People

Contributors

detule avatar rdhushyanth 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.