PyKiteConnect 项目教程

随笔3周前发布 何燕
47 0 0

PyKiteConnect 项目教程

pykiteconnectThe official Python client library for the Kite Connect trading APIs项目地址:https://gitcode.com/gh_mirrors/py/pykiteconnect

1. 项目的目录结构及介绍

PyKiteConnect 是一个用于与 Kite Connect API 进行通信的 Python 客户端库。以下是项目的目录结构及其介绍:

  1. pykiteconnect/

  2. ├── examples/ # 示例代码目录

  3. ├── kiteconnect/ # 主要代码目录

  4. ├── tests/ # 测试代码目录

  5. ├── .coveragerc # 代码覆盖率配置文件

  6. ├── .gitignore # Git 忽略文件配置

  7. ├── .gitmodules # Git 子模块配置

  8. ├── LICENSE # 项目许可证

  9. ├── README.md # 项目说明文档

  10. ├── dev_requirements.txt # 开发依赖文件

  11. ├── pytest.ini # pytest 配置文件

  12. ├── setup.cfg # 安装配置文件

  13. └── setup.py # 安装脚本

目录结构介绍

  • examples/:包含使用 PyKiteConnect 的示例代码。
  • kiteconnect/:包含 PyKiteConnect 的主要代码。
  • tests/:包含项目的测试代码。
  • .coveragerc:代码覆盖率配置文件。
  • .gitignore:Git 忽略文件配置。
  • .gitmodules:Git 子模块配置。
  • LICENSE:项目许可证。
  • README.md:项目说明文档。
  • dev_requirements.txt:开发依赖文件。
  • pytest.ini:pytest 配置文件。
  • setup.cfg:安装配置文件。
  • setup.py:安装脚本。

2. 项目的启动文件介绍

PyKiteConnect 项目的启动文件是 setup.py。这个文件用于安装和管理项目的依赖项。以下是 setup.py 的基本内容:

  1. from setuptools import setup, find_packages

  2. setup(

  3. name="pykiteconnect",

  4. version="4.0.0",

  5. packages=find_packages(),

  6. install_requires=[

  7. "requests",

  8. "six",

  9. "pyOpenSSL",

  10. "autobahn",

  11. "twisted",

  12. "service_identity"

  13. ],

  14. author="Zerodha Technology",

  15. author_email="support@kite.trade",

  16. description="The official Python client for communicating with the Kite Connect API",

  17. long_description=open("README.md").read(),

  18. long_description_content_type="text/markdown",

  19. url="https://github.com/zerodha/pykiteconnect",

  20. classifiers=[

  21. "License :: OSI Approved :: MIT License",

  22. "Programming Language :: Python :: 3",

  23. "Programming Language :: Python :: 3.6",

  24. "Programming Language :: Python :: 3.7",

  25. "Programming Language :: Python :: 3.8",

  26. "Programming Language :: Python :: 3.9",

  27. ],

  28. )

启动文件介绍

  • setup.py:用于安装和管理项目的依赖项。它定义了项目的名称、版本、包、依赖项、作者、描述等信息。

3. 项目的配置文件介绍

PyKiteConnect 项目的配置文件包括 setup.cfgpytest.ini

setup.cfg

setup.cfg 是一个配置文件,用于定义安装过程中的各种选项。以下是 setup.cfg 的基本内容:

  1. [metadata]

  2. name = pykiteconnect

  3. version = 4.0.0

  4. author = Zerodha Technology

  5. author_email = support@kite.trade

  6. description = The official Python client for communicating with the Kite Connect API

  7. long_description = file: README.md

  8. long_description_content_type = text/markdown

  9. url = https://github.com/zerodha/pykiteconnect

  10. classifiers =

  11. License :: OSI Approved :: MIT License

  12. Programming Language :: Python :: 3

  13. Programming Language :: Python :: 3.6

  14. Programming Language :: Python :: 3.7

  15. Programming Language :: Python :: 3.8

  16. Programming Language :: Python :: 3.9

  17. [options]

  18. packages = find:

  19. install_requires =

  20. requests

  21. six

  22. pyOpenSSL

  23. autobahn

  24. twisted

  25. service_identity

pytest.ini

pytest.ini 是 pytest 的配置文件,用于定义测试运行时的各种选项。以下是 `

pykiteconnectThe official Python client library for the Kite Connect trading APIs项目地址:https://gitcode.com/gh_mirrors/py/pykiteconnect

© 版权声明

相关文章

暂无评论

您必须登录才能参与评论!
立即登录
暂无评论...