Code Monkey home page Code Monkey logo

dolphindb-python's Introduction

DolphinDB Python API

Environment Setup

Before Running the scripts, please have python packages numpy and pandas installed.

Method 1:

Please download the 64bit python 3.6 version of anaconda, which contains python and all packages we need to run xxdb api python scripts https://www.continuum.io/downloads

Method 2:

Download and install the latest python 3.6.*

sudo easy_install pip
pip install numpy pandas

Then, please go to our python api folder and install the package through the following command:

  • To install for the first time: python setup.py install

  • To update the existing install: python setup.py install --force

Usage

Assuming you have dolphindb SERVER running on port 8848, you can run the following commands in python console

import dolphindb as ddb

# start a DolphinDB session
s = ddb.session() 

# connect to DolphinDB server
success = s.connect('localhost', 8848)

# or connect with login info
success = s.connect('localhost', 8848, "admin", "123456") 


if success:
    obj = s.run("Your XXDB script") # run dolphinDB script
    print(obj)

For more examples, please refer to python api tutorial:

The jupter notebook tutorial here

or

https://github.com/dolphindb/Tutorials_EN/blob/master/python_api.md

Package Introduction

session.py: DolphinDB api for querying DolphinDB server
settings.py: contain the data form and type definitions, and other settings
data_factory.py: python data building factory based on returned DolphinDB object
socket_util.py: python socket protocols
date_util.py: converting integer into python datetime object
table.py: manipulate DolphinDB SQL query through python class "Table".

dolphindb-python's People

Contributors

shenhongfei avatar windancer79 avatar xiaodanzhang 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.