nginq common lib
Project description
nginq-common
quant/nginq 的公共模块整理出来,独立做个源码仓库 nginq-common
后续 quant/nginq 拆分, 每个策略独立一个原编码仓库 strategy-18、strategy-6、strategy-b 等
安装工具
# pip install twine
pypi账号
-
在 pypi 注册账号
-
编辑 ~/.pypirc
# cd ~
# cat .pypirc
[distutils]
index-servers=pypi
[pypi]
repository = https://upload.pypi.org/legacy/
username = [pypiUserName]
password = [pypiPasswd]
单元测试
例子如下
# pwd
.../nginqcomm/utils/
# 编码/更新 order.py
...
# 单元测试
# python test_order.py
项目打包
# 修改版本号
# 每上传一次(详见以下 "上传" ),就要改一次版本号; 否则 pypi会报版本号错误
# pwd
.../nginqcomm
# cat setup.py
...
VERSION = '0.2.13'
...
# 打包
# python setup.py sdist build
# 上传
# twine upload dist/*
另, 不推荐的上传方式如下(密码容易被劫持)
# 打包
# python setup.py sdist
# 上传
# python setup.py upload
安装本项目的包(指定具体的版本进行安装)
- 之所以要指定具体的版本安装,是因为该库更新频繁,涉及的版本多,指定版本以规避混淆
## 手工导入
# pip install nginqcomm==0.2.13
## requirements.txt 文件
# cat requirements.txt
...
nginqcomm==0.2.13
...
## 安装后的查看
# pip list | grep -i nginqcomm
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nginqcomm-0.2.16.tar.gz
(16.2 kB
view hashes)