pdfdancer-client-python 0.2.20__tar.gz → 0.2.22__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 (78) hide show
  1. pdfdancer_client_python-0.2.22/.flake8 +4 -0
  2. pdfdancer_client_python-0.2.22/.github/workflows/ci.yml +129 -0
  3. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/.gitignore +7 -0
  4. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/PKG-INFO +1 -1
  5. pdfdancer_client_python-0.2.22/check.py +4 -0
  6. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/docs/openapi.yml +224 -30
  7. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/pyproject.toml +8 -1
  8. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/src/pdfdancer/__init__.py +34 -9
  9. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/src/pdfdancer/exceptions.py +8 -1
  10. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/src/pdfdancer/fingerprint.py +10 -10
  11. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/src/pdfdancer/image_builder.py +13 -7
  12. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/src/pdfdancer/models.py +254 -100
  13. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/src/pdfdancer/page_builder.py +23 -16
  14. pdfdancer_client_python-0.2.22/src/pdfdancer/paragraph_builder.py +554 -0
  15. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/src/pdfdancer/path_builder.py +82 -67
  16. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/src/pdfdancer/pdfdancer_v1.py +1151 -478
  17. pdfdancer_client_python-0.2.22/src/pdfdancer/types.py +420 -0
  18. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/src/pdfdancer_client_python.egg-info/PKG-INFO +1 -1
  19. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/src/pdfdancer_client_python.egg-info/SOURCES.txt +4 -1
  20. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/test.sh +230 -90
  21. pdfdancer_client_python-0.2.22/tests/__init__.py +1 -0
  22. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/tests/conftest.py +1 -1
  23. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/tests/e2e/__init__.py +14 -10
  24. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/tests/e2e/pdf_assertions.py +277 -133
  25. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/tests/e2e/test_acroform.py +1 -3
  26. pdfdancer_client_python-0.2.22/tests/e2e/test_bezier_builder.py +283 -0
  27. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/tests/e2e/test_context_manager.py +154 -76
  28. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/tests/e2e/test_form_x_objects.py +1 -4
  29. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/tests/e2e/test_image.py +34 -48
  30. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/tests/e2e/test_line.py +48 -49
  31. pdfdancer_client_python-0.2.22/tests/e2e/test_line_builder.py +255 -0
  32. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/tests/e2e/test_new_pdf.py +31 -31
  33. pdfdancer_client_python-0.2.22/tests/e2e/test_page.py +166 -0
  34. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/tests/e2e/test_paragraph.py +221 -149
  35. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/tests/e2e/test_path.py +2 -9
  36. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/tests/e2e/test_path_builder.py +118 -164
  37. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/tests/e2e/test_path_builder_rectangle.py +123 -176
  38. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/tests/e2e/test_path_comprehensive.py +77 -84
  39. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/tests/e2e/test_pdfdancer.py +6 -4
  40. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/tests/e2e/test_rectangle_builder.py +106 -161
  41. pdfdancer_client_python-0.2.22/tests/e2e/test_singular_selection.py +327 -0
  42. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/tests/e2e/test_snapshot.py +96 -60
  43. pdfdancer_client_python-0.2.22/tests/fixtures/Showcase.pdf +0 -0
  44. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/tests/test_anonymous_token.py +71 -61
  45. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/tests/test_fingerprint.py +25 -19
  46. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/tests/test_models.py +20 -5
  47. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/tests/test_openapi_compliance.py +29 -8
  48. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/tests/test_path_models.py +18 -37
  49. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/tests/test_pdf_object_equality.py +70 -23
  50. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/tests/test_standard_fonts.py +14 -4
  51. pdfdancer_client_python-0.2.20/.github/workflows/ci.yml +0 -41
  52. pdfdancer_client_python-0.2.20/src/pdfdancer/paragraph_builder.py +0 -287
  53. pdfdancer_client_python-0.2.20/src/pdfdancer/types.py +0 -360
  54. pdfdancer_client_python-0.2.20/tests/__init__.py +0 -1
  55. pdfdancer_client_python-0.2.20/tests/e2e/test_bezier_builder.py +0 -251
  56. pdfdancer_client_python-0.2.20/tests/e2e/test_line_builder.py +0 -255
  57. pdfdancer_client_python-0.2.20/tests/e2e/test_page.py +0 -185
  58. pdfdancer_client_python-0.2.20/tests/fixtures/ObviouslyAwesome.pdf +0 -0
  59. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/.claude/commands/discuss.md +0 -0
  60. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/CLAUDE.md +0 -0
  61. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/LICENSE +0 -0
  62. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/NOTICE +0 -0
  63. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/README.md +0 -0
  64. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/TODO.md +0 -0
  65. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/release.py +0 -0
  66. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/setup.cfg +0 -0
  67. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/src/pdfdancer_client_python.egg-info/dependency_links.txt +0 -0
  68. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/src/pdfdancer_client_python.egg-info/requires.txt +0 -0
  69. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/src/pdfdancer_client_python.egg-info/top_level.txt +0 -0
  70. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/tests/e2e/test_positioning.py +0 -0
  71. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/tests/fixtures/DancingScript-Regular.ttf +0 -0
  72. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/tests/fixtures/Empty.pdf +0 -0
  73. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/tests/fixtures/JetBrainsMono-Regular.ttf +0 -0
  74. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/tests/fixtures/basic-paths.pdf +0 -0
  75. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/tests/fixtures/form-xobject-example.pdf +0 -0
  76. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/tests/fixtures/logo-80.png +0 -0
  77. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/tests/fixtures/mixed-form-types.pdf +0 -0
  78. {pdfdancer_client_python-0.2.20 → pdfdancer_client_python-0.2.22}/update-api-spec.sh +0 -0
@@ -0,0 +1,4 @@
1
+ [flake8]
2
+ max-line-length = 88
3
+ extend-ignore = E203, W503, E501
4
+ exclude = venv, build, dist, .git, __pycache__, *.egg-info
@@ -0,0 +1,129 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ main, staging, develop, development, dev ]
6
+ pull_request:
7
+ branches: [ main, staging, develop, development, dev ]
8
+ workflow_dispatch:
9
+
10
+ jobs:
11
+ test:
12
+ # Quick minimal test on non-main branches
13
+ if: github.ref != 'refs/heads/main'
14
+ runs-on: ubuntu-latest
15
+ strategy:
16
+ fail-fast: false
17
+ matrix:
18
+ python-version: [ '3.12' ]
19
+
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+
23
+ - name: Set up Python ${{ matrix.python-version }}
24
+ uses: actions/setup-python@v5
25
+ with:
26
+ python-version: ${{ matrix.python-version }}
27
+
28
+ - name: Create virtual environment
29
+ run: python -m venv venv
30
+
31
+ - name: Install dependencies
32
+ run: |
33
+ venv/bin/pip install --upgrade pip
34
+ venv/bin/pip install -e ".[dev]"
35
+
36
+ - name: Run linter
37
+ run: |
38
+ venv/bin/python -m flake8 src/
39
+
40
+ - name: Run tests
41
+ run: |
42
+ PDFDANCER_BASE_URL=https://api-staging.pdfdancer.com \
43
+ PDFDANCER_TOKEN=42 \
44
+ venv/bin/python -m pytest tests/ -v --maxfail=3
45
+
46
+ - name: Build distribution packages
47
+ run: venv/bin/python -m build
48
+
49
+ - name: Validate packages
50
+ run: venv/bin/python -m twine check dist/*
51
+
52
+
53
+ test-full-matrix:
54
+ # Full matrix only on main
55
+ if: github.ref == 'refs/heads/main'
56
+ runs-on: ${{ matrix.os }}
57
+ strategy:
58
+ fail-fast: false
59
+ matrix:
60
+ os: [ ubuntu-latest, windows-latest ]
61
+ python-version: [ '3.10', '3.11', '3.12', '3.13' ]
62
+
63
+ steps:
64
+ - uses: actions/checkout@v4
65
+
66
+ - name: Set up Python ${{ matrix.python-version }}
67
+ uses: actions/setup-python@v5
68
+ with:
69
+ python-version: ${{ matrix.python-version }}
70
+
71
+ - name: Create virtual environment (Unix)
72
+ if: runner.os != 'Windows'
73
+ run: python -m venv venv
74
+
75
+ - name: Install dependencies (Unix)
76
+ if: runner.os != 'Windows'
77
+ run: |
78
+ venv/bin/pip install --upgrade pip
79
+ venv/bin/pip install -e ".[dev]"
80
+
81
+ - name: Run linter (Unix)
82
+ if: runner.os != 'Windows'
83
+ run: |
84
+ venv/bin/python -m flake8 src/
85
+
86
+ - name: Run tests (Unix)
87
+ if: runner.os != 'Windows'
88
+ run: |
89
+ PDFDANCER_BASE_URL=https://api-staging.pdfdancer.com \
90
+ PDFDANCER_TOKEN=42 \
91
+ venv/bin/python -m pytest tests/ -v --maxfail=3
92
+
93
+ - name: Build & Validate (Unix)
94
+ if: runner.os != 'Windows'
95
+ run: |
96
+ venv/bin/python -m build
97
+ venv/bin/python -m twine check dist/*
98
+
99
+ - name: Create virtual environment (Windows)
100
+ if: runner.os == 'Windows'
101
+ shell: cmd
102
+ run: python -m venv venv
103
+
104
+ - name: Install dependencies (Windows)
105
+ if: runner.os == 'Windows'
106
+ shell: cmd
107
+ run: |
108
+ venv\Scripts\pip install --upgrade pip
109
+ venv\Scripts\pip install -e ".[dev]"
110
+
111
+ - name: Run linter (Windows)
112
+ if: runner.os == 'Windows'
113
+ run: |
114
+ venv\Scripts\python -m flake8 src/
115
+
116
+ - name: Run tests (Windows)
117
+ if: runner.os == 'Windows'
118
+ shell: cmd
119
+ run: |
120
+ set PDFDANCER_BASE_URL=https://api-staging.pdfdancer.com
121
+ set PDFDANCER_TOKEN=42
122
+ venv\Scripts\python -m pytest tests/ -v --maxfail=3
123
+
124
+ - name: Build & Validate (Windows)
125
+ if: runner.os == 'Windows'
126
+ shell: cmd
127
+ run: |
128
+ venv\Scripts\python -m build
129
+ venv\Scripts\python -m twine check dist/*
@@ -9,3 +9,10 @@ src/pdfdancer_client_python.egg-info
9
9
  /logs/
10
10
  /venv
11
11
  /venv-*
12
+
13
+ # Python cache
14
+ __pycache__/
15
+ *.py[cod]
16
+ *$py.class
17
+ *.so
18
+ .Python
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pdfdancer-client-python
3
- Version: 0.2.20
3
+ Version: 0.2.22
4
4
  Summary: Python client for PDFDancer API
5
5
  Author-email: "The Famous Cat Ltd." <hi@thefamouscat.com>
6
6
  License:
@@ -0,0 +1,4 @@
1
+ #!/bin/sh
2
+
3
+
4
+ isort src/ tests/ && black src/ tests/ && flake8 src/