Skip to main content

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


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 details)

Uploaded Source

File details

Details for the file nginqcomm-0.2.16.tar.gz.

File metadata

  • Download URL: nginqcomm-0.2.16.tar.gz
  • Upload date:
  • Size: 16.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.12

File hashes

Hashes for nginqcomm-0.2.16.tar.gz
Algorithm Hash digest
SHA256 a503bdada8e073cbc4a0fd7a7a3056094a32de519f7cc72284febde3c4eb878b
MD5 35cc510d95460005e1b3a51ac0d8d2aa
BLAKE2b-256 c66af11e482f72e127d7006e9d438f0d62fdeab2b21f9220663db4db5ce3313c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page