# VeighNa框架的PostgreSQL数据库接口
<p align="center">
<img src ="https://vnpy.oss-cn-shanghai.aliyuncs.com/vnpy-logo.png"/>
</p>
<p align="center">
<img src ="https://img.shields.io/badge/version-1.0.3-blueviolet.svg"/>
<img src ="https://img.shields.io/badge/platform-windows|linux|macos-yellow.svg"/>
<img src ="https://img.shields.io/badge/python-3.10|3.11|3.12-blue.svg" />
</p>
## 说明
基于peewee开发的PostgreSQL数据库接口。
## 使用
### 全局配置
在VeighNa中使用PostgreSQL时,需要在全局配置中填写以下字段信息:
|名称|含义|必填|举例|
|---------|----|---|---|
|database.name|名称|是|postgresql|
|database.host|地址|是|localhost|
|database.port|端口|是|5432|
|database.database|实例|是|vnpy|
|database.user|用户名|是|postgres|
|database.password|密码|是|123456|
请注意,VeighNa不会主动为关系型数据库创建数据库,所以请确保你所填的database.database字段对应的数据库已经创建好了。若未创建数据库,请手动连上数据库并创建。
### 创建实例
VeighNa不会主动为PostgreSQL数据库创建实例,所以使用前请确保database.database字段中填写的的数据库实例已经创建了。
若实例尚未创建,可以使用【pgAdmin 4】客户端的【Create Database】进行操作。
Raw data
{
"_id": null,
"home_page": "https://www.vnpy.com",
"name": "vnpy-postgresql",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "quant, quantitative, investment, trading, algotrading",
"author": "Xiaoyou Chen",
"author_email": "xiaoyou.chen@mail.vnpy.com",
"download_url": "https://files.pythonhosted.org/packages/13/14/e00347bb5443f1487acc7c77a6ddd7e766ec45ef8da4dca1c55669aa37ef/vnpy_postgresql-1.0.3.tar.gz",
"platform": null,
"description": "# VeighNa\u6846\u67b6\u7684PostgreSQL\u6570\u636e\u5e93\u63a5\u53e3\r\n\r\n<p align=\"center\">\r\n <img src =\"https://vnpy.oss-cn-shanghai.aliyuncs.com/vnpy-logo.png\"/>\r\n</p>\r\n\r\n<p align=\"center\">\r\n <img src =\"https://img.shields.io/badge/version-1.0.3-blueviolet.svg\"/>\r\n <img src =\"https://img.shields.io/badge/platform-windows|linux|macos-yellow.svg\"/>\r\n <img src =\"https://img.shields.io/badge/python-3.10|3.11|3.12-blue.svg\" />\r\n</p>\r\n\r\n## \u8bf4\u660e\r\n\r\n\u57fa\u4e8epeewee\u5f00\u53d1\u7684PostgreSQL\u6570\u636e\u5e93\u63a5\u53e3\u3002\r\n\r\n## \u4f7f\u7528\r\n\r\n### \u5168\u5c40\u914d\u7f6e\r\n\r\n\u5728VeighNa\u4e2d\u4f7f\u7528PostgreSQL\u65f6\uff0c\u9700\u8981\u5728\u5168\u5c40\u914d\u7f6e\u4e2d\u586b\u5199\u4ee5\u4e0b\u5b57\u6bb5\u4fe1\u606f\uff1a\r\n\r\n|\u540d\u79f0|\u542b\u4e49|\u5fc5\u586b|\u4e3e\u4f8b|\r\n|---------|----|---|---|\r\n|database.name|\u540d\u79f0|\u662f|postgresql|\r\n|database.host|\u5730\u5740|\u662f|localhost|\r\n|database.port|\u7aef\u53e3|\u662f|5432|\r\n|database.database|\u5b9e\u4f8b|\u662f|vnpy|\r\n|database.user|\u7528\u6237\u540d|\u662f|postgres|\r\n|database.password|\u5bc6\u7801|\u662f|123456|\r\n\r\n\u8bf7\u6ce8\u610f\uff0cVeighNa\u4e0d\u4f1a\u4e3b\u52a8\u4e3a\u5173\u7cfb\u578b\u6570\u636e\u5e93\u521b\u5efa\u6570\u636e\u5e93\uff0c\u6240\u4ee5\u8bf7\u786e\u4fdd\u4f60\u6240\u586b\u7684database.database\u5b57\u6bb5\u5bf9\u5e94\u7684\u6570\u636e\u5e93\u5df2\u7ecf\u521b\u5efa\u597d\u4e86\u3002\u82e5\u672a\u521b\u5efa\u6570\u636e\u5e93\uff0c\u8bf7\u624b\u52a8\u8fde\u4e0a\u6570\u636e\u5e93\u5e76\u521b\u5efa\u3002\r\n\r\n### \u521b\u5efa\u5b9e\u4f8b\r\n\r\nVeighNa\u4e0d\u4f1a\u4e3b\u52a8\u4e3aPostgreSQL\u6570\u636e\u5e93\u521b\u5efa\u5b9e\u4f8b\uff0c\u6240\u4ee5\u4f7f\u7528\u524d\u8bf7\u786e\u4fdddatabase.database\u5b57\u6bb5\u4e2d\u586b\u5199\u7684\u7684\u6570\u636e\u5e93\u5b9e\u4f8b\u5df2\u7ecf\u521b\u5efa\u4e86\u3002\r\n\r\n\u82e5\u5b9e\u4f8b\u5c1a\u672a\u521b\u5efa\uff0c\u53ef\u4ee5\u4f7f\u7528\u3010pgAdmin 4\u3011\u5ba2\u6237\u7aef\u7684\u3010Create Database\u3011\u8fdb\u884c\u64cd\u4f5c\u3002\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "PostgreSQL database adapter for VeighNa quant trading framework.",
"version": "1.0.3",
"project_urls": {
"Homepage": "https://www.vnpy.com"
},
"split_keywords": [
"quant",
" quantitative",
" investment",
" trading",
" algotrading"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e7e2dfdb80b9d34643998ed50aa414acfbfd92c72e560a73bdaac9b4a908528f",
"md5": "c844e14ef983151da48575abe342b075",
"sha256": "274351f716c5e956fe1d0d238e3101b9c6090b84134a026a0e1def81211e5895"
},
"downloads": -1,
"filename": "vnpy_postgresql-1.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c844e14ef983151da48575abe342b075",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 7356,
"upload_time": "2024-03-22T06:42:22",
"upload_time_iso_8601": "2024-03-22T06:42:22.549512Z",
"url": "https://files.pythonhosted.org/packages/e7/e2/dfdb80b9d34643998ed50aa414acfbfd92c72e560a73bdaac9b4a908528f/vnpy_postgresql-1.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1314e00347bb5443f1487acc7c77a6ddd7e766ec45ef8da4dca1c55669aa37ef",
"md5": "bd025a0850f9327e051a149eeea51f12",
"sha256": "c0ceac820bf634374d4987218f950475d1b37834cdca02890647a63c94080204"
},
"downloads": -1,
"filename": "vnpy_postgresql-1.0.3.tar.gz",
"has_sig": false,
"md5_digest": "bd025a0850f9327e051a149eeea51f12",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7423,
"upload_time": "2024-03-22T06:42:23",
"upload_time_iso_8601": "2024-03-22T06:42:23.991592Z",
"url": "https://files.pythonhosted.org/packages/13/14/e00347bb5443f1487acc7c77a6ddd7e766ec45ef8da4dca1c55669aa37ef/vnpy_postgresql-1.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-22 06:42:23",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "vnpy-postgresql"
}