Pydolphindb
A C++ Boosted DolphinDB Python API
Install / Use
/learn @JasonYuchen/PydolphindbREADME
PyDolphinDB
A C++ boosted DolphinDB Python3 API based on Pybind11, DolphinDB Cpp API and DolphinDB Python3 API
Core features
- Connect to the DolphinDB server
- Login with encrption
- Run scripts and fetch the results
- RPC
- Upload supported Python objects
- Streaming
A detailed tutorial (pydolphindb/doc/tutorial.md, still in progress) about:
- Develop a Python C++ extension via pybind11
- Use DolphinDB C++ API to build the C++ extension
- Package your Python module and upload it to PyPi
Fast data conversion
pydolphindb can map the DolphinDB data structures to Python builtins
Python DolphinDB
NoneType VOID
bool BOOL
int LONG
float DOUBLE
str STRING
set SET
tuple VECTOR
list VECTOR
dict DICTIONARY
For efficiency and accuracy, pydolphindb support data conversions between numpy(array)/pandas(DataFrame) and DolphinDB
numpy dtype DolphinDB
bool BOOL
int8 CHAR
int16 SHORT
int32 INT
int64 LONG
float32 FLOAT
float64 DOUBLE
object STRING or ANY (based on type inference)
datetime64[D] DATE
datetime64[M] MONTH
datetime64[ms] TIMESTAMP
datetime64[m] MINUTE
datetime64[s] DATETIME
datetime64[ns] NANOTIMESTAMP
pandas
DataFrame TABLE
pandas does not support datetime64 otherthan datetime64[ns]
Build
1.prerequisite
- CMake
- Python
- OpenSSL 1.0.2
2.start build in the pydolphindb folder
mkdir build && cd build
cmake .. -DOPENSSL_LIB_PATH=/path/to/openssl-1.0.2/lib
make && make install
Some optional macros:
-DPYTHON_EXECUTABLE=/path/to/python
-DPYTHON_MODULE_EXTENSION=extension_string
-DVERSION_INFO=version_string
3.use pydolphindb/pydolphindb as a Python module folder
installing pydolphindb via setup.py will be supported later
Tested compilers
1.GCC 4.8.5 or newer
2.Cygwin/GCC
Tested Python
Python 3.4~3.7
Python 2.7 with minor modifications
Quick start
run the following script in Python3 after installation
import pydolphindb as pydb
s = pydb.session()
isSuccess = s.connect(DOLPHINDB_IP, DOLPHINDB_PORT)
if isSuccess:
s.run("1..100")
About
This project was created by JasonYuchen(jasonyuchen@foxmail.com).
License
pydolphindb is provided under MIT license that can be found in the LICENSE file.
Related Skills
node-connect
339.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
83.8kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
83.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
339.1kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
