规整 python 接口

This commit is contained in:
fasiondog 2020-07-17 23:42:02 +08:00
parent c2087890e6
commit 4f38ba1b0b
3 changed files with 34 additions and 48 deletions

View File

@ -9,7 +9,7 @@
"outputs": [],
"source": [
"%matplotlib inline\n",
"%time from hikyuu.interactive.interactive import *"
"%time from hikyuu import *"
]
},
{
@ -24,7 +24,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python [default]",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
@ -38,9 +38,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.3"
"version": "3.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 0
"nbformat_minor": 1
}

View File

@ -2,22 +2,28 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Wall time: 6.67 s\n"
"std::cout are redirected to python::stdout\n",
"std::cerr are redirected to python::stderr\n",
"2020-07-17 21:49:20.593 [HKU-I] - Loading market information... [hku::BaseInfoDriver::loadBaseInfo]\n",
"2020-07-17 21:49:20.597 [HKU-I] - Loading stock type information... [hku::BaseInfoDriver::loadBaseInfo]\n",
"2020-07-17 21:49:20.598 [HKU-I] - Loading stock information... [hku::BaseInfoDriver::loadBaseInfo]\n",
"2020-07-17 21:49:22.927 [HKU-I] - Loading KData... [hku::StockManager::init]\n",
"2020-07-17 21:49:22.935 [HKU-I] - Preloading all day kdata to buffer! [hku::StockManager::setKDataDriver]\n",
"2020-07-17 21:49:37.535 [HKU-I] - 14.61s Loaded Data. [hku::StockManager::init]\n",
"Wall time: 17.7 s\n"
]
}
],
"source": [
"%matplotlib inline\n",
"%time from hikyuu.interactive.interactive import *"
"%time from hikyuu import *"
]
},
{
@ -35,59 +41,39 @@
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Wall time: 4.42 s\n"
"更新间隔小于60秒未更新\n",
"上次更新时间: 2020-07-17 21:59:11.752063\n",
"Wall time: 486 µs\n"
]
}
],
"source": [
"%time realtimeUpdate('tushare')"
"%time realtime_update('sina')"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Wall time: 2.46 s\n"
"更新完毕! 2020-07-17 21:59:11.752063\n",
"Wall time: 19.1 s\n"
]
}
],
"source": [
"%time realtimeUpdate('sina')"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Wall time: 20.3 s\n"
]
}
],
"source": [
"%time realtimeUpdate('qq')"
"%time realtime_update('qq')"
]
},
{
@ -102,9 +88,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python [conda root]",
"display_name": "Python 3",
"language": "python",
"name": "conda-root-py"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
@ -116,7 +102,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.3"
"version": "3.7.6"
}
},
"nbformat": 4,

View File

@ -5,10 +5,10 @@ datadir = .\\test_data
[block]
type = qianlong
dir = .\\test_data\\block
指数板块 = zsbk.ini
行业板块 = hybk.ini
地域板块 = dybk.ini
概念板块 = gnbk.ini
指数板块 = zsbk.ini
行业板块 = hybk.ini
地域板块 = dybk.ini
概念板块 = gnbk.ini
self = self.ini
[preload]