Git Product home page Git Product logo

dbadapter's Introduction

DBAdapter

Database adapters forked from IOPro

DBAdapter is a Python module containing optimized data adapters for importing data from a variety of database sources into NumPy arrays and Pandas DataFrame. Database adapter leverages an optimized pyodbc module for accessing any relational database that supports the ODBC interface (SQL Server, PostgreSQL, MySQL, etc).

Build Requirements

Building DBAdapter requires a number of dependencies. In addition to a C/C++ dev environment, the following modules are needed, which can be installed via conda:

  • NumPy
  • Pandas
  • unixodbc 2.3.4 (C lib, Linux only)

Building Conda Package

Note: If building under Windows, make sure the following commands are issued within the Visual Studio command prompt for version of Visual Studio that matches the version of Python you're building for. Python 2.6 and 2.7 needs Visual Studio 2008, Python 3.3 and 3.4 needs Visual Studio 2010, and Python 3.5 needs Visual Studio 2015.

  1. Build DBAdapter using the following command:

    conda build buildscripts/condarecipe --python 3.5
    
  2. DBAdapter can now be installed from the built conda package:

    conda install dbadapter --use-local
    

Building By Hand

Note: If building under Windows, make sure the following commands are issued within the Visual Studio command prompt for version of Visual Studio that matches the version of Python you're building for. Python 2.6 and 2.7 needs Visual Studio 2008, Python 3.3 and 3.4 needs Visual Studio 2010, and Python 3.5 needs Visual Studio 2015.

For building DBAdapter for local development/testing:

  1. Install most of the above dependencies into environment called 'dbadapter':

    conda env create -f environment.yml
    

    Be sure to activate new dbadapter environment before proceeding.

  2. Build DBAdapter using Cython/distutils:

    python setup.py build_ext --inplace
    

Testing

Tests can be run by calling the dbadapter module's test function. By default only the TextAdapter tests will be run:

TODO: The pyodbc tests live in the dbadapter/pyodbc/test* directories. They are not being run (yet).

python -Wignore -c 'import dbadapter; dbadapter.test()'

(Note: numpy.testing might produce a FurtureWarning that is not directly relevant to these unit tests).

dbadapter's People

Contributors

gbrener 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.