pdfdancer-client-python 0.2.29__tar.gz → 0.3.2__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 (79) hide show
  1. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/.github/workflows/ci.yml +4 -3
  2. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/.gitignore +1 -0
  3. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/CLAUDE.md +2 -2
  4. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/PKG-INFO +4 -4
  5. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/README.md +3 -3
  6. pdfdancer_client_python-0.3.2/docs/api-schemas/v0.yml +4945 -0
  7. pdfdancer_client_python-0.2.29/docs/openapi.yml → pdfdancer_client_python-0.3.2/docs/api-schemas/v1.yml +1433 -1006
  8. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/pyproject.toml +1 -1
  9. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/src/pdfdancer/__init__.py +4 -0
  10. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/src/pdfdancer/image_builder.py +3 -3
  11. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/src/pdfdancer/models.py +72 -23
  12. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/src/pdfdancer/page_builder.py +37 -11
  13. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/src/pdfdancer/paragraph_builder.py +12 -12
  14. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/src/pdfdancer/path_builder.py +17 -17
  15. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/src/pdfdancer/pdfdancer_v1.py +205 -96
  16. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/src/pdfdancer/text_line_builder.py +9 -9
  17. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/src/pdfdancer/types.py +29 -31
  18. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/src/pdfdancer_client_python.egg-info/PKG-INFO +4 -4
  19. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/src/pdfdancer_client_python.egg-info/SOURCES.txt +3 -1
  20. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/pdf_assertions.py +42 -42
  21. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_acroform.py +6 -6
  22. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_bezier_builder.py +21 -21
  23. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_context_manager.py +26 -26
  24. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_form_x_objects.py +2 -2
  25. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_image.py +10 -10
  26. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_line.py +10 -13
  27. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_line_builder.py +27 -27
  28. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_new_pdf.py +5 -5
  29. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_page.py +15 -16
  30. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_paragraph.py +57 -59
  31. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_path.py +6 -6
  32. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_path_builder.py +48 -48
  33. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_path_builder_rectangle.py +63 -63
  34. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_path_comprehensive.py +18 -18
  35. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_rectangle_builder.py +49 -49
  36. pdfdancer_client_python-0.3.2/tests/e2e/test_redact.py +287 -0
  37. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_singular_selection.py +38 -39
  38. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_snapshot.py +37 -35
  39. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_text_line_edit.py +17 -41
  40. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/test_models.py +10 -10
  41. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/test_openapi_compliance.py +4 -4
  42. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/test_path_models.py +4 -4
  43. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/test_pdf_object_equality.py +23 -23
  44. pdfdancer_client_python-0.3.2/update-api-spec.sh +5 -0
  45. pdfdancer_client_python-0.2.29/update-api-spec.sh +0 -3
  46. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/.claude/commands/discuss.md +0 -0
  47. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/.flake8 +0 -0
  48. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/.github/workflows/daily-tests.yml +0 -0
  49. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/LICENSE +0 -0
  50. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/NOTICE +0 -0
  51. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/TODO.md +0 -0
  52. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/check.py +0 -0
  53. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/media/logo-orange-512h.webp +0 -0
  54. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/media/logo-orange-60h.webp +0 -0
  55. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/release.py +0 -0
  56. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/setup.cfg +0 -0
  57. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/src/pdfdancer/exceptions.py +0 -0
  58. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/src/pdfdancer/fingerprint.py +0 -0
  59. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/src/pdfdancer_client_python.egg-info/dependency_links.txt +0 -0
  60. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/src/pdfdancer_client_python.egg-info/requires.txt +0 -0
  61. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/src/pdfdancer_client_python.egg-info/top_level.txt +0 -0
  62. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/test.sh +0 -0
  63. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/__init__.py +0 -0
  64. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/conftest.py +0 -0
  65. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/__init__.py +0 -0
  66. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_pdfdancer.py +0 -0
  67. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_positioning.py +0 -0
  68. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/fixtures/DancingScript-Regular.ttf +0 -0
  69. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/fixtures/Empty.pdf +0 -0
  70. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/fixtures/JetBrainsMono-Regular.ttf +0 -0
  71. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/fixtures/Showcase.pdf +0 -0
  72. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/fixtures/basic-paths.pdf +0 -0
  73. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/fixtures/form-xobject-example.pdf +0 -0
  74. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/fixtures/logo-80.png +0 -0
  75. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/fixtures/mixed-form-types.pdf +0 -0
  76. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/test_anonymous_token.py +0 -0
  77. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/test_fingerprint.py +0 -0
  78. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/test_rate_limit.py +0 -0
  79. {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/test_standard_fonts.py +0 -0
@@ -2,9 +2,9 @@ name: CI
2
2
 
3
3
  on:
4
4
  push:
5
- branches: [ main, staging, develop, development, dev ]
5
+ branches: [ '**' ]
6
6
  pull_request:
7
- branches: [ main, staging, develop, development, dev ]
7
+ branches: [ '**' ]
8
8
  workflow_dispatch:
9
9
 
10
10
  jobs:
@@ -14,7 +14,7 @@ jobs:
14
14
  runs-on: ubuntu-latest
15
15
  strategy:
16
16
  fail-fast: false
17
- max-parallel: 4
17
+ max-parallel: 2
18
18
  matrix:
19
19
  python-version: [ '3.12' ]
20
20
 
@@ -57,6 +57,7 @@ jobs:
57
57
  runs-on: ${{ matrix.os }}
58
58
  strategy:
59
59
  fail-fast: false
60
+ max-parallel: 2
60
61
  matrix:
61
62
  os: [ ubuntu-latest, windows-latest ]
62
63
  python-version: [ '3.10', '3.11', '3.12', '3.13' ]
@@ -17,3 +17,4 @@ __pycache__/
17
17
  *.so
18
18
  .Python
19
19
  /.run/
20
+ /build
@@ -83,7 +83,7 @@ pdf.save("output.pdf")
83
83
  - **Dual initialization**: `PDFDancer.open()` for existing PDFs, `PDFDancer.new()` for blank PDFs
84
84
  - **Session-based operations**: All constructors create server session automatically
85
85
  - **Object-oriented API**: Selected objects (paragraphs, images, etc.) have methods like `.delete()`, `.move()`
86
- - **Page-level operations**: `pdf.page(index)` provides page-scoped selections and operations
86
+ - **Page-level operations**: `pdf.page(number)` provides page-scoped selections and operations
87
87
  - **Builder pattern**: `new_paragraph()` and `new_image()` for fluent construction
88
88
  - **Strict validation**: All validation matches Java client exactly
89
89
  - **Exception handling**: FontNotFoundException, ValidationException, HttpClientException, etc.
@@ -188,7 +188,7 @@ page.delete()
188
188
  ### API Design
189
189
 
190
190
  - **Use object-oriented patterns**: Selected objects should have methods (`.delete()`, `.move()`, etc.)
191
- - **Provide page-level operations**: `pdf.page(index)` for page-scoped selections
191
+ - **Provide page-level operations**: `pdf.page(number)` for page-scoped selections
192
192
  - **Support fluent builders**: `new_paragraph()` and `new_image()` return builder instances
193
193
  - **Use snake_case for methods**: `select_paragraphs()`, `select_images_at()`, etc.
194
194
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pdfdancer-client-python
3
- Version: 0.2.29
3
+ Version: 0.3.2
4
4
  Summary: Python client for PDFDancer API
5
5
  Author-email: "The Famous Cat Ltd." <hi@thefamouscat.com>
6
6
  License:
@@ -251,7 +251,7 @@ pixel-perfect control from Python. The same API is also available for TypeScript
251
251
 
252
252
  ## Highlights
253
253
 
254
- - Locate paragraphs, text lines, images, vector paths, form fields, and pages by index, coordinates, or text prefixes.
254
+ - Locate paragraphs, text lines, images, vector paths, form fields, and pages by page number, coordinates, or text prefixes.
255
255
  - Edit existing content in place with fluent editors and context managers that apply changes safely.
256
256
  - Programmatically control third-party PDFs—modify invoices, contracts, and reports you did not author.
257
257
  - Add content with precise XY positioning using paragraph and image builders, custom fonts, and color helpers.
@@ -300,7 +300,7 @@ with PDFDancer.open(
300
300
  .font(StandardFonts.HELVETICA, 12) \
301
301
  .color(Color(70, 70, 70)) \
302
302
  .line_spacing(1.4) \
303
- .at(page_index=0, x=72, y=520) \
303
+ .at(page_number=1, x=72, y=520) \
304
304
  .add()
305
305
 
306
306
  # Persist the modified document
@@ -321,7 +321,7 @@ with PDFDancer.new(token="your-api-token") as pdf:
321
321
  .font(StandardFonts.TIMES_BOLD, 18) \
322
322
  .color(Color(10, 10, 80)) \
323
323
  .line_spacing(1.2) \
324
- .at(page_index=0, x=72, y=730) \
324
+ .at(page_number=1, x=72, y=730) \
325
325
  .add()
326
326
 
327
327
  pdf.new_image() \
@@ -12,7 +12,7 @@ pixel-perfect control from Python. The same API is also available for TypeScript
12
12
 
13
13
  ## Highlights
14
14
 
15
- - Locate paragraphs, text lines, images, vector paths, form fields, and pages by index, coordinates, or text prefixes.
15
+ - Locate paragraphs, text lines, images, vector paths, form fields, and pages by page number, coordinates, or text prefixes.
16
16
  - Edit existing content in place with fluent editors and context managers that apply changes safely.
17
17
  - Programmatically control third-party PDFs—modify invoices, contracts, and reports you did not author.
18
18
  - Add content with precise XY positioning using paragraph and image builders, custom fonts, and color helpers.
@@ -61,7 +61,7 @@ with PDFDancer.open(
61
61
  .font(StandardFonts.HELVETICA, 12) \
62
62
  .color(Color(70, 70, 70)) \
63
63
  .line_spacing(1.4) \
64
- .at(page_index=0, x=72, y=520) \
64
+ .at(page_number=1, x=72, y=520) \
65
65
  .add()
66
66
 
67
67
  # Persist the modified document
@@ -82,7 +82,7 @@ with PDFDancer.new(token="your-api-token") as pdf:
82
82
  .font(StandardFonts.TIMES_BOLD, 18) \
83
83
  .color(Color(10, 10, 80)) \
84
84
  .line_spacing(1.2) \
85
- .at(page_index=0, x=72, y=730) \
85
+ .at(page_number=1, x=72, y=730) \
86
86
  .add()
87
87
 
88
88
  pdf.new_image() \