lixinger-python 0.3.2__tar.gz → 0.3.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/PKG-INFO +1 -1
  2. lixinger_python-0.3.3/examples/dividend_example.py +20 -0
  3. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/company/dividend.py +2 -0
  4. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/pyproject.toml +1 -1
  5. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/api/cn/company/test_dividend.py +128 -1
  6. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/uv.lock +1 -1
  7. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/.claude/settings.local.json +0 -0
  8. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/.env.example +0 -0
  9. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/.github/copilot-instructions.md +0 -0
  10. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/.github/workflows/README.md +0 -0
  11. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/.github/workflows/pr-checks.yml +0 -0
  12. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/.gitignore +0 -0
  13. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/.pre-commit-config.yaml +0 -0
  14. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/.python-version +0 -0
  15. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/.ruff.toml +0 -0
  16. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/ADD_NEW_API_QUICK.md +0 -0
  17. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/AGENTS.md +0 -0
  18. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/CHANGELOG.md +0 -0
  19. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/CLAUDE.md +0 -0
  20. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/DOCS.md +0 -0
  21. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/LICENSE +0 -0
  22. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/MANIFEST.in +0 -0
  23. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/PUBLISHING.md +0 -0
  24. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/README.md +0 -0
  25. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/SETUP.md +0 -0
  26. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/codecov.yml +0 -0
  27. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/client.md +0 -0
  28. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/company/announcement.md +0 -0
  29. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/company/candlestick.md +0 -0
  30. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/company/company.md +0 -0
  31. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/company/dividend.md +0 -0
  32. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/company/equity_change.md +0 -0
  33. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/company/fs/non_financial.md +0 -0
  34. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/company/fundamental/bank.md +0 -0
  35. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/company/fundamental/insurance.md +0 -0
  36. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/company/fundamental/non_financial.md +0 -0
  37. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/company/fundamental/other_financial.md +0 -0
  38. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/company/fundamental/security.md +0 -0
  39. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/company/indices.md +0 -0
  40. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/company/profile.md +0 -0
  41. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/fund/announcement.md +0 -0
  42. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/fund/asset_combination.md +0 -0
  43. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/fund/asset_industry_combination.md +0 -0
  44. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/fund/candlestick.md +0 -0
  45. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/fund/fund.md +0 -0
  46. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/fund/profile.md +0 -0
  47. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/fund/shareholdings.md +0 -0
  48. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/index/candlestick.md +0 -0
  49. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/index/constituent_weightings.md +0 -0
  50. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/index/constituents.md +0 -0
  51. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/index/drawdown.md +0 -0
  52. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/index/fundamental.md +0 -0
  53. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/index/index.md +0 -0
  54. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/index/tracking_fund.md +0 -0
  55. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/overview.md +0 -0
  56. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/development/code-style.md +0 -0
  57. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/development/contributing.md +0 -0
  58. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/development/testing.md +0 -0
  59. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/examples/company.md +0 -0
  60. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/examples/fund.md +0 -0
  61. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/examples/index.md +0 -0
  62. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/getting-started/configuration.md +0 -0
  63. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/getting-started/installation.md +0 -0
  64. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/getting-started/quickstart.md +0 -0
  65. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/index.md +0 -0
  66. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/examples/company_example.py +0 -0
  67. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/examples/company_profile_example.py +0 -0
  68. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/examples/index_constituent_weightings_example.py +0 -0
  69. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/examples/index_constituents_example.py +0 -0
  70. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/examples/index_info_example.py +0 -0
  71. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/fund_response.json +0 -0
  72. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/__init__.py +0 -0
  73. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/__init__.py +0 -0
  74. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/base.py +0 -0
  75. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/__init__.py +0 -0
  76. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/__init__.py +0 -0
  77. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/announcement.py +0 -0
  78. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/candlestick.py +0 -0
  79. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/company.py +0 -0
  80. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/dividend.py +0 -0
  81. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/equity_change.py +0 -0
  82. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/fs/__init__.py +0 -0
  83. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/fs/non_financial.py +0 -0
  84. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/fundamental/__init__.py +0 -0
  85. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/fundamental/bank.py +0 -0
  86. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/fundamental/insurance.py +0 -0
  87. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/fundamental/non_financial.py +0 -0
  88. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/fundamental/other_financial.py +0 -0
  89. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/fundamental/security.py +0 -0
  90. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/indices.py +0 -0
  91. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/namespace.py +0 -0
  92. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/profile.py +0 -0
  93. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/fund/__init__.py +0 -0
  94. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/fund/announcement.py +0 -0
  95. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/fund/asset_combination.py +0 -0
  96. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/fund/asset_industry_combination.py +0 -0
  97. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/fund/candlestick.py +0 -0
  98. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/fund/fund.py +0 -0
  99. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/fund/profile.py +0 -0
  100. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/fund/shareholdings.py +0 -0
  101. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/index/__init__.py +0 -0
  102. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/index/candlestick.py +0 -0
  103. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/index/constituent_weightings.py +0 -0
  104. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/index/constituents.py +0 -0
  105. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/index/drawdown.py +0 -0
  106. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/index/fundamental.py +0 -0
  107. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/index/index.py +0 -0
  108. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/index/namespace.py +0 -0
  109. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/index/tracking_fund.py +0 -0
  110. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/client.py +0 -0
  111. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/config.py +0 -0
  112. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/exceptions.py +0 -0
  113. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/__init__.py +0 -0
  114. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/__init__.py +0 -0
  115. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/company/__init__.py +0 -0
  116. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/company/announcement.py +0 -0
  117. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/company/candlestick.py +0 -0
  118. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/company/company.py +0 -0
  119. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/company/equity_change.py +0 -0
  120. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/company/fs/__init__.py +0 -0
  121. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/company/fs/non_financial.py +0 -0
  122. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/company/fundamental/__init__.py +0 -0
  123. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/company/fundamental/bank.py +0 -0
  124. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/company/fundamental/insurance.py +0 -0
  125. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/company/fundamental/non_financial.py +0 -0
  126. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/company/fundamental/other_financial.py +0 -0
  127. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/company/fundamental/security.py +0 -0
  128. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/company/indices.py +0 -0
  129. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/fund/__init__.py +0 -0
  130. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/fund/announcement.py +0 -0
  131. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/fund/asset_combination.py +0 -0
  132. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/fund/asset_industry_combination.py +0 -0
  133. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/fund/candlestick.py +0 -0
  134. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/fund/fund.py +0 -0
  135. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/fund/profile.py +0 -0
  136. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/fund/shareholdings.py +0 -0
  137. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/index/__init__.py +0 -0
  138. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/index/candlestick.py +0 -0
  139. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/index/constituent_weightings.py +0 -0
  140. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/index/constituents.py +0 -0
  141. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/index/drawdown.py +0 -0
  142. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/index/fundamental.py +0 -0
  143. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/index/index.py +0 -0
  144. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/index/tracking_fund.py +0 -0
  145. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/py.typed +0 -0
  146. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/utils/__init__.py +0 -0
  147. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/utils/api.py +0 -0
  148. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/utils/dataframe.py +0 -0
  149. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/utils/dict.py +0 -0
  150. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/utils/rate_limiter.py +0 -0
  151. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/utils/retry.py +0 -0
  152. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/mkdocs.yml +0 -0
  153. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/mypy.ini +0 -0
  154. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/scripts/explore_api.py +0 -0
  155. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/scripts/generate_docs.py +0 -0
  156. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/scripts/publish.sh +0 -0
  157. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/api/cn/company/test_announcement.py +0 -0
  158. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/api/cn/index/test_constituents.py +0 -0
  159. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/conftest.py +0 -0
  160. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_candlestick.py +0 -0
  161. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_client.py +0 -0
  162. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_cn_index_candlestick.py +0 -0
  163. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_cn_index_constituent_weightings.py +0 -0
  164. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_company.py +0 -0
  165. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_company_profile.py +0 -0
  166. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_equity_change.py +0 -0
  167. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_fund.py +0 -0
  168. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_fund_announcement.py +0 -0
  169. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_fund_asset_combination.py +0 -0
  170. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_fund_asset_industry_combination.py +0 -0
  171. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_fund_candlestick.py +0 -0
  172. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_fund_profile.py +0 -0
  173. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_fund_shareholdings.py +0 -0
  174. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_fundamental.py +0 -0
  175. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_fundamental_bank.py +0 -0
  176. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_fundamental_security.py +0 -0
  177. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_index.py +0 -0
  178. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_index_constituents.py +0 -0
  179. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_index_drawdown.py +0 -0
  180. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_index_fundamental.py +0 -0
  181. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_indices.py +0 -0
  182. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_integration.py +0 -0
  183. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_non_financial_statements.py +0 -0
  184. {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_tracking_fund.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lixinger-python
3
- Version: 0.3.2
3
+ Version: 0.3.3
4
4
  Summary: Python SDK for Lixinger Financial Data API
5
5
  Project-URL: Homepage, https://www.lixinger.com
6
6
  Project-URL: Documentation, https://www.lixinger.com/open/api/doc
@@ -0,0 +1,20 @@
1
+ import asyncio
2
+
3
+ from lixinger import AsyncLixingerClient
4
+
5
+
6
+ async def main():
7
+ # Method 1: Using the async client with environment variables
8
+ # The API key is ALWAYS loaded from .env file (LIXINGER_API_KEY)
9
+ print("Method 1: Using async client (loads API key from .env)...")
10
+ client = AsyncLixingerClient()
11
+ try:
12
+ print("Fetching company information using client...")
13
+ df = await client.company.dividend.get_dividend(stock_code="000001", start_date="2026-03-01")
14
+ print(df)
15
+ finally:
16
+ await client.close()
17
+
18
+
19
+ if __name__ == "__main__":
20
+ asyncio.run(main())
@@ -22,6 +22,7 @@ class Dividend(pa.DataFrameModel):
22
22
  ex_date: 除权除息日
23
23
  payment_date: 分红到账日
24
24
  fs_end_date: 财报时间
25
+ status: 状态(board_director_plan/shareholders_meeting_plan/company_plan/delay_implementation/cancelled/implemented/terminated/plan)
25
26
  stock_code: 股票代码(由SDK添加)
26
27
 
27
28
  """
@@ -43,6 +44,7 @@ class Dividend(pa.DataFrameModel):
43
44
 
44
45
  # 可选字段
45
46
  content: pa.typing.Series[str] | None = pa.Field(nullable=True)
47
+ status: pa.typing.Series[str] | None = pa.Field(nullable=True)
46
48
  register_date: pa.typing.Series[pa.typing.DateTime] | None = pa.Field(nullable=True)
47
49
  ex_date: pa.typing.Series[pa.typing.DateTime] | None = pa.Field(nullable=True)
48
50
  payment_date: pa.typing.Series[pa.typing.DateTime] | None = pa.Field(nullable=True)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "lixinger-python"
3
- version = "0.3.2"
3
+ version = "0.3.3"
4
4
  description = "Python SDK for Lixinger Financial Data API"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -121,7 +121,7 @@ async def test_get_dividend_with_optional_fields_missing():
121
121
  "bonusSharesFromCapitalReserve": 0,
122
122
  "dividend": 1.5,
123
123
  # Optional fields missing: content, registerDate, exDate, paymentDate,
124
- # dividendAmount, annualNetProfit, annualNetProfitDividendRatio
124
+ # dividendAmount, annualNetProfit, annualNetProfitDividendRatio, status
125
125
  }
126
126
  ],
127
127
  }
@@ -141,3 +141,130 @@ async def test_get_dividend_with_optional_fields_missing():
141
141
  assert "content" not in df.columns
142
142
  assert "annual_net_profit" not in df.columns
143
143
  assert "annual_net_profit_dividend_ratio" not in df.columns
144
+ assert "status" not in df.columns
145
+
146
+
147
+ @pytest.mark.asyncio
148
+ async def test_get_dividend_with_status_field():
149
+ """Test that status field is properly handled when present."""
150
+ mock_response = {
151
+ "code": 1,
152
+ "message": "success",
153
+ "data": [
154
+ {
155
+ "date": "2023-03-25T00:00:00+08:00",
156
+ "fsEndDate": "2022-12-31T00:00:00+08:00",
157
+ "currency": "CNY",
158
+ "bonusSharesFromProfit": 0,
159
+ "bonusSharesFromCapitalReserve": 0,
160
+ "dividend": 1.738,
161
+ "status": "implemented",
162
+ }
163
+ ],
164
+ }
165
+
166
+ with patch("httpx.AsyncClient.request") as mock_request:
167
+ mock_request.return_value = Mock()
168
+ mock_request.return_value.status_code = 200
169
+ mock_request.return_value.json.return_value = mock_response
170
+
171
+ df = await get_dividend(stock_code="600036", start_date="2023-01-01")
172
+
173
+ assert isinstance(df, pd.DataFrame)
174
+ assert len(df) == 1
175
+ assert df.iloc[0]["status"] == "implemented"
176
+
177
+
178
+ @pytest.mark.asyncio
179
+ @pytest.mark.parametrize(
180
+ "status_value",
181
+ [
182
+ "board_director_plan", # 董事会预案
183
+ "shareholders_meeting_plan", # 股东大会预案
184
+ "company_plan", # 公司预案
185
+ "delay_implementation", # 延迟实施
186
+ "cancelled", # 取消分红
187
+ "implemented", # 已执行
188
+ "terminated", # 终止
189
+ "plan", # 预案
190
+ ],
191
+ )
192
+ async def test_get_dividend_with_all_status_values(status_value: str):
193
+ """Test all possible status values from the API documentation."""
194
+ mock_response = {
195
+ "code": 1,
196
+ "message": "success",
197
+ "data": [
198
+ {
199
+ "date": "2023-03-25T00:00:00+08:00",
200
+ "fsEndDate": "2022-12-31T00:00:00+08:00",
201
+ "currency": "CNY",
202
+ "bonusSharesFromProfit": 0,
203
+ "bonusSharesFromCapitalReserve": 0,
204
+ "dividend": 1.5,
205
+ "status": status_value,
206
+ }
207
+ ],
208
+ }
209
+
210
+ with patch("httpx.AsyncClient.request") as mock_request:
211
+ mock_request.return_value = Mock()
212
+ mock_request.return_value.status_code = 200
213
+ mock_request.return_value.json.return_value = mock_response
214
+
215
+ df = await get_dividend(stock_code="600036", start_date="2023-01-01")
216
+
217
+ assert isinstance(df, pd.DataFrame)
218
+ assert len(df) == 1
219
+ assert df.iloc[0]["status"] == status_value
220
+
221
+
222
+ @pytest.mark.asyncio
223
+ async def test_get_dividend_with_multiple_status_values():
224
+ """Test multiple dividend records with different status values."""
225
+ mock_response = {
226
+ "code": 1,
227
+ "message": "success",
228
+ "data": [
229
+ {
230
+ "date": "2023-03-25T00:00:00+08:00",
231
+ "fsEndDate": "2022-12-31T00:00:00+08:00",
232
+ "currency": "CNY",
233
+ "bonusSharesFromProfit": 0,
234
+ "bonusSharesFromCapitalReserve": 0,
235
+ "dividend": 1.738,
236
+ "status": "implemented",
237
+ },
238
+ {
239
+ "date": "2024-03-20T00:00:00+08:00",
240
+ "fsEndDate": "2023-12-31T00:00:00+08:00",
241
+ "currency": "CNY",
242
+ "bonusSharesFromProfit": 0,
243
+ "bonusSharesFromCapitalReserve": 0,
244
+ "dividend": 1.8,
245
+ "status": "board_director_plan",
246
+ },
247
+ {
248
+ "date": "2024-04-15T00:00:00+08:00",
249
+ "fsEndDate": "2023-12-31T00:00:00+08:00",
250
+ "currency": "CNY",
251
+ "bonusSharesFromProfit": 0,
252
+ "bonusSharesFromCapitalReserve": 0,
253
+ "dividend": 1.8,
254
+ "status": "shareholders_meeting_plan",
255
+ },
256
+ ],
257
+ }
258
+
259
+ with patch("httpx.AsyncClient.request") as mock_request:
260
+ mock_request.return_value = Mock()
261
+ mock_request.return_value.status_code = 200
262
+ mock_request.return_value.json.return_value = mock_response
263
+
264
+ df = await get_dividend(stock_code="600036", start_date="2023-01-01")
265
+
266
+ assert isinstance(df, pd.DataFrame)
267
+ assert len(df) == 3
268
+ assert df.iloc[0]["status"] == "implemented"
269
+ assert df.iloc[1]["status"] == "board_director_plan"
270
+ assert df.iloc[2]["status"] == "shareholders_meeting_plan"
@@ -629,7 +629,7 @@ wheels = [
629
629
 
630
630
  [[package]]
631
631
  name = "lixinger-python"
632
- version = "0.3.2"
632
+ version = "0.3.3"
633
633
  source = { editable = "." }
634
634
  dependencies = [
635
635
  { name = "httpx", extra = ["socks"] },
File without changes
File without changes