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.
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/PKG-INFO +1 -1
- lixinger_python-0.3.3/examples/dividend_example.py +20 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/company/dividend.py +2 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/pyproject.toml +1 -1
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/api/cn/company/test_dividend.py +128 -1
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/uv.lock +1 -1
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/.claude/settings.local.json +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/.env.example +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/.github/copilot-instructions.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/.github/workflows/README.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/.github/workflows/pr-checks.yml +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/.gitignore +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/.pre-commit-config.yaml +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/.python-version +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/.ruff.toml +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/ADD_NEW_API_QUICK.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/AGENTS.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/CHANGELOG.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/CLAUDE.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/DOCS.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/LICENSE +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/MANIFEST.in +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/PUBLISHING.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/README.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/SETUP.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/codecov.yml +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/client.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/company/announcement.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/company/candlestick.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/company/company.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/company/dividend.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/company/equity_change.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/company/fs/non_financial.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/company/fundamental/bank.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/company/fundamental/insurance.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/company/fundamental/non_financial.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/company/fundamental/other_financial.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/company/fundamental/security.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/company/indices.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/company/profile.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/fund/announcement.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/fund/asset_combination.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/fund/asset_industry_combination.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/fund/candlestick.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/fund/fund.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/fund/profile.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/fund/shareholdings.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/index/candlestick.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/index/constituent_weightings.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/index/constituents.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/index/drawdown.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/index/fundamental.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/index/index.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/index/tracking_fund.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/overview.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/development/code-style.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/development/contributing.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/development/testing.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/examples/company.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/examples/fund.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/examples/index.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/getting-started/configuration.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/getting-started/installation.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/getting-started/quickstart.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/index.md +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/examples/company_example.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/examples/company_profile_example.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/examples/index_constituent_weightings_example.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/examples/index_constituents_example.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/examples/index_info_example.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/fund_response.json +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/__init__.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/__init__.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/base.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/__init__.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/__init__.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/announcement.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/candlestick.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/company.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/dividend.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/equity_change.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/fs/__init__.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/fs/non_financial.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/fundamental/__init__.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/fundamental/bank.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/fundamental/insurance.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/fundamental/non_financial.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/fundamental/other_financial.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/fundamental/security.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/indices.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/namespace.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/profile.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/fund/__init__.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/fund/announcement.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/fund/asset_combination.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/fund/asset_industry_combination.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/fund/candlestick.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/fund/fund.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/fund/profile.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/fund/shareholdings.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/index/__init__.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/index/candlestick.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/index/constituent_weightings.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/index/constituents.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/index/drawdown.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/index/fundamental.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/index/index.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/index/namespace.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/index/tracking_fund.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/client.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/config.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/exceptions.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/__init__.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/__init__.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/company/__init__.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/company/announcement.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/company/candlestick.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/company/company.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/company/equity_change.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/company/fs/__init__.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/company/fs/non_financial.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/company/fundamental/__init__.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/company/fundamental/bank.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/company/fundamental/insurance.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/company/fundamental/non_financial.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/company/fundamental/other_financial.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/company/fundamental/security.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/company/indices.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/fund/__init__.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/fund/announcement.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/fund/asset_combination.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/fund/asset_industry_combination.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/fund/candlestick.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/fund/fund.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/fund/profile.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/fund/shareholdings.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/index/__init__.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/index/candlestick.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/index/constituent_weightings.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/index/constituents.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/index/drawdown.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/index/fundamental.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/index/index.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/index/tracking_fund.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/py.typed +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/utils/__init__.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/utils/api.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/utils/dataframe.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/utils/dict.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/utils/rate_limiter.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/utils/retry.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/mkdocs.yml +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/mypy.ini +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/scripts/explore_api.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/scripts/generate_docs.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/scripts/publish.sh +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/api/cn/company/test_announcement.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/api/cn/index/test_constituents.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/conftest.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_candlestick.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_client.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_cn_index_candlestick.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_cn_index_constituent_weightings.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_company.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_company_profile.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_equity_change.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_fund.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_fund_announcement.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_fund_asset_combination.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_fund_asset_industry_combination.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_fund_candlestick.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_fund_profile.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_fund_shareholdings.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_fundamental.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_fundamental_bank.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_fundamental_security.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_index.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_index_constituents.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_index_drawdown.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_index_fundamental.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_indices.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_integration.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_non_financial_statements.py +0 -0
- {lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_tracking_fund.py +0 -0
|
@@ -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)
|
|
@@ -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"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/company/fundamental/non_financial.md
RENAMED
|
File without changes
|
{lixinger_python-0.3.2 → lixinger_python-0.3.3}/docs/api/company/fundamental/other_financial.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lixinger_python-0.3.2 → lixinger_python-0.3.3}/examples/index_constituent_weightings_example.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/fundamental/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/fundamental/insurance.py
RENAMED
|
File without changes
|
{lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/fundamental/non_financial.py
RENAMED
|
File without changes
|
|
File without changes
|
{lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/company/fundamental/security.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/fund/asset_industry_combination.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/api/cn/index/constituent_weightings.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/company/fs/non_financial.py
RENAMED
|
File without changes
|
{lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/company/fundamental/__init__.py
RENAMED
|
File without changes
|
{lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/company/fundamental/bank.py
RENAMED
|
File without changes
|
{lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/company/fundamental/insurance.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/company/fundamental/security.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/fund/asset_combination.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lixinger_python-0.3.2 → lixinger_python-0.3.3}/lixinger/models/cn/index/constituent_weightings.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_cn_index_constituent_weightings.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lixinger_python-0.3.2 → lixinger_python-0.3.3}/tests/test_fund_asset_industry_combination.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|