cas-parser-python 1.0.2__tar.gz → 1.2.0__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 (82) hide show
  1. cas_parser_python-1.2.0/.release-please-manifest.json +3 -0
  2. cas_parser_python-1.2.0/CHANGELOG.md +86 -0
  3. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/LICENSE +1 -1
  4. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/PKG-INFO +17 -7
  5. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/README.md +13 -3
  6. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/api.md +0 -12
  7. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/pyproject.toml +70 -13
  8. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/requirements-dev.lock +65 -51
  9. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/requirements.lock +23 -19
  10. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/src/cas_parser/__init__.py +3 -1
  11. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/src/cas_parser/_base_client.py +157 -25
  12. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/src/cas_parser/_client.py +75 -35
  13. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/src/cas_parser/_compat.py +51 -51
  14. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/src/cas_parser/_models.py +102 -59
  15. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/src/cas_parser/_qs.py +7 -7
  16. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/src/cas_parser/_streaming.py +12 -12
  17. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/src/cas_parser/_types.py +63 -12
  18. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/src/cas_parser/_utils/__init__.py +9 -2
  19. cas_parser_python-1.2.0/src/cas_parser/_utils/_compat.py +45 -0
  20. cas_parser_python-1.2.0/src/cas_parser/_utils/_datetime_parse.py +136 -0
  21. cas_parser_python-1.2.0/src/cas_parser/_utils/_json.py +35 -0
  22. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/src/cas_parser/_utils/_sync.py +3 -31
  23. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/src/cas_parser/_utils/_transform.py +13 -3
  24. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/src/cas_parser/_utils/_typing.py +6 -1
  25. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/src/cas_parser/_utils/_utils.py +5 -6
  26. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/src/cas_parser/_version.py +1 -1
  27. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/src/cas_parser/resources/__init__.py +0 -14
  28. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/src/cas_parser/resources/cas_parser.py +49 -49
  29. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/src/cas_parser/types/__init__.py +0 -2
  30. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/src/cas_parser/types/cas_parser_cams_kfintech_params.py +2 -2
  31. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/src/cas_parser/types/cas_parser_cdsl_params.py +2 -2
  32. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/src/cas_parser/types/cas_parser_nsdl_params.py +2 -2
  33. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/src/cas_parser/types/cas_parser_smart_parse_params.py +2 -2
  34. cas_parser_python-1.2.0/src/cas_parser/types/unified_response.py +1084 -0
  35. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/tests/test_client.py +389 -213
  36. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/tests/test_models.py +28 -28
  37. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/tests/test_transform.py +17 -10
  38. cas_parser_python-1.2.0/tests/test_utils/test_datetime_parse.py +110 -0
  39. cas_parser_python-1.2.0/tests/test_utils/test_json.py +126 -0
  40. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/tests/utils.py +13 -5
  41. cas_parser_python-1.0.2/.release-please-manifest.json +0 -3
  42. cas_parser_python-1.0.2/CHANGELOG.md +0 -39
  43. cas_parser_python-1.0.2/mypy.ini +0 -50
  44. cas_parser_python-1.0.2/src/cas_parser/resources/cas_generator.py +0 -225
  45. cas_parser_python-1.0.2/src/cas_parser/types/cas_generator_generate_cas_params.py +0 -30
  46. cas_parser_python-1.0.2/src/cas_parser/types/cas_generator_generate_cas_response.py +0 -13
  47. cas_parser_python-1.0.2/src/cas_parser/types/unified_response.py +0 -432
  48. cas_parser_python-1.0.2/tests/api_resources/test_cas_generator.py +0 -136
  49. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/.gitignore +0 -0
  50. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/CONTRIBUTING.md +0 -0
  51. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/SECURITY.md +0 -0
  52. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/bin/check-release-environment +0 -0
  53. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/bin/publish-pypi +0 -0
  54. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/examples/.keep +0 -0
  55. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/noxfile.py +0 -0
  56. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/release-please-config.json +0 -0
  57. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/src/cas_parser/_constants.py +0 -0
  58. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/src/cas_parser/_exceptions.py +0 -0
  59. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/src/cas_parser/_files.py +0 -0
  60. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/src/cas_parser/_resource.py +0 -0
  61. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/src/cas_parser/_response.py +0 -0
  62. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/src/cas_parser/_utils/_logs.py +0 -0
  63. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/src/cas_parser/_utils/_proxy.py +0 -0
  64. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/src/cas_parser/_utils/_reflection.py +0 -0
  65. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/src/cas_parser/_utils/_resources_proxy.py +0 -0
  66. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/src/cas_parser/_utils/_streams.py +0 -0
  67. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/src/cas_parser/lib/.keep +0 -0
  68. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/src/cas_parser/py.typed +0 -0
  69. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/tests/__init__.py +0 -0
  70. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/tests/api_resources/__init__.py +0 -0
  71. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/tests/api_resources/test_cas_parser.py +0 -0
  72. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/tests/conftest.py +0 -0
  73. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/tests/sample_file.txt +0 -0
  74. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/tests/test_deepcopy.py +0 -0
  75. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/tests/test_extract_files.py +0 -0
  76. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/tests/test_files.py +0 -0
  77. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/tests/test_qs.py +0 -0
  78. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/tests/test_required_args.py +0 -0
  79. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/tests/test_response.py +0 -0
  80. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/tests/test_streaming.py +0 -0
  81. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/tests/test_utils/test_proxy.py +0 -0
  82. {cas_parser_python-1.0.2 → cas_parser_python-1.2.0}/tests/test_utils/test_typing.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "1.2.0"
3
+ }
@@ -0,0 +1,86 @@
1
+ # Changelog
2
+
3
+ ## 1.2.0 (2026-02-03)
4
+
5
+ Full Changelog: [v1.1.0...v1.2.0](https://github.com/CASParser/cas-parser-python/compare/v1.1.0...v1.2.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([bce15d3](https://github.com/CASParser/cas-parser-python/commit/bce15d3f55a18db8d0c6447b6537fbdf831a5816))
10
+ * **api:** api update ([c265056](https://github.com/CASParser/cas-parser-python/commit/c265056c6b8f5b346172d89e9da82315976dc44f))
11
+ * **api:** api update ([93a9613](https://github.com/CASParser/cas-parser-python/commit/93a9613c79ec70869cf11dd0b9bac0a8c6194a31))
12
+ * **api:** api update ([bd6977a](https://github.com/CASParser/cas-parser-python/commit/bd6977a8a78c4a1633e4e6a1dc1d3335b1aa6611))
13
+ * **api:** api update ([3fda81d](https://github.com/CASParser/cas-parser-python/commit/3fda81deb938a9b689cbb04f839e3b815259a9c5))
14
+ * **api:** api update ([f1838dc](https://github.com/CASParser/cas-parser-python/commit/f1838dcb901635626cc87cb55dfaa4ef33ba5092))
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **client:** close streams without requiring full consumption ([7090ef5](https://github.com/CASParser/cas-parser-python/commit/7090ef51af296fa6d6be8af8137543ef2023cbd7))
20
+
21
+
22
+ ### Chores
23
+
24
+ * bump `httpx-aiohttp` version to 0.1.9 ([e1b65fb](https://github.com/CASParser/cas-parser-python/commit/e1b65fb2bd146a68ef50438899406ae2fb6178c3))
25
+ * do not install brew dependencies in ./scripts/bootstrap by default ([35b17eb](https://github.com/CASParser/cas-parser-python/commit/35b17eb26264ab66e24b074bcb1790f6c33b7b9c))
26
+ * **internal/tests:** avoid race condition with implicit client cleanup ([2a58fc0](https://github.com/CASParser/cas-parser-python/commit/2a58fc0e260b52ee314ac6d14676b2140711bd0b))
27
+ * **internal:** codegen related update ([8e6c5b2](https://github.com/CASParser/cas-parser-python/commit/8e6c5b210e14602af113fa9fef5c789d6238419a))
28
+ * **internal:** codegen related update ([20bcea0](https://github.com/CASParser/cas-parser-python/commit/20bcea057ce1974149394c899581ed31ffb56a4a))
29
+ * **internal:** detect missing future annotations with ruff ([8c35489](https://github.com/CASParser/cas-parser-python/commit/8c354893c00887af1da9c197dc21dd4d6f0033af))
30
+ * **internal:** grammar fix (it's -> its) ([d2d29bc](https://github.com/CASParser/cas-parser-python/commit/d2d29bcc46989573e27c2178785c6b38df65bd90))
31
+ * **internal:** update pydantic dependency ([1c3104b](https://github.com/CASParser/cas-parser-python/commit/1c3104b27350f4c906973bb56f89d5a16f55d35e))
32
+ * **types:** change optional parameter type from NotGiven to Omit ([e739e12](https://github.com/CASParser/cas-parser-python/commit/e739e12ade4f91e52f0285c866354e970195aacf))
33
+
34
+ ## 1.1.0 (2025-09-06)
35
+
36
+ Full Changelog: [v1.0.2...v1.1.0](https://github.com/CASParser/cas-parser-python/compare/v1.0.2...v1.1.0)
37
+
38
+ ### Features
39
+
40
+ * improve future compat with pydantic v3 ([39d5f4a](https://github.com/CASParser/cas-parser-python/commit/39d5f4a6f631f01627f9e0ad3846431b2f36410d))
41
+ * **types:** replace List[str] with SequenceNotStr in params ([ffdac79](https://github.com/CASParser/cas-parser-python/commit/ffdac79d2ac8394afc09f540c6b89c01675946d9))
42
+
43
+
44
+ ### Chores
45
+
46
+ * **internal:** add Sequence related utils ([cffd684](https://github.com/CASParser/cas-parser-python/commit/cffd6844655dfe7f52a1c85140dc4ab2a370e8f7))
47
+ * **internal:** move mypy configurations to `pyproject.toml` file ([2f7e6bc](https://github.com/CASParser/cas-parser-python/commit/2f7e6bccf82f65c0b753a909654ba1ee7cc61157))
48
+ * **tests:** simplify `get_platform` test ([7c54665](https://github.com/CASParser/cas-parser-python/commit/7c546655385360b8ba97e20e79fbdedb43af07d5))
49
+
50
+ ## 1.0.2 (2025-08-27)
51
+
52
+ Full Changelog: [v1.0.1...v1.0.2](https://github.com/CASParser/cas-parser-python/compare/v1.0.1...v1.0.2)
53
+
54
+ ### Bug Fixes
55
+
56
+ * avoid newer type syntax ([2ad1ea6](https://github.com/CASParser/cas-parser-python/commit/2ad1ea633d5c9d69de09045f97968aa961ccc6f3))
57
+
58
+
59
+ ### Chores
60
+
61
+ * **internal:** change ci workflow machines ([f38494c](https://github.com/CASParser/cas-parser-python/commit/f38494c9f9f0df5069d8dd1ff23728a47f0e934c))
62
+ * **internal:** update pyright exclude list ([d3f9237](https://github.com/CASParser/cas-parser-python/commit/d3f9237f030f0087d0f92741836aa8674d9b5287))
63
+ * update github action ([83a551a](https://github.com/CASParser/cas-parser-python/commit/83a551a025d281efa4edaa89a9e4daed0f8aaa8e))
64
+
65
+ ## 1.0.1 (2025-08-18)
66
+
67
+ Full Changelog: [v1.0.0...v1.0.1](https://github.com/CASParser/cas-parser-python/compare/v1.0.0...v1.0.1)
68
+
69
+ ### Chores
70
+
71
+ * update SDK settings ([83e97ee](https://github.com/CASParser/cas-parser-python/commit/83e97eef5fe5c02d181c8eeea271f661cd4b8830))
72
+
73
+ ## 1.0.0 (2025-08-18)
74
+
75
+ Full Changelog: [v0.0.1...v1.0.0](https://github.com/CASParser/cas-parser-python/compare/v0.0.1...v1.0.0)
76
+
77
+ ### Features
78
+
79
+ * **api:** manual updates ([635bd26](https://github.com/CASParser/cas-parser-python/commit/635bd26431623f00d3af06a3256c2b7085c83487))
80
+
81
+
82
+ ### Chores
83
+
84
+ * configure new SDK language ([5748dab](https://github.com/CASParser/cas-parser-python/commit/5748dab8b8241dc537456d9b8c1dae3c0e4a5d5a))
85
+ * update SDK settings ([13b5c47](https://github.com/CASParser/cas-parser-python/commit/13b5c470a31ac72d95078236e0e16b76e753939e))
86
+ * update SDK settings ([25126eb](https://github.com/CASParser/cas-parser-python/commit/25126eb2330f0e84bd4dd9e814e6a2e5b2ebbddc))
@@ -186,7 +186,7 @@
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright 2025 Cas Parser
189
+ Copyright 2026 Cas Parser
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: cas-parser-python
3
- Version: 1.0.2
3
+ Version: 1.2.0
4
4
  Summary: The official Python library for the CAS Parser API
5
5
  Project-URL: Homepage, https://github.com/CASParser/cas-parser-python
6
6
  Project-URL: Repository, https://github.com/CASParser/cas-parser-python
@@ -13,15 +13,15 @@ Classifier: Operating System :: Microsoft :: Windows
13
13
  Classifier: Operating System :: OS Independent
14
14
  Classifier: Operating System :: POSIX
15
15
  Classifier: Operating System :: POSIX :: Linux
16
- Classifier: Programming Language :: Python :: 3.8
17
16
  Classifier: Programming Language :: Python :: 3.9
18
17
  Classifier: Programming Language :: Python :: 3.10
19
18
  Classifier: Programming Language :: Python :: 3.11
20
19
  Classifier: Programming Language :: Python :: 3.12
21
20
  Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Programming Language :: Python :: 3.14
22
22
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
23
23
  Classifier: Typing :: Typed
24
- Requires-Python: >=3.8
24
+ Requires-Python: >=3.9
25
25
  Requires-Dist: anyio<5,>=3.5.0
26
26
  Requires-Dist: distro<2,>=1.7.0
27
27
  Requires-Dist: httpx<1,>=0.23.0
@@ -30,7 +30,7 @@ Requires-Dist: sniffio
30
30
  Requires-Dist: typing-extensions<5,>=4.10
31
31
  Provides-Extra: aiohttp
32
32
  Requires-Dist: aiohttp; extra == 'aiohttp'
33
- Requires-Dist: httpx-aiohttp>=0.1.8; extra == 'aiohttp'
33
+ Requires-Dist: httpx-aiohttp>=0.1.9; extra == 'aiohttp'
34
34
  Description-Content-Type: text/markdown
35
35
 
36
36
  # Cas Parser Python API library
@@ -38,12 +38,21 @@ Description-Content-Type: text/markdown
38
38
  <!-- prettier-ignore -->
39
39
  [![PyPI version](https://img.shields.io/pypi/v/cas-parser-python.svg?label=pypi%20(stable))](https://pypi.org/project/cas-parser-python/)
40
40
 
41
- The Cas Parser Python library provides convenient access to the Cas Parser REST API from any Python 3.8+
41
+ The Cas Parser Python library provides convenient access to the Cas Parser REST API from any Python 3.9+
42
42
  application. The library includes type definitions for all request params and response fields,
43
43
  and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).
44
44
 
45
45
  It is generated with [Stainless](https://www.stainless.com/).
46
46
 
47
+ ## MCP Server
48
+
49
+ Use the Cas Parser MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
50
+
51
+ [![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=cas-parser-node-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImNhcy1wYXJzZXItbm9kZS1tY3AiXSwiZW52Ijp7IkNBU19QQVJTRVJfQVBJX0tFWSI6Ik15IEFQSSBLZXkifX0)
52
+ [![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22cas-parser-node-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22cas-parser-node-mcp%22%5D%2C%22env%22%3A%7B%22CAS_PARSER_API_KEY%22%3A%22My%20API%20Key%22%7D%7D)
53
+
54
+ > Note: You may need to set environment variables in your MCP client.
55
+
47
56
  ## Documentation
48
57
 
49
58
  The REST API documentation can be found on [docs.casparser.in](https://docs.casparser.in/reference). The full API of this library can be found in [api.md](https://github.com/CASParser/cas-parser-python/tree/main/api.md).
@@ -120,6 +129,7 @@ pip install cas-parser-python[aiohttp]
120
129
  Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
121
130
 
122
131
  ```python
132
+ import os
123
133
  import asyncio
124
134
  from cas_parser import DefaultAioHttpClient
125
135
  from cas_parser import AsyncCasParser
@@ -127,7 +137,7 @@ from cas_parser import AsyncCasParser
127
137
 
128
138
  async def main() -> None:
129
139
  async with AsyncCasParser(
130
- api_key="My API Key",
140
+ api_key=os.environ.get("CAS_PARSER_API_KEY"), # This is the default and can be omitted
131
141
  http_client=DefaultAioHttpClient(),
132
142
  ) as client:
133
143
  unified_response = await client.cas_parser.smart_parse(
@@ -415,7 +425,7 @@ print(cas_parser.__version__)
415
425
 
416
426
  ## Requirements
417
427
 
418
- Python 3.8 or higher.
428
+ Python 3.9 or higher.
419
429
 
420
430
  ## Contributing
421
431
 
@@ -3,12 +3,21 @@
3
3
  <!-- prettier-ignore -->
4
4
  [![PyPI version](https://img.shields.io/pypi/v/cas-parser-python.svg?label=pypi%20(stable))](https://pypi.org/project/cas-parser-python/)
5
5
 
6
- The Cas Parser Python library provides convenient access to the Cas Parser REST API from any Python 3.8+
6
+ The Cas Parser Python library provides convenient access to the Cas Parser REST API from any Python 3.9+
7
7
  application. The library includes type definitions for all request params and response fields,
8
8
  and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).
9
9
 
10
10
  It is generated with [Stainless](https://www.stainless.com/).
11
11
 
12
+ ## MCP Server
13
+
14
+ Use the Cas Parser MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
15
+
16
+ [![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=cas-parser-node-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImNhcy1wYXJzZXItbm9kZS1tY3AiXSwiZW52Ijp7IkNBU19QQVJTRVJfQVBJX0tFWSI6Ik15IEFQSSBLZXkifX0)
17
+ [![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22cas-parser-node-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22cas-parser-node-mcp%22%5D%2C%22env%22%3A%7B%22CAS_PARSER_API_KEY%22%3A%22My%20API%20Key%22%7D%7D)
18
+
19
+ > Note: You may need to set environment variables in your MCP client.
20
+
12
21
  ## Documentation
13
22
 
14
23
  The REST API documentation can be found on [docs.casparser.in](https://docs.casparser.in/reference). The full API of this library can be found in [api.md](api.md).
@@ -85,6 +94,7 @@ pip install cas-parser-python[aiohttp]
85
94
  Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
86
95
 
87
96
  ```python
97
+ import os
88
98
  import asyncio
89
99
  from cas_parser import DefaultAioHttpClient
90
100
  from cas_parser import AsyncCasParser
@@ -92,7 +102,7 @@ from cas_parser import AsyncCasParser
92
102
 
93
103
  async def main() -> None:
94
104
  async with AsyncCasParser(
95
- api_key="My API Key",
105
+ api_key=os.environ.get("CAS_PARSER_API_KEY"), # This is the default and can be omitted
96
106
  http_client=DefaultAioHttpClient(),
97
107
  ) as client:
98
108
  unified_response = await client.cas_parser.smart_parse(
@@ -380,7 +390,7 @@ print(cas_parser.__version__)
380
390
 
381
391
  ## Requirements
382
392
 
383
- Python 3.8 or higher.
393
+ Python 3.9 or higher.
384
394
 
385
395
  ## Contributing
386
396
 
@@ -12,15 +12,3 @@ Methods:
12
12
  - <code title="post /v4/cdsl/parse">client.cas_parser.<a href="./src/cas_parser/resources/cas_parser.py">cdsl</a>(\*\*<a href="src/cas_parser/types/cas_parser_cdsl_params.py">params</a>) -> <a href="./src/cas_parser/types/unified_response.py">UnifiedResponse</a></code>
13
13
  - <code title="post /v4/nsdl/parse">client.cas_parser.<a href="./src/cas_parser/resources/cas_parser.py">nsdl</a>(\*\*<a href="src/cas_parser/types/cas_parser_nsdl_params.py">params</a>) -> <a href="./src/cas_parser/types/unified_response.py">UnifiedResponse</a></code>
14
14
  - <code title="post /v4/smart/parse">client.cas_parser.<a href="./src/cas_parser/resources/cas_parser.py">smart_parse</a>(\*\*<a href="src/cas_parser/types/cas_parser_smart_parse_params.py">params</a>) -> <a href="./src/cas_parser/types/unified_response.py">UnifiedResponse</a></code>
15
-
16
- # CasGenerator
17
-
18
- Types:
19
-
20
- ```python
21
- from cas_parser.types import CasGeneratorGenerateCasResponse
22
- ```
23
-
24
- Methods:
25
-
26
- - <code title="post /v4/generate">client.cas_generator.<a href="./src/cas_parser/resources/cas_generator.py">generate_cas</a>(\*\*<a href="src/cas_parser/types/cas_generator_generate_cas_params.py">params</a>) -> <a href="./src/cas_parser/types/cas_generator_generate_cas_response.py">CasGeneratorGenerateCasResponse</a></code>
@@ -1,30 +1,32 @@
1
1
  [project]
2
2
  name = "cas-parser-python"
3
- version = "1.0.2"
3
+ version = "1.2.0"
4
4
  description = "The official Python library for the CAS Parser API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
7
7
  authors = [
8
8
  { name = "Cas Parser", email = "sameer@casparser.in" },
9
9
  ]
10
+
10
11
  dependencies = [
11
- "httpx>=0.23.0, <1",
12
- "pydantic>=1.9.0, <3",
13
- "typing-extensions>=4.10, <5",
14
- "anyio>=3.5.0, <5",
15
- "distro>=1.7.0, <2",
16
- "sniffio",
12
+ "httpx>=0.23.0, <1",
13
+ "pydantic>=1.9.0, <3",
14
+ "typing-extensions>=4.10, <5",
15
+ "anyio>=3.5.0, <5",
16
+ "distro>=1.7.0, <2",
17
+ "sniffio",
17
18
  ]
18
- requires-python = ">= 3.8"
19
+
20
+ requires-python = ">= 3.9"
19
21
  classifiers = [
20
22
  "Typing :: Typed",
21
23
  "Intended Audience :: Developers",
22
- "Programming Language :: Python :: 3.8",
23
24
  "Programming Language :: Python :: 3.9",
24
25
  "Programming Language :: Python :: 3.10",
25
26
  "Programming Language :: Python :: 3.11",
26
27
  "Programming Language :: Python :: 3.12",
27
28
  "Programming Language :: Python :: 3.13",
29
+ "Programming Language :: Python :: 3.14",
28
30
  "Operating System :: OS Independent",
29
31
  "Operating System :: POSIX",
30
32
  "Operating System :: MacOS",
@@ -39,14 +41,14 @@ Homepage = "https://github.com/CASParser/cas-parser-python"
39
41
  Repository = "https://github.com/CASParser/cas-parser-python"
40
42
 
41
43
  [project.optional-dependencies]
42
- aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.8"]
44
+ aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.9"]
43
45
 
44
46
  [tool.rye]
45
47
  managed = true
46
48
  # version pins are in requirements-dev.lock
47
49
  dev-dependencies = [
48
50
  "pyright==1.1.399",
49
- "mypy",
51
+ "mypy==1.17",
50
52
  "respx",
51
53
  "pytest",
52
54
  "pytest-asyncio",
@@ -56,7 +58,6 @@ dev-dependencies = [
56
58
  "dirty-equals>=0.6.0",
57
59
  "importlib-metadata>=6.7.0",
58
60
  "rich>=13.7.1",
59
- "nest_asyncio==1.6.0",
60
61
  "pytest-xdist>=3.6.1",
61
62
  ]
62
63
 
@@ -142,7 +143,7 @@ filterwarnings = [
142
143
  # there are a couple of flags that are still disabled by
143
144
  # default in strict mode as they are experimental and niche.
144
145
  typeCheckingMode = "strict"
145
- pythonVersion = "3.8"
146
+ pythonVersion = "3.9"
146
147
 
147
148
  exclude = [
148
149
  "_dev",
@@ -157,6 +158,58 @@ reportOverlappingOverload = false
157
158
  reportImportCycles = false
158
159
  reportPrivateUsage = false
159
160
 
161
+ [tool.mypy]
162
+ pretty = true
163
+ show_error_codes = true
164
+
165
+ # Exclude _files.py because mypy isn't smart enough to apply
166
+ # the correct type narrowing and as this is an internal module
167
+ # it's fine to just use Pyright.
168
+ #
169
+ # We also exclude our `tests` as mypy doesn't always infer
170
+ # types correctly and Pyright will still catch any type errors.
171
+ exclude = ['src/cas_parser/_files.py', '_dev/.*.py', 'tests/.*']
172
+
173
+ strict_equality = true
174
+ implicit_reexport = true
175
+ check_untyped_defs = true
176
+ no_implicit_optional = true
177
+
178
+ warn_return_any = true
179
+ warn_unreachable = true
180
+ warn_unused_configs = true
181
+
182
+ # Turn these options off as it could cause conflicts
183
+ # with the Pyright options.
184
+ warn_unused_ignores = false
185
+ warn_redundant_casts = false
186
+
187
+ disallow_any_generics = true
188
+ disallow_untyped_defs = true
189
+ disallow_untyped_calls = true
190
+ disallow_subclassing_any = true
191
+ disallow_incomplete_defs = true
192
+ disallow_untyped_decorators = true
193
+ cache_fine_grained = true
194
+
195
+ # By default, mypy reports an error if you assign a value to the result
196
+ # of a function call that doesn't return anything. We do this in our test
197
+ # cases:
198
+ # ```
199
+ # result = ...
200
+ # assert result is None
201
+ # ```
202
+ # Changing this codegen to make mypy happy would increase complexity
203
+ # and would not be worth it.
204
+ disable_error_code = "func-returns-value,overload-cannot-match"
205
+
206
+ # https://github.com/python/mypy/issues/12162
207
+ [[tool.mypy.overrides]]
208
+ module = "black.files.*"
209
+ ignore_errors = true
210
+ ignore_missing_imports = true
211
+
212
+
160
213
  [tool.ruff]
161
214
  line-length = 120
162
215
  output-format = "grouped"
@@ -173,6 +226,8 @@ select = [
173
226
  "B",
174
227
  # remove unused imports
175
228
  "F401",
229
+ # check for missing future annotations
230
+ "FA102",
176
231
  # bare except statements
177
232
  "E722",
178
233
  # unused arguments
@@ -195,6 +250,8 @@ unfixable = [
195
250
  "T203",
196
251
  ]
197
252
 
253
+ extend-safe-fixes = ["FA102"]
254
+
198
255
  [tool.ruff.lint.flake8-tidy-imports.banned-api]
199
256
  "functools.lru_cache".msg = "This function does not retain type information for the wrapped function's arguments; The `lru_cache` function from `_utils` should be used instead"
200
257
 
@@ -12,40 +12,45 @@
12
12
  -e file:.
13
13
  aiohappyeyeballs==2.6.1
14
14
  # via aiohttp
15
- aiohttp==3.12.8
15
+ aiohttp==3.13.2
16
16
  # via cas-parser-python
17
17
  # via httpx-aiohttp
18
- aiosignal==1.3.2
18
+ aiosignal==1.4.0
19
19
  # via aiohttp
20
- annotated-types==0.6.0
20
+ annotated-types==0.7.0
21
21
  # via pydantic
22
- anyio==4.4.0
22
+ anyio==4.12.0
23
23
  # via cas-parser-python
24
24
  # via httpx
25
- argcomplete==3.1.2
25
+ argcomplete==3.6.3
26
26
  # via nox
27
27
  async-timeout==5.0.1
28
28
  # via aiohttp
29
- attrs==25.3.0
29
+ attrs==25.4.0
30
30
  # via aiohttp
31
- certifi==2023.7.22
31
+ # via nox
32
+ backports-asyncio-runner==1.2.0
33
+ # via pytest-asyncio
34
+ certifi==2025.11.12
32
35
  # via httpcore
33
36
  # via httpx
34
- colorlog==6.7.0
37
+ colorlog==6.10.1
38
+ # via nox
39
+ dependency-groups==1.3.1
35
40
  # via nox
36
- dirty-equals==0.6.0
37
- distlib==0.3.7
41
+ dirty-equals==0.11
42
+ distlib==0.4.0
38
43
  # via virtualenv
39
- distro==1.8.0
44
+ distro==1.9.0
40
45
  # via cas-parser-python
41
- exceptiongroup==1.2.2
46
+ exceptiongroup==1.3.1
42
47
  # via anyio
43
48
  # via pytest
44
- execnet==2.1.1
49
+ execnet==2.1.2
45
50
  # via pytest-xdist
46
- filelock==3.12.4
51
+ filelock==3.19.1
47
52
  # via virtualenv
48
- frozenlist==1.6.2
53
+ frozenlist==1.8.0
49
54
  # via aiohttp
50
55
  # via aiosignal
51
56
  h11==0.16.0
@@ -56,80 +61,89 @@ httpx==0.28.1
56
61
  # via cas-parser-python
57
62
  # via httpx-aiohttp
58
63
  # via respx
59
- httpx-aiohttp==0.1.8
64
+ httpx-aiohttp==0.1.9
60
65
  # via cas-parser-python
61
- idna==3.4
66
+ humanize==4.13.0
67
+ # via nox
68
+ idna==3.11
62
69
  # via anyio
63
70
  # via httpx
64
71
  # via yarl
65
- importlib-metadata==7.0.0
66
- iniconfig==2.0.0
72
+ importlib-metadata==8.7.0
73
+ iniconfig==2.1.0
67
74
  # via pytest
68
75
  markdown-it-py==3.0.0
69
76
  # via rich
70
77
  mdurl==0.1.2
71
78
  # via markdown-it-py
72
- multidict==6.4.4
79
+ multidict==6.7.0
73
80
  # via aiohttp
74
81
  # via yarl
75
- mypy==1.14.1
76
- mypy-extensions==1.0.0
82
+ mypy==1.17.0
83
+ mypy-extensions==1.1.0
77
84
  # via mypy
78
- nest-asyncio==1.6.0
79
- nodeenv==1.8.0
85
+ nodeenv==1.9.1
80
86
  # via pyright
81
- nox==2023.4.22
82
- packaging==23.2
87
+ nox==2025.11.12
88
+ packaging==25.0
89
+ # via dependency-groups
83
90
  # via nox
84
91
  # via pytest
85
- platformdirs==3.11.0
92
+ pathspec==0.12.1
93
+ # via mypy
94
+ platformdirs==4.4.0
86
95
  # via virtualenv
87
- pluggy==1.5.0
96
+ pluggy==1.6.0
88
97
  # via pytest
89
- propcache==0.3.1
98
+ propcache==0.4.1
90
99
  # via aiohttp
91
100
  # via yarl
92
- pydantic==2.10.3
101
+ pydantic==2.12.5
93
102
  # via cas-parser-python
94
- pydantic-core==2.27.1
103
+ pydantic-core==2.41.5
95
104
  # via pydantic
96
- pygments==2.18.0
105
+ pygments==2.19.2
106
+ # via pytest
97
107
  # via rich
98
108
  pyright==1.1.399
99
- pytest==8.3.3
109
+ pytest==8.4.2
100
110
  # via pytest-asyncio
101
111
  # via pytest-xdist
102
- pytest-asyncio==0.24.0
103
- pytest-xdist==3.7.0
104
- python-dateutil==2.8.2
112
+ pytest-asyncio==1.2.0
113
+ pytest-xdist==3.8.0
114
+ python-dateutil==2.9.0.post0
105
115
  # via time-machine
106
- pytz==2023.3.post1
107
- # via dirty-equals
108
116
  respx==0.22.0
109
- rich==13.7.1
110
- ruff==0.9.4
111
- setuptools==68.2.2
112
- # via nodeenv
113
- six==1.16.0
117
+ rich==14.2.0
118
+ ruff==0.14.7
119
+ six==1.17.0
114
120
  # via python-dateutil
115
- sniffio==1.3.0
116
- # via anyio
121
+ sniffio==1.3.1
117
122
  # via cas-parser-python
118
- time-machine==2.9.0
119
- tomli==2.0.2
123
+ time-machine==2.19.0
124
+ tomli==2.3.0
125
+ # via dependency-groups
120
126
  # via mypy
127
+ # via nox
121
128
  # via pytest
122
- typing-extensions==4.12.2
129
+ typing-extensions==4.15.0
130
+ # via aiosignal
123
131
  # via anyio
124
132
  # via cas-parser-python
133
+ # via exceptiongroup
125
134
  # via multidict
126
135
  # via mypy
127
136
  # via pydantic
128
137
  # via pydantic-core
129
138
  # via pyright
130
- virtualenv==20.24.5
139
+ # via pytest-asyncio
140
+ # via typing-inspection
141
+ # via virtualenv
142
+ typing-inspection==0.4.2
143
+ # via pydantic
144
+ virtualenv==20.35.4
131
145
  # via nox
132
- yarl==1.20.0
146
+ yarl==1.22.0
133
147
  # via aiohttp
134
- zipp==3.17.0
148
+ zipp==3.23.0
135
149
  # via importlib-metadata
@@ -12,28 +12,28 @@
12
12
  -e file:.
13
13
  aiohappyeyeballs==2.6.1
14
14
  # via aiohttp
15
- aiohttp==3.12.8
15
+ aiohttp==3.13.2
16
16
  # via cas-parser-python
17
17
  # via httpx-aiohttp
18
- aiosignal==1.3.2
18
+ aiosignal==1.4.0
19
19
  # via aiohttp
20
- annotated-types==0.6.0
20
+ annotated-types==0.7.0
21
21
  # via pydantic
22
- anyio==4.4.0
22
+ anyio==4.12.0
23
23
  # via cas-parser-python
24
24
  # via httpx
25
25
  async-timeout==5.0.1
26
26
  # via aiohttp
27
- attrs==25.3.0
27
+ attrs==25.4.0
28
28
  # via aiohttp
29
- certifi==2023.7.22
29
+ certifi==2025.11.12
30
30
  # via httpcore
31
31
  # via httpx
32
- distro==1.8.0
32
+ distro==1.9.0
33
33
  # via cas-parser-python
34
- exceptiongroup==1.2.2
34
+ exceptiongroup==1.3.1
35
35
  # via anyio
36
- frozenlist==1.6.2
36
+ frozenlist==1.8.0
37
37
  # via aiohttp
38
38
  # via aiosignal
39
39
  h11==0.16.0
@@ -43,30 +43,34 @@ httpcore==1.0.9
43
43
  httpx==0.28.1
44
44
  # via cas-parser-python
45
45
  # via httpx-aiohttp
46
- httpx-aiohttp==0.1.8
46
+ httpx-aiohttp==0.1.9
47
47
  # via cas-parser-python
48
- idna==3.4
48
+ idna==3.11
49
49
  # via anyio
50
50
  # via httpx
51
51
  # via yarl
52
- multidict==6.4.4
52
+ multidict==6.7.0
53
53
  # via aiohttp
54
54
  # via yarl
55
- propcache==0.3.1
55
+ propcache==0.4.1
56
56
  # via aiohttp
57
57
  # via yarl
58
- pydantic==2.10.3
58
+ pydantic==2.12.5
59
59
  # via cas-parser-python
60
- pydantic-core==2.27.1
60
+ pydantic-core==2.41.5
61
61
  # via pydantic
62
- sniffio==1.3.0
63
- # via anyio
62
+ sniffio==1.3.1
64
63
  # via cas-parser-python
65
- typing-extensions==4.12.2
64
+ typing-extensions==4.15.0
65
+ # via aiosignal
66
66
  # via anyio
67
67
  # via cas-parser-python
68
+ # via exceptiongroup
68
69
  # via multidict
69
70
  # via pydantic
70
71
  # via pydantic-core
71
- yarl==1.20.0
72
+ # via typing-inspection
73
+ typing-inspection==0.4.2
74
+ # via pydantic
75
+ yarl==1.22.0
72
76
  # via aiohttp