pyUSPTO 0.4.2__tar.gz → 0.4.4__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 (129) hide show
  1. {pyuspto-0.4.2 → pyuspto-0.4.4}/.github/workflows/publish-to-test-pypi.yml +1 -1
  2. {pyuspto-0.4.2 → pyuspto-0.4.4}/.github/workflows/python-tests.yml +3 -4
  3. {pyuspto-0.4.2 → pyuspto-0.4.4}/CONTRIBUTING.md +2 -0
  4. {pyuspto-0.4.2 → pyuspto-0.4.4}/PKG-INFO +23 -15
  5. {pyuspto-0.4.2 → pyuspto-0.4.4}/README.md +2 -1
  6. {pyuspto-0.4.2 → pyuspto-0.4.4}/examples/ifw_example.py +40 -2
  7. {pyuspto-0.4.2 → pyuspto-0.4.4}/examples/patent_data_example.py +22 -0
  8. {pyuspto-0.4.2 → pyuspto-0.4.4}/pyproject.toml +12 -14
  9. {pyuspto-0.4.2 → pyuspto-0.4.4}/requirements-dev.txt +31 -21
  10. {pyuspto-0.4.2 → pyuspto-0.4.4}/requirements.txt +1 -1
  11. {pyuspto-0.4.2 → pyuspto-0.4.4}/src/pyUSPTO/clients/patent_data.py +245 -15
  12. {pyuspto-0.4.2 → pyuspto-0.4.4}/src/pyUSPTO/models/patent_data.py +21 -0
  13. {pyuspto-0.4.2 → pyuspto-0.4.4}/src/pyUSPTO.egg-info/PKG-INFO +23 -15
  14. {pyuspto-0.4.2 → pyuspto-0.4.4}/src/pyUSPTO.egg-info/requires.txt +18 -8
  15. {pyuspto-0.4.2 → pyuspto-0.4.4}/tests/clients/test_patent_data_clients.py +579 -46
  16. {pyuspto-0.4.2 → pyuspto-0.4.4}/tests/integration/test_patent_data_integration.py +49 -0
  17. {pyuspto-0.4.2 → pyuspto-0.4.4}/tox.ini +2 -4
  18. {pyuspto-0.4.2 → pyuspto-0.4.4}/.github/ISSUE_TEMPLATE/bug-report.yml +0 -0
  19. {pyuspto-0.4.2 → pyuspto-0.4.4}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  20. {pyuspto-0.4.2 → pyuspto-0.4.4}/.github/ISSUE_TEMPLATE/documentation-updates.yml +0 -0
  21. {pyuspto-0.4.2 → pyuspto-0.4.4}/.github/ISSUE_TEMPLATE/feature-request.yml +0 -0
  22. {pyuspto-0.4.2 → pyuspto-0.4.4}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  23. {pyuspto-0.4.2 → pyuspto-0.4.4}/.github/dependabot.yml +0 -0
  24. {pyuspto-0.4.2 → pyuspto-0.4.4}/.github/workflows/publish-docs.yaml +0 -0
  25. {pyuspto-0.4.2 → pyuspto-0.4.4}/.gitignore +0 -0
  26. {pyuspto-0.4.2 → pyuspto-0.4.4}/.readthedocs.yaml +0 -0
  27. {pyuspto-0.4.2 → pyuspto-0.4.4}/ADVANCED.md +0 -0
  28. {pyuspto-0.4.2 → pyuspto-0.4.4}/CHANGELOG.md +0 -0
  29. {pyuspto-0.4.2 → pyuspto-0.4.4}/CODE_OF_CONDUCT.md +0 -0
  30. {pyuspto-0.4.2 → pyuspto-0.4.4}/LICENSE +0 -0
  31. {pyuspto-0.4.2 → pyuspto-0.4.4}/_version.pyi +0 -0
  32. {pyuspto-0.4.2 → pyuspto-0.4.4}/docs/Makefile +0 -0
  33. {pyuspto-0.4.2 → pyuspto-0.4.4}/docs/source/_static/.gitkeep +0 -0
  34. {pyuspto-0.4.2 → pyuspto-0.4.4}/docs/source/advanced.rst +0 -0
  35. {pyuspto-0.4.2 → pyuspto-0.4.4}/docs/source/api/clients/bulk_data.rst +0 -0
  36. {pyuspto-0.4.2 → pyuspto-0.4.4}/docs/source/api/clients/index.rst +0 -0
  37. {pyuspto-0.4.2 → pyuspto-0.4.4}/docs/source/api/clients/patent_data.rst +0 -0
  38. {pyuspto-0.4.2 → pyuspto-0.4.4}/docs/source/api/clients/petition_decisions.rst +0 -0
  39. {pyuspto-0.4.2 → pyuspto-0.4.4}/docs/source/api/clients/ptab_appeals.rst +0 -0
  40. {pyuspto-0.4.2 → pyuspto-0.4.4}/docs/source/api/clients/ptab_interferences.rst +0 -0
  41. {pyuspto-0.4.2 → pyuspto-0.4.4}/docs/source/api/clients/ptab_trials.rst +0 -0
  42. {pyuspto-0.4.2 → pyuspto-0.4.4}/docs/source/api/config/config.rst +0 -0
  43. {pyuspto-0.4.2 → pyuspto-0.4.4}/docs/source/api/config/http_config.rst +0 -0
  44. {pyuspto-0.4.2 → pyuspto-0.4.4}/docs/source/api/config/index.rst +0 -0
  45. {pyuspto-0.4.2 → pyuspto-0.4.4}/docs/source/api/exceptions.rst +0 -0
  46. {pyuspto-0.4.2 → pyuspto-0.4.4}/docs/source/api/index.rst +0 -0
  47. {pyuspto-0.4.2 → pyuspto-0.4.4}/docs/source/api/models/base.rst +0 -0
  48. {pyuspto-0.4.2 → pyuspto-0.4.4}/docs/source/api/models/bulk_data.rst +0 -0
  49. {pyuspto-0.4.2 → pyuspto-0.4.4}/docs/source/api/models/index.rst +0 -0
  50. {pyuspto-0.4.2 → pyuspto-0.4.4}/docs/source/api/models/patent_data.rst +0 -0
  51. {pyuspto-0.4.2 → pyuspto-0.4.4}/docs/source/api/models/petition_decisions.rst +0 -0
  52. {pyuspto-0.4.2 → pyuspto-0.4.4}/docs/source/api/models/ptab.rst +0 -0
  53. {pyuspto-0.4.2 → pyuspto-0.4.4}/docs/source/api/models/utils.rst +0 -0
  54. {pyuspto-0.4.2 → pyuspto-0.4.4}/docs/source/api/warnings.rst +0 -0
  55. {pyuspto-0.4.2 → pyuspto-0.4.4}/docs/source/conf.py +0 -0
  56. {pyuspto-0.4.2 → pyuspto-0.4.4}/docs/source/configuration.rst +0 -0
  57. {pyuspto-0.4.2 → pyuspto-0.4.4}/docs/source/development.rst +0 -0
  58. {pyuspto-0.4.2 → pyuspto-0.4.4}/docs/source/examples/bulk_data.rst +0 -0
  59. {pyuspto-0.4.2 → pyuspto-0.4.4}/docs/source/examples/ifw_example.rst +0 -0
  60. {pyuspto-0.4.2 → pyuspto-0.4.4}/docs/source/examples/index.rst +0 -0
  61. {pyuspto-0.4.2 → pyuspto-0.4.4}/docs/source/examples/patent_data.rst +0 -0
  62. {pyuspto-0.4.2 → pyuspto-0.4.4}/docs/source/examples/petition_decisions.rst +0 -0
  63. {pyuspto-0.4.2 → pyuspto-0.4.4}/docs/source/examples/ptab_appeals.rst +0 -0
  64. {pyuspto-0.4.2 → pyuspto-0.4.4}/docs/source/examples/ptab_interferences.rst +0 -0
  65. {pyuspto-0.4.2 → pyuspto-0.4.4}/docs/source/examples/ptab_trials.rst +0 -0
  66. {pyuspto-0.4.2 → pyuspto-0.4.4}/docs/source/index.rst +0 -0
  67. {pyuspto-0.4.2 → pyuspto-0.4.4}/docs/source/installation.rst +0 -0
  68. {pyuspto-0.4.2 → pyuspto-0.4.4}/docs/source/quickstart.rst +0 -0
  69. {pyuspto-0.4.2 → pyuspto-0.4.4}/examples/bulk_data_example.py +0 -0
  70. {pyuspto-0.4.2 → pyuspto-0.4.4}/examples/error_handling_example.py +0 -0
  71. {pyuspto-0.4.2 → pyuspto-0.4.4}/examples/petition_decisions_example.py +0 -0
  72. {pyuspto-0.4.2 → pyuspto-0.4.4}/examples/ptab_appeals_example.py +0 -0
  73. {pyuspto-0.4.2 → pyuspto-0.4.4}/examples/ptab_interferences_example.py +0 -0
  74. {pyuspto-0.4.2 → pyuspto-0.4.4}/examples/ptab_trials_example.py +0 -0
  75. {pyuspto-0.4.2 → pyuspto-0.4.4}/pyUSPTO.code-workspace +0 -0
  76. {pyuspto-0.4.2 → pyuspto-0.4.4}/setup.cfg +0 -0
  77. {pyuspto-0.4.2 → pyuspto-0.4.4}/src/pyUSPTO/__init__.py +0 -0
  78. {pyuspto-0.4.2 → pyuspto-0.4.4}/src/pyUSPTO/clients/__init__.py +0 -0
  79. {pyuspto-0.4.2 → pyuspto-0.4.4}/src/pyUSPTO/clients/base.py +0 -0
  80. {pyuspto-0.4.2 → pyuspto-0.4.4}/src/pyUSPTO/clients/bulk_data.py +0 -0
  81. {pyuspto-0.4.2 → pyuspto-0.4.4}/src/pyUSPTO/clients/petition_decisions.py +0 -0
  82. {pyuspto-0.4.2 → pyuspto-0.4.4}/src/pyUSPTO/clients/ptab_appeals.py +0 -0
  83. {pyuspto-0.4.2 → pyuspto-0.4.4}/src/pyUSPTO/clients/ptab_interferences.py +0 -0
  84. {pyuspto-0.4.2 → pyuspto-0.4.4}/src/pyUSPTO/clients/ptab_trials.py +0 -0
  85. {pyuspto-0.4.2 → pyuspto-0.4.4}/src/pyUSPTO/config.py +0 -0
  86. {pyuspto-0.4.2 → pyuspto-0.4.4}/src/pyUSPTO/exceptions.py +0 -0
  87. {pyuspto-0.4.2 → pyuspto-0.4.4}/src/pyUSPTO/http_config.py +0 -0
  88. {pyuspto-0.4.2 → pyuspto-0.4.4}/src/pyUSPTO/models/__init__.py +0 -0
  89. {pyuspto-0.4.2 → pyuspto-0.4.4}/src/pyUSPTO/models/base.py +0 -0
  90. {pyuspto-0.4.2 → pyuspto-0.4.4}/src/pyUSPTO/models/bulk_data.py +0 -0
  91. {pyuspto-0.4.2 → pyuspto-0.4.4}/src/pyUSPTO/models/petition_decisions.py +0 -0
  92. {pyuspto-0.4.2 → pyuspto-0.4.4}/src/pyUSPTO/models/ptab.py +0 -0
  93. {pyuspto-0.4.2 → pyuspto-0.4.4}/src/pyUSPTO/models/utils.py +0 -0
  94. {pyuspto-0.4.2 → pyuspto-0.4.4}/src/pyUSPTO/py.typed +0 -0
  95. {pyuspto-0.4.2 → pyuspto-0.4.4}/src/pyUSPTO/utils/__init__.py +0 -0
  96. {pyuspto-0.4.2 → pyuspto-0.4.4}/src/pyUSPTO/warnings.py +0 -0
  97. {pyuspto-0.4.2 → pyuspto-0.4.4}/src/pyUSPTO.egg-info/SOURCES.txt +0 -0
  98. {pyuspto-0.4.2 → pyuspto-0.4.4}/src/pyUSPTO.egg-info/dependency_links.txt +0 -0
  99. {pyuspto-0.4.2 → pyuspto-0.4.4}/src/pyUSPTO.egg-info/top_level.txt +0 -0
  100. {pyuspto-0.4.2 → pyuspto-0.4.4}/src/pyUSPTO.egg-info/zip-safe +0 -0
  101. {pyuspto-0.4.2 → pyuspto-0.4.4}/tests/__init__.py +0 -0
  102. {pyuspto-0.4.2 → pyuspto-0.4.4}/tests/clients/__init__.py +0 -0
  103. {pyuspto-0.4.2 → pyuspto-0.4.4}/tests/clients/test_base.py +0 -0
  104. {pyuspto-0.4.2 → pyuspto-0.4.4}/tests/clients/test_bulk_data_clients.py +0 -0
  105. {pyuspto-0.4.2 → pyuspto-0.4.4}/tests/clients/test_petition_decision_clients.py +0 -0
  106. {pyuspto-0.4.2 → pyuspto-0.4.4}/tests/clients/test_ptab_appeals_client.py +0 -0
  107. {pyuspto-0.4.2 → pyuspto-0.4.4}/tests/clients/test_ptab_interferences_client.py +0 -0
  108. {pyuspto-0.4.2 → pyuspto-0.4.4}/tests/clients/test_ptab_trials_client.py +0 -0
  109. {pyuspto-0.4.2 → pyuspto-0.4.4}/tests/conftest.py +0 -0
  110. {pyuspto-0.4.2 → pyuspto-0.4.4}/tests/integration/__init__.py +0 -0
  111. {pyuspto-0.4.2 → pyuspto-0.4.4}/tests/integration/conftest.py +0 -0
  112. {pyuspto-0.4.2 → pyuspto-0.4.4}/tests/integration/test_bulk_data_integration.py +0 -0
  113. {pyuspto-0.4.2 → pyuspto-0.4.4}/tests/integration/test_petition_decisions_integration.py +0 -0
  114. {pyuspto-0.4.2 → pyuspto-0.4.4}/tests/integration/test_ptab_appeals_integration.py +0 -0
  115. {pyuspto-0.4.2 → pyuspto-0.4.4}/tests/integration/test_ptab_interferences_integration.py +0 -0
  116. {pyuspto-0.4.2 → pyuspto-0.4.4}/tests/integration/test_ptab_trials_integration.py +0 -0
  117. {pyuspto-0.4.2 → pyuspto-0.4.4}/tests/models/__init__.py +0 -0
  118. {pyuspto-0.4.2 → pyuspto-0.4.4}/tests/models/test_bulk_data_models.py +0 -0
  119. {pyuspto-0.4.2 → pyuspto-0.4.4}/tests/models/test_patent_data_models.py +0 -0
  120. {pyuspto-0.4.2 → pyuspto-0.4.4}/tests/models/test_petition_decision_models.py +0 -0
  121. {pyuspto-0.4.2 → pyuspto-0.4.4}/tests/models/test_ptab_models.py +0 -0
  122. {pyuspto-0.4.2 → pyuspto-0.4.4}/tests/models/test_utils.py +0 -0
  123. {pyuspto-0.4.2 → pyuspto-0.4.4}/tests/test_config.py +0 -0
  124. {pyuspto-0.4.2 → pyuspto-0.4.4}/tests/test_edge_cases.py +0 -0
  125. {pyuspto-0.4.2 → pyuspto-0.4.4}/tests/test_exceptions.py +0 -0
  126. {pyuspto-0.4.2 → pyuspto-0.4.4}/tests/test_http_config.py +0 -0
  127. {pyuspto-0.4.2 → pyuspto-0.4.4}/tests/test_init.py +0 -0
  128. {pyuspto-0.4.2 → pyuspto-0.4.4}/tests/test_version.py +0 -0
  129. {pyuspto-0.4.2 → pyuspto-0.4.4}/tests/utils/__init__.py +0 -0
@@ -12,7 +12,7 @@ on:
12
12
 
13
13
  jobs:
14
14
  build:
15
- name: Build distribution 📦
15
+ name: Build distribution
16
16
  runs-on: ubuntu-latest
17
17
 
18
18
  steps:
@@ -25,8 +25,7 @@ jobs:
25
25
  run: |
26
26
  python -m pip install --upgrade pip
27
27
  pip install -r requirements.txt
28
- pip install -r requirements-dev.txt
29
- pip install -e .
28
+ pip install -e ".[test]"
30
29
 
31
30
  - name: Run tests
32
31
  run: |
@@ -46,12 +45,12 @@ jobs:
46
45
  - name: Set up Python
47
46
  uses: actions/setup-python@v6
48
47
  with:
49
- python-version: "3.10"
48
+ python-version: "3.14"
50
49
 
51
50
  - name: Install dependencies
52
51
  run: |
53
52
  python -m pip install --upgrade pip
54
- pip install ruff mypy
53
+ pip install -e ".[lint]"
55
54
 
56
55
  - name: Lint with ruff
57
56
  run: |
@@ -22,6 +22,8 @@ cd pyUSPTO
22
22
 
23
23
  ### Set Up Development Environment
24
24
 
25
+ > **Note:** Python 3.11+ is required for the development environment. Some dev dependencies (e.g. `myst-parser`) do not support Python 3.10. The package itself supports Python 3.10+.
26
+
25
27
  ```bash
26
28
  # Create and activate a virtual environment
27
29
  python -m venv venv
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyUSPTO
3
- Version: 0.4.2
3
+ Version: 0.4.4
4
4
  Summary: A Modern Python client for accessing the United States Patent and Trademark Office (USPTO) Open Data Portal (ODP) APIs.
5
5
  Author-email: Andrew Piechocki <apiechocki@dunlapcodding.com>
6
6
  License-Expression: MIT
@@ -17,7 +17,7 @@ Classifier: Programming Language :: Python :: 3.12
17
17
  Classifier: Programming Language :: Python :: 3.13
18
18
  Classifier: Programming Language :: Python :: 3.14
19
19
  Classifier: Operating System :: OS Independent
20
- Classifier: Development Status :: 4 - Beta
20
+ Classifier: Development Status :: 5 - Production/Stable
21
21
  Classifier: Environment :: Console
22
22
  Classifier: Intended Audience :: Developers
23
23
  Classifier: Intended Audience :: Education
@@ -43,27 +43,35 @@ License-File: LICENSE
43
43
  Requires-Dist: requests>=2.32.5
44
44
  Requires-Dist: typing-extensions>=4.15.0; python_version < "3.11"
45
45
  Requires-Dist: tzdata>=2025.3
46
+ Provides-Extra: test
47
+ Requires-Dist: pytest>=9.0.2; extra == "test"
48
+ Requires-Dist: pytest-cov>=7.0.0; extra == "test"
49
+ Requires-Dist: pytest-mock>=3.15.1; extra == "test"
50
+ Requires-Dist: typing_extensions>=4.15.0; extra == "test"
51
+ Provides-Extra: docs
52
+ Requires-Dist: sphinx>=9.1.0; extra == "docs"
53
+ Requires-Dist: sphinx-rtd-theme>=3.1.0; extra == "docs"
54
+ Requires-Dist: sphinx_immaterial>=0.13.9; extra == "docs"
55
+ Requires-Dist: sphinx-autodoc-typehints>=3.9.5; extra == "docs"
56
+ Requires-Dist: sphinx-copybutton>=0.5.2; extra == "docs"
57
+ Requires-Dist: myst-parser>=5.0.0; extra == "docs"
58
+ Provides-Extra: lint
59
+ Requires-Dist: mypy>=1.19.0; extra == "lint"
60
+ Requires-Dist: types-requests>=2.32.4; extra == "lint"
61
+ Requires-Dist: ruff>=0.15.0; extra == "lint"
46
62
  Provides-Extra: dev
47
- Requires-Dist: pytest>=9.0.2; extra == "dev"
48
- Requires-Dist: pytest-cov>=7.0.0; extra == "dev"
49
- Requires-Dist: pytest-mock>=3.15.1; extra == "dev"
50
- Requires-Dist: sphinx==8.1.3; extra == "dev"
51
- Requires-Dist: sphinx-rtd-theme>=3.0.0; extra == "dev"
52
- Requires-Dist: sphinx_immaterial>=0.13.8; extra == "dev"
53
- Requires-Dist: sphinx-autodoc-typehints==3.0.1; extra == "dev"
54
- Requires-Dist: sphinx-copybutton>=0.5.2; extra == "dev"
55
- Requires-Dist: myst-parser>=4.0.1; extra == "dev"
56
- Requires-Dist: mypy>=1.19.0; extra == "dev"
57
- Requires-Dist: types-requests>=2.32.4; extra == "dev"
58
- Requires-Dist: ruff>=0.15.0; extra == "dev"
63
+ Requires-Dist: pyUSPTO[test]; extra == "dev"
64
+ Requires-Dist: pyUSPTO[docs]; extra == "dev"
65
+ Requires-Dist: pyUSPTO[lint]; extra == "dev"
59
66
  Dynamic: license-file
60
67
 
61
- # pyUSPTO
68
+ # USPTO Open Data Portal Client Library
62
69
 
63
70
  [![PyPI version](https://badge.fury.io/py/pyUSPTO.svg)](https://badge.fury.io/py/pyUSPTO)
64
71
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
65
72
  [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
66
73
  [![Read the Docs](https://img.shields.io/readthedocs/pyuspto)](https://pyuspto.readthedocs.io/en/latest/)
74
+ [![PyPI Downloads](https://static.pepy.tech/personalized-badge/pyuspto?period=total&units=INTERNATIONAL_SYSTEM&left_color=BLUE&right_color=GREY&left_text=downloads)](https://pepy.tech/projects/pyuspto)
67
75
 
68
76
  A Python client library for interacting with the United Stated Patent and Trademark Office (USPTO) [Open Data Portal](https://data.uspto.gov/home) APIs.
69
77
 
@@ -1,9 +1,10 @@
1
- # pyUSPTO
1
+ # USPTO Open Data Portal Client Library
2
2
 
3
3
  [![PyPI version](https://badge.fury.io/py/pyUSPTO.svg)](https://badge.fury.io/py/pyUSPTO)
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
5
  [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
6
6
  [![Read the Docs](https://img.shields.io/readthedocs/pyuspto)](https://pyuspto.readthedocs.io/en/latest/)
7
+ [![PyPI Downloads](https://static.pepy.tech/personalized-badge/pyuspto?period=total&units=INTERNATIONAL_SYSTEM&left_color=BLUE&right_color=GREY&left_text=downloads)](https://pepy.tech/projects/pyuspto)
7
8
 
8
9
  A Python client library for interacting with the United Stated Patent and Trademark Office (USPTO) [Open Data Portal](https://data.uspto.gov/home) APIs.
9
10
 
@@ -1,7 +1,26 @@
1
1
  """Example usage of pyUSPTO for IFW data.
2
2
 
3
- This example demonstrates how to use the PatentDataClient to interact with the USPTO Patent Data API.
4
- It shows how to retrieve IFW based on various identifying values.
3
+ This example demonstrates how to use the PatentDataClient to retrieve Image File
4
+ Wrapper (IFW) data from the USPTO Patent Data API. It covers:
5
+
6
+ - get_IFW_metadata(): retrieve a PatentFileWrapper (with populated document_bag)
7
+ using any of the five supported identifiers:
8
+ - application_number
9
+ - patent_number
10
+ - publication_number
11
+ - PCT_app_number
12
+ - PCT_pub_number
13
+
14
+ - get_IFW(): retrieve metadata AND bulk-download all prosecution history documents
15
+ (PDF preferred, DOCX fallback; XML and formatless docs are skipped). Returns an
16
+ IFWResult with:
17
+ - wrapper: the PatentFileWrapper
18
+ - output_path: path to the ZIP archive (as_zip=True, default) or output directory
19
+ - downloaded_documents: dict mapping document_identifier -> filename, allowing
20
+ each Document in document_bag to be linked to its downloaded file
21
+
22
+ - download_archive() / download_publication(): download the pgpub or grant XML
23
+ archive from PrintedMetaData.
5
24
  """
6
25
 
7
26
  import json
@@ -61,6 +80,25 @@ if pct_pub_no_ifw and pct_pub_no_ifw.application_meta_data:
61
80
  print(f" - IFW Found based on PCT Pub No: {PCT_pub_number}")
62
81
 
63
82
 
83
+ print("\nGet IFW + download all prosecution docs as a ZIP archive -->")
84
+ ifw_result = client.get_IFW(application_number=application_number, destination="./download-example", overwrite=True)
85
+ if ifw_result:
86
+ print(f"Title: {ifw_result.wrapper.application_meta_data.invention_title if ifw_result.wrapper.application_meta_data else 'N/A'}")
87
+ print(f"Output: {ifw_result.output_path}")
88
+ doc_bag = ifw_result.wrapper.document_bag or []
89
+ print(f"Documents downloaded: {len(ifw_result.downloaded_documents)} of {len(doc_bag)}")
90
+ for doc in doc_bag:
91
+ if doc.document_identifier:
92
+ filename = ifw_result.downloaded_documents.get(doc.document_identifier)
93
+ status = f"-> {filename}" if filename else "(skipped)"
94
+ print(f" {doc.document_code} [{doc.document_identifier}] {status}")
95
+
96
+ print("\nGet IFW + download all prosecution docs as a directory (no ZIP) -->")
97
+ ifw_dir_result = client.get_IFW(application_number=application_number, destination="./download-example", overwrite=True, as_zip=False)
98
+ if ifw_dir_result:
99
+ print(f"Output directory: {ifw_dir_result.output_path}")
100
+
101
+
64
102
  print("\nNow let's download the Patent Publication Text -->")
65
103
  if app_no_ifw and app_no_ifw.pgpub_document_meta_data:
66
104
  pgpub_archive = app_no_ifw.pgpub_document_meta_data
@@ -302,6 +302,28 @@ except Exception as e:
302
302
  print(f"Error with POST search: {e}")
303
303
 
304
304
 
305
+ # Search by CPC classification code
306
+ # CPC codes containing spaces or slashes are automatically quoted for the Lucene query.
307
+ # cpc_classification_bag on ApplicationMetaData is a list[str] of all CPC codes assigned
308
+ # to the application, so each result may have multiple codes.
309
+ try:
310
+ print("\nSearching by CPC classification code 'H10D 64/667'...")
311
+ cpc_response = client.search_applications(
312
+ classification_q="H10D 64/667", limit=3
313
+ )
314
+ print(f"Found {cpc_response.count} applications with CPC code H10D 64/667.")
315
+ for patent_wrapper in cpc_response.patent_file_wrapper_data_bag:
316
+ app_meta = patent_wrapper.application_meta_data
317
+ if app_meta:
318
+ print(
319
+ f" - App No: {patent_wrapper.application_number_text}, Title: {app_meta.invention_title}"
320
+ )
321
+ if app_meta.cpc_classification_bag:
322
+ print(f" CPC codes: {', '.join(app_meta.cpc_classification_bag)}")
323
+ except Exception as e:
324
+ print(f"Error searching by CPC classification: {e}")
325
+
326
+
305
327
  # Example of getting status codes
306
328
  try:
307
329
  print("\nGetting first 5 status codes...")
@@ -20,7 +20,7 @@ classifiers = [
20
20
  "Programming Language :: Python :: 3.13",
21
21
  "Programming Language :: Python :: 3.14",
22
22
  "Operating System :: OS Independent",
23
- "Development Status :: 4 - Beta",
23
+ "Development Status :: 5 - Production/Stable",
24
24
  "Environment :: Console",
25
25
  "Intended Audience :: Developers",
26
26
  "Intended Audience :: Education",
@@ -51,24 +51,22 @@ dependencies = [
51
51
  dynamic = ["version"]
52
52
 
53
53
  [project.optional-dependencies]
54
- dev = [
55
- # Testing
54
+ test = [
56
55
  "pytest>=9.0.2",
57
56
  "pytest-cov>=7.0.0",
58
57
  "pytest-mock>=3.15.1",
59
- # Documentation
60
- "sphinx==8.1.3",
61
- "sphinx-rtd-theme>=3.0.0",
62
- "sphinx_immaterial>=0.13.8",
63
- "sphinx-autodoc-typehints==3.0.1",
58
+ "typing_extensions>=4.15.0",
59
+ ]
60
+ docs = [
61
+ "sphinx>=9.1.0",
62
+ "sphinx-rtd-theme>=3.1.0",
63
+ "sphinx_immaterial>=0.13.9",
64
+ "sphinx-autodoc-typehints>=3.9.5",
64
65
  "sphinx-copybutton>=0.5.2",
65
- "myst-parser>=4.0.1",
66
- # Type checking
67
- "mypy>=1.19.0",
68
- "types-requests>=2.32.4",
69
- # Code quality and formatting
70
- "ruff>=0.15.0",
66
+ "myst-parser>=5.0.0",
71
67
  ]
68
+ lint = ["mypy>=1.19.0", "types-requests>=2.32.4", "ruff>=0.15.0"]
69
+ dev = ["pyUSPTO[test]", "pyUSPTO[docs]", "pyUSPTO[lint]"]
72
70
 
73
71
  [project.urls]
74
72
  GitHub = "https://github.com/DunlapCoddingPC/pyUSPTO"
@@ -14,7 +14,7 @@ babel==2.18.0
14
14
  # via sphinx
15
15
  certifi==2026.2.25
16
16
  # via requests
17
- charset-normalizer==3.4.4
17
+ charset-normalizer==3.4.5
18
18
  # via requests
19
19
  colorama==0.4.6
20
20
  # via
@@ -22,14 +22,14 @@ colorama==0.4.6
22
22
  # sphinx
23
23
  coverage==7.13.4
24
24
  # via pytest-cov
25
- docutils==0.21.2
25
+ docutils==0.22.4
26
26
  # via
27
27
  # myst-parser
28
28
  # sphinx
29
29
  # sphinx-rtd-theme
30
30
  idna==3.11
31
31
  # via requests
32
- imagesize==1.4.1
32
+ imagesize==2.0.0
33
33
  # via sphinx
34
34
  iniconfig==2.3.0
35
35
  # via pytest
@@ -39,7 +39,7 @@ jinja2==3.1.6
39
39
  # sphinx
40
40
  librt==0.8.1
41
41
  # via mypy
42
- markdown-it-py==3.0.0
42
+ markdown-it-py==4.0.0
43
43
  # via
44
44
  # mdit-py-plugins
45
45
  # myst-parser
@@ -52,11 +52,11 @@ mdit-py-plugins==0.5.0
52
52
  mdurl==0.1.2
53
53
  # via markdown-it-py
54
54
  mypy==1.19.1
55
- # via pyUSPTO (pyproject.toml)
55
+ # via pyuspto
56
56
  mypy-extensions==1.1.0
57
57
  # via mypy
58
- myst-parser==4.0.1
59
- # via pyUSPTO (pyproject.toml)
58
+ myst-parser==5.0.0
59
+ # via pyuspto
60
60
  packaging==26.0
61
61
  # via
62
62
  # pytest
@@ -81,41 +81,48 @@ pygments==2.19.2
81
81
  # sphinx
82
82
  pytest==9.0.2
83
83
  # via
84
- # pyUSPTO (pyproject.toml)
85
84
  # pytest-cov
86
85
  # pytest-mock
86
+ # pyuspto
87
87
  pytest-cov==7.0.0
88
- # via pyUSPTO (pyproject.toml)
88
+ # via pyuspto
89
89
  pytest-mock==3.15.1
90
- # via pyUSPTO (pyproject.toml)
90
+ # via pyuspto
91
+ pyuspto @ file:///C:/Users/andrewp/Documents/GitHub/pyUSPTO
92
+ # via
93
+ # pyUSPTO (pyproject.toml)
94
+ # pyuspto
91
95
  pyyaml==6.0.3
92
96
  # via myst-parser
93
97
  requests==2.32.5
94
98
  # via
95
99
  # pyUSPTO (pyproject.toml)
100
+ # pyuspto
96
101
  # sphinx
97
102
  # sphinx-immaterial
98
- ruff==0.15.4
99
- # via pyUSPTO (pyproject.toml)
103
+ roman-numerals==4.1.0
104
+ # via sphinx
105
+ ruff==0.15.5
106
+ # via pyuspto
100
107
  snowballstemmer==3.0.1
101
108
  # via sphinx
102
- sphinx==8.1.3
109
+ sphinx==9.1.0
103
110
  # via
104
111
  # myst-parser
105
- # pyUSPTO (pyproject.toml)
112
+ # pyuspto
106
113
  # sphinx-autodoc-typehints
107
114
  # sphinx-copybutton
108
115
  # sphinx-immaterial
109
116
  # sphinx-rtd-theme
110
117
  # sphinxcontrib-jquery
111
- sphinx-autodoc-typehints==3.0.1
112
- # via pyUSPTO (pyproject.toml)
118
+ sphinx-autodoc-typehints==3.9.7
119
+ # via pyuspto
113
120
  sphinx-copybutton==0.5.2
114
- # via pyUSPTO (pyproject.toml)
121
+ # via pyuspto
115
122
  sphinx-immaterial==0.13.9
116
- # via pyUSPTO (pyproject.toml)
123
+ # via pyuspto
117
124
  sphinx-rtd-theme==3.1.0
118
- # via pyUSPTO (pyproject.toml)
125
+ # via pyuspto
119
126
  sphinxcontrib-applehelp==2.0.0
120
127
  # via sphinx
121
128
  sphinxcontrib-devhelp==2.0.0
@@ -131,19 +138,22 @@ sphinxcontrib-qthelp==2.0.0
131
138
  sphinxcontrib-serializinghtml==2.0.0
132
139
  # via sphinx
133
140
  types-requests==2.32.4.20260107
134
- # via pyUSPTO (pyproject.toml)
141
+ # via pyuspto
135
142
  typing-extensions==4.15.0
136
143
  # via
137
144
  # mypy
138
145
  # pydantic
139
146
  # pydantic-core
140
147
  # pydantic-extra-types
148
+ # pyuspto
141
149
  # sphinx-immaterial
142
150
  # typing-inspection
143
151
  typing-inspection==0.4.2
144
152
  # via pydantic
145
153
  tzdata==2025.3
146
- # via pyUSPTO (pyproject.toml)
154
+ # via
155
+ # pyUSPTO (pyproject.toml)
156
+ # pyuspto
147
157
  urllib3==2.6.3
148
158
  # via
149
159
  # requests
@@ -6,7 +6,7 @@
6
6
  #
7
7
  certifi==2026.2.25
8
8
  # via requests
9
- charset-normalizer==3.4.4
9
+ charset-normalizer==3.4.5
10
10
  # via requests
11
11
  idna==3.11
12
12
  # via requests