docges-api-py 0.1.9__tar.gz → 0.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 (31) hide show
  1. {docges_api_py-0.1.9/src/docges_api_py.egg-info → docges_api_py-0.2.0}/PKG-INFO +10 -2
  2. {docges_api_py-0.1.9 → docges_api_py-0.2.0}/README.md +216 -208
  3. {docges_api_py-0.1.9 → docges_api_py-0.2.0}/pyproject.toml +56 -56
  4. {docges_api_py-0.1.9 → docges_api_py-0.2.0}/src/docges_api_py/client.py +508 -482
  5. {docges_api_py-0.1.9 → docges_api_py-0.2.0}/src/docges_api_py/models/requests.py +7 -1
  6. {docges_api_py-0.1.9 → docges_api_py-0.2.0/src/docges_api_py.egg-info}/PKG-INFO +10 -2
  7. {docges_api_py-0.1.9 → docges_api_py-0.2.0}/tests/test_models_requests.py +24 -0
  8. {docges_api_py-0.1.9 → docges_api_py-0.2.0}/tests/test_remaining_methods.py +93 -0
  9. {docges_api_py-0.1.9 → docges_api_py-0.2.0}/LICENSE +0 -0
  10. {docges_api_py-0.1.9 → docges_api_py-0.2.0}/setup.cfg +0 -0
  11. {docges_api_py-0.1.9 → docges_api_py-0.2.0}/src/docges_api_py/__init__.py +0 -0
  12. {docges_api_py-0.1.9 → docges_api_py-0.2.0}/src/docges_api_py/models/__init__.py +0 -0
  13. {docges_api_py-0.1.9 → docges_api_py-0.2.0}/src/docges_api_py/models/auth.py +0 -0
  14. {docges_api_py-0.1.9 → docges_api_py-0.2.0}/src/docges_api_py/models/document.py +0 -0
  15. {docges_api_py-0.1.9 → docges_api_py-0.2.0}/src/docges_api_py/models/responses.py +0 -0
  16. {docges_api_py-0.1.9 → docges_api_py-0.2.0}/src/docges_api_py.egg-info/SOURCES.txt +0 -0
  17. {docges_api_py-0.1.9 → docges_api_py-0.2.0}/src/docges_api_py.egg-info/dependency_links.txt +0 -0
  18. {docges_api_py-0.1.9 → docges_api_py-0.2.0}/src/docges_api_py.egg-info/requires.txt +0 -0
  19. {docges_api_py-0.1.9 → docges_api_py-0.2.0}/src/docges_api_py.egg-info/top_level.txt +0 -0
  20. {docges_api_py-0.1.9 → docges_api_py-0.2.0}/tests/test_check_dir_struct.py +0 -0
  21. {docges_api_py-0.1.9 → docges_api_py-0.2.0}/tests/test_client_auth.py +0 -0
  22. {docges_api_py-0.1.9 → docges_api_py-0.2.0}/tests/test_content_methods.py +0 -0
  23. {docges_api_py-0.1.9 → docges_api_py-0.2.0}/tests/test_endpoints.py +0 -0
  24. {docges_api_py-0.1.9 → docges_api_py-0.2.0}/tests/test_examples.py +0 -0
  25. {docges_api_py-0.1.9 → docges_api_py-0.2.0}/tests/test_get_document.py +0 -0
  26. {docges_api_py-0.1.9 → docges_api_py-0.2.0}/tests/test_initial_cats.py +0 -0
  27. {docges_api_py-0.1.9 → docges_api_py-0.2.0}/tests/test_models_auth.py +0 -0
  28. {docges_api_py-0.1.9 → docges_api_py-0.2.0}/tests/test_models_init.py +0 -0
  29. {docges_api_py-0.1.9 → docges_api_py-0.2.0}/tests/test_models_responses.py +0 -0
  30. {docges_api_py-0.1.9 → docges_api_py-0.2.0}/tests/test_retry.py +0 -0
  31. {docges_api_py-0.1.9 → docges_api_py-0.2.0}/tests/test_token_refresh.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: docges-api-py
3
- Version: 0.1.9
3
+ Version: 0.2.0
4
4
  Summary: Async, typed Python client for DocGes REST API
5
5
  Author-email: "ct.galega" <soporte@ctgalega.com>
6
6
  License: MIT
@@ -75,11 +75,19 @@ pip install -e ".[dev]"
75
75
  ### Category Management
76
76
  | Method | Endpoint | Description |
77
77
  |--------|----------|-------------|
78
- | `create_category(parent_sid, name)` | `POST /Content/CreateCategory` | Create a subcategory |
78
+ | `create_category(parent_sid, name, base_ges_relation=None)` | `POST /Content/CreateCategory` | Create a subcategory, optionally with a management relation |
79
79
  | `rename_category(sid, new_name)` | `POST /Content/RenameCategory` | Rename a category |
80
80
  | `delete_category(sid)` | `POST /Content/DeleteCategory` | Delete a category |
81
81
  | `check_dir_struct(root_sid, path_names, create_if_not_exist, full_info)` | — | Check or create nested directory structure (full_info=False returns only last dir) |
82
82
 
83
+ `create_category()` accepts an optional `base_ges_relation` (string) that is sent as
84
+ `BaseGesRelation`, a sibling of `parentSID`/`name` in the request body — not inside
85
+ `requestModel`. It is trimmed before sending; when it is `None`, empty, or
86
+ whitespace-only the field is omitted and the relation stays empty (not an error). The
87
+ response shape does not change: `result` is the new category SID. Since the bridge
88
+ ignores unknown field names silently, verify a relation by reading the category back
89
+ (`get_cat_info(parent_sid)`) instead of trusting the response alone.
90
+
83
91
  ### Document Management
84
92
  | Method | Endpoint | Description |
85
93
  |--------|----------|-------------|
@@ -1,209 +1,217 @@
1
- # docges-api-py
2
-
3
- Async, typed Python client for the DocGes REST API bridge (`docges-ctg-api`).
4
-
5
- > **Production-ready** — bootstrapped via SDD (Spec-Driven Development).
6
- > All core endpoints implemented with full test coverage (pytest + respx).
7
-
8
- ## Installation
9
-
10
- ```bash
11
- pip install docges-api-py
12
- ```
13
-
14
- For development with testing tools:
15
-
16
- ```bash
17
- pip install -e ".[dev]"
18
- ```
19
-
20
- ## Features
21
-
22
- - ✅ Async HTTP client using `httpx`
23
- - ✅ Typed request/response models with Pydantic v2
24
- - ✅ Configurable retries (exponential backoff) and timeouts
25
- - ✅ Session-based auth: stores `loginResponse` from `/Auth/Login` and auto-injects it
26
- for all Content endpoints
27
- - ✅ Full test coverage (pytest + respx)
28
- - ✅ Complete DocGes API client: categories, documents, search, CRUD operations
29
-
30
- ## Implemented endpoints
31
-
32
- ### Auth
33
- | Method | Endpoint | Description |
34
- |--------|----------|-------------|
35
- | `auth()` | `POST /Auth/Login` | Authenticate and store session |
36
-
37
- ### Content Tree
38
- | Method | Endpoint | Description |
39
- |--------|----------|-------------|
40
- | `get_initial_cats()` | `POST /Content/LoadIniCats` | Load root categories for user's warehouse |
41
- | `get_cat_info(sid)` | `POST /Content/LoadChilds` | Load subcategories and documents for a given category SID |
42
-
43
- ### Document Operations
44
- | Method | Endpoint | Description |
45
- |--------|----------|-------------|
46
- | `upload_file(category_sid, file_path)` | `POST /Content/UploadExtended` | Upload a file to a category |
47
- | `download_content(sid)` | `POST /Content/Download` | Download a document (returns base64 data) |
48
- | `get_document(sid)` | — | Deprecated wrapper for `download_content()` |
49
-
50
- ### Search
51
- | Method | Endpoint | Description |
52
- |--------|----------|-------------|
53
- | `search_content(field_values, date_values)` | `POST /Content/SearchContent` | Search documents by field or date criteria |
54
-
55
- ### Category Management
56
- | Method | Endpoint | Description |
57
- |--------|----------|-------------|
58
- | `create_category(parent_sid, name)` | `POST /Content/CreateCategory` | Create a subcategory |
59
- | `rename_category(sid, new_name)` | `POST /Content/RenameCategory` | Rename a category |
60
- | `delete_category(sid)` | `POST /Content/DeleteCategory` | Delete a category |
61
- | `check_dir_struct(root_sid, path_names, create_if_not_exist, full_info)` | — | Check or create nested directory structure (full_info=False returns only last dir) |
62
-
63
- ### Document Management
64
- | Method | Endpoint | Description |
65
- |--------|----------|-------------|
66
- | `remove_document(sid)` | `POST /Content/RemoveDocument` | Remove a single document |
67
- | `move_content(content_sid, destination_sid)` | `POST /Content/Move` | Move a document to another category |
68
- | `update_content(sid, erp_relation, erp_property)` | `POST /Content/Update` | Update document ERP metadata |
69
-
70
- ## Quick start
71
-
72
- ```bash
73
- pip install -e ".[dev]"
74
- ```
75
-
76
- ```python
77
- import asyncio
78
- import os
79
- from docges_api_py import AsyncDocGes
80
-
81
- async def main():
82
- base_url = os.getenv("DOCGES_API_BASE_URL")
83
- user = os.getenv("DOCGES_USER")
84
- pwd = os.getenv("DOCGES_PASSWORD")
85
- appid = os.getenv("DOCGES_APP_ID")
86
-
87
- async with AsyncDocGes(base_url, user, pwd, appid) as client:
88
- auth_resp = await client.auth()
89
- print(f"User: {auth_resp.user_info['Nombre']}")
90
-
91
- # Browse root categories
92
- cats = await client.get_initial_cats()
93
- for cat in cats.CategoriasHijas or []:
94
- print(f" {cat.Nombre} [SID: {cat.SID}]")
95
-
96
- # Search documents
97
- results = await client.search_content(
98
- field_values=[{"field": "name", "mode": "contains", "text": "factura"}]
99
- )
100
- print(f"Search results: {len(results.results)}")
101
-
102
- asyncio.run(main())
103
- ```
104
-
105
- ### Environment variables
106
-
107
- | Variable | Description | Example |
108
- |----------|-------------|---------|
109
- | `DOCGES_API_BASE_URL` | Bridge base URL | `http://192.168.0.90:49375` |
110
- | `DOCGES_USER` | Username | `administrador` |
111
- | `DOCGES_PASSWORD` | Password | `12345` |
112
- | `DOCGES_APP_ID` | App ID (maps to server config in `clients.xml`) | `local-dev` |
113
- | `DOCGES_ROOT_SID` | Root category SID for directory operations | `1ddbfd1b-5d33-44af-b392-...` |
114
-
115
- **Known appIDs:**
116
- - `local-dev` — local development
117
- - `pre-dev` — pre-production
118
- - `pro-*` — production servers
119
-
120
- ## Examples
121
-
122
- All examples read credentials from environment variables. Run them with:
123
-
124
- ```bash
125
- export DOCGES_API_BASE_URL=http://192.168.0.90:49375
126
- export DOCGES_USER=administrador
127
- export DOCGES_PASSWORD=12345
128
- export DOCGES_APP_ID=local-dev
129
- python examples/<number>_<name>.py
130
- ```
131
-
132
- | # | File | What it does |
133
- |---|------|-------------|
134
- | 01 | `examples/01_auth.py` | Login and inspect session context |
135
- | 02 | `examples/02_initial_cats.py` | Load and list root categories |
136
- | 03 | `examples/03_browse_category.py` | Browse a category by SID (subcats + docs) |
137
- | 04 | `examples/04_search.py` | Search documents by name |
138
- | 05 | `examples/05_upload.py` | Upload a file to a category |
139
- | 06 | `examples/06_download.py` | Download a document by SID |
140
- | 07 | `examples/07_category_crud.py` | Create, rename, and delete a category |
141
- | 08 | `examples/08_document_operations.py` | Update ERP metadata, move, and remove a document |
142
- | 09 | `examples/09_dir_structure.py` | Check or create nested directory structure |
143
-
144
- ## Development
145
-
146
- ```bash
147
- pip install -e ".[dev]"
148
- ruff check src/ tests/
149
- mypy src/
150
- pytest --cov=docges_api_py
151
- ```
152
-
153
- ## Architecture notes
154
-
155
- - The DocGes REST API is a thin bridge in front of DocGes WCF services. It uses session-based auth: `/Auth/Login` returns a `loginResponse` (containing `userInfo` and `wareHouseInfo`) that must be passed back on every Content request via `requestModel.loginResponse`.
156
- - Content endpoints expect `contenidoModel`, `fileModel`, etc. as **top-level fields** alongside `requestModel`, not nested inside it. The client builds the correct payload shape automatically.
157
- - For DocGes Web (bridge) compatibility, the client also includes `loginDocGesData` (username/password/appID) in `requestModel` — this is needed by some bridge deployments that reconstruct the DocGes login model server-side.
158
- - All file content is base64-encoded in transit (handled automatically by the client).
159
-
160
- ## Project structure
161
-
162
- ```
163
- docges-api-py/
164
- ├── src/docges_api_py/
165
- │ ├── __init__.py # Exports AsyncDocGes, models
166
- │ ├── client.py # AsyncDocGes client (all endpoints)
167
- │ └── models/
168
- │ ├── __init__.py # Re-exports all models
169
- │ ├── auth.py # AuthRequest, AuthResponse
170
- │ ├── document.py # Document
171
- │ ├── requests.py # Request models (Pydantic v2)
172
- │ └── responses.py # Response models (ResCat, ResFileDownload, etc.)
173
- ├── tests/
174
- │ ├── conftest.py
175
- │ ├── test_client_auth.py
176
- │ ├── test_initial_cats.py
177
- │ ├── test_content_methods.py
178
- │ ├── test_remaining_methods.py
179
- │ ├── test_check_dir_struct.py
180
- │ ├── test_models_requests.py
181
- │ ├── test_models_responses.py
182
- │ ├── test_models_init.py
183
- │ ├── test_endpoints.py
184
- │ ├── test_retry.py
185
- │ ├── test_token_refresh.py
186
- │ └── test_examples.py
187
- ├── examples/
188
- │ ├── 01_auth.py
189
- │ ├── 02_initial_cats.py
190
- │ ├── 03_browse_category.py
191
- │ ├── 04_search.py
192
- │ ├── 05_upload.py
193
- │ ├── 06_download.py
194
- │ ├── 07_category_crud.py
195
- │ ├── 08_document_operations.py
196
- │ └── 09_dir_structure.py
197
- ├── docs/
198
- │ └── MIGRATION.md
199
- ├── scripts/
200
- │ └── docges_debug/ # Debug helpers for payload investigation
201
- ├── pyproject.toml
202
- ├── ruff.toml
203
- ├── mypy.ini
204
- └── README.md
205
- ```
206
-
207
- ## Contributing
208
-
1
+ # docges-api-py
2
+
3
+ Async, typed Python client for the DocGes REST API bridge (`docges-ctg-api`).
4
+
5
+ > **Production-ready** — bootstrapped via SDD (Spec-Driven Development).
6
+ > All core endpoints implemented with full test coverage (pytest + respx).
7
+
8
+ ## Installation
9
+
10
+ ```bash
11
+ pip install docges-api-py
12
+ ```
13
+
14
+ For development with testing tools:
15
+
16
+ ```bash
17
+ pip install -e ".[dev]"
18
+ ```
19
+
20
+ ## Features
21
+
22
+ - ✅ Async HTTP client using `httpx`
23
+ - ✅ Typed request/response models with Pydantic v2
24
+ - ✅ Configurable retries (exponential backoff) and timeouts
25
+ - ✅ Session-based auth: stores `loginResponse` from `/Auth/Login` and auto-injects it
26
+ for all Content endpoints
27
+ - ✅ Full test coverage (pytest + respx)
28
+ - ✅ Complete DocGes API client: categories, documents, search, CRUD operations
29
+
30
+ ## Implemented endpoints
31
+
32
+ ### Auth
33
+ | Method | Endpoint | Description |
34
+ |--------|----------|-------------|
35
+ | `auth()` | `POST /Auth/Login` | Authenticate and store session |
36
+
37
+ ### Content Tree
38
+ | Method | Endpoint | Description |
39
+ |--------|----------|-------------|
40
+ | `get_initial_cats()` | `POST /Content/LoadIniCats` | Load root categories for user's warehouse |
41
+ | `get_cat_info(sid)` | `POST /Content/LoadChilds` | Load subcategories and documents for a given category SID |
42
+
43
+ ### Document Operations
44
+ | Method | Endpoint | Description |
45
+ |--------|----------|-------------|
46
+ | `upload_file(category_sid, file_path)` | `POST /Content/UploadExtended` | Upload a file to a category |
47
+ | `download_content(sid)` | `POST /Content/Download` | Download a document (returns base64 data) |
48
+ | `get_document(sid)` | — | Deprecated wrapper for `download_content()` |
49
+
50
+ ### Search
51
+ | Method | Endpoint | Description |
52
+ |--------|----------|-------------|
53
+ | `search_content(field_values, date_values)` | `POST /Content/SearchContent` | Search documents by field or date criteria |
54
+
55
+ ### Category Management
56
+ | Method | Endpoint | Description |
57
+ |--------|----------|-------------|
58
+ | `create_category(parent_sid, name, base_ges_relation=None)` | `POST /Content/CreateCategory` | Create a subcategory, optionally with a management relation |
59
+ | `rename_category(sid, new_name)` | `POST /Content/RenameCategory` | Rename a category |
60
+ | `delete_category(sid)` | `POST /Content/DeleteCategory` | Delete a category |
61
+ | `check_dir_struct(root_sid, path_names, create_if_not_exist, full_info)` | — | Check or create nested directory structure (full_info=False returns only last dir) |
62
+
63
+ `create_category()` accepts an optional `base_ges_relation` (string) that is sent as
64
+ `BaseGesRelation`, a sibling of `parentSID`/`name` in the request body — not inside
65
+ `requestModel`. It is trimmed before sending; when it is `None`, empty, or
66
+ whitespace-only the field is omitted and the relation stays empty (not an error). The
67
+ response shape does not change: `result` is the new category SID. Since the bridge
68
+ ignores unknown field names silently, verify a relation by reading the category back
69
+ (`get_cat_info(parent_sid)`) instead of trusting the response alone.
70
+
71
+ ### Document Management
72
+ | Method | Endpoint | Description |
73
+ |--------|----------|-------------|
74
+ | `remove_document(sid)` | `POST /Content/RemoveDocument` | Remove a single document |
75
+ | `move_content(content_sid, destination_sid)` | `POST /Content/Move` | Move a document to another category |
76
+ | `update_content(sid, erp_relation, erp_property)` | `POST /Content/Update` | Update document ERP metadata |
77
+
78
+ ## Quick start
79
+
80
+ ```bash
81
+ pip install -e ".[dev]"
82
+ ```
83
+
84
+ ```python
85
+ import asyncio
86
+ import os
87
+ from docges_api_py import AsyncDocGes
88
+
89
+ async def main():
90
+ base_url = os.getenv("DOCGES_API_BASE_URL")
91
+ user = os.getenv("DOCGES_USER")
92
+ pwd = os.getenv("DOCGES_PASSWORD")
93
+ appid = os.getenv("DOCGES_APP_ID")
94
+
95
+ async with AsyncDocGes(base_url, user, pwd, appid) as client:
96
+ auth_resp = await client.auth()
97
+ print(f"User: {auth_resp.user_info['Nombre']}")
98
+
99
+ # Browse root categories
100
+ cats = await client.get_initial_cats()
101
+ for cat in cats.CategoriasHijas or []:
102
+ print(f" {cat.Nombre} [SID: {cat.SID}]")
103
+
104
+ # Search documents
105
+ results = await client.search_content(
106
+ field_values=[{"field": "name", "mode": "contains", "text": "factura"}]
107
+ )
108
+ print(f"Search results: {len(results.results)}")
109
+
110
+ asyncio.run(main())
111
+ ```
112
+
113
+ ### Environment variables
114
+
115
+ | Variable | Description | Example |
116
+ |----------|-------------|---------|
117
+ | `DOCGES_API_BASE_URL` | Bridge base URL | `http://192.168.0.90:49375` |
118
+ | `DOCGES_USER` | Username | `administrador` |
119
+ | `DOCGES_PASSWORD` | Password | `12345` |
120
+ | `DOCGES_APP_ID` | App ID (maps to server config in `clients.xml`) | `local-dev` |
121
+ | `DOCGES_ROOT_SID` | Root category SID for directory operations | `1ddbfd1b-5d33-44af-b392-...` |
122
+
123
+ **Known appIDs:**
124
+ - `local-dev` — local development
125
+ - `pre-dev` — pre-production
126
+ - `pro-*` — production servers
127
+
128
+ ## Examples
129
+
130
+ All examples read credentials from environment variables. Run them with:
131
+
132
+ ```bash
133
+ export DOCGES_API_BASE_URL=http://192.168.0.90:49375
134
+ export DOCGES_USER=administrador
135
+ export DOCGES_PASSWORD=12345
136
+ export DOCGES_APP_ID=local-dev
137
+ python examples/<number>_<name>.py
138
+ ```
139
+
140
+ | # | File | What it does |
141
+ |---|------|-------------|
142
+ | 01 | `examples/01_auth.py` | Login and inspect session context |
143
+ | 02 | `examples/02_initial_cats.py` | Load and list root categories |
144
+ | 03 | `examples/03_browse_category.py` | Browse a category by SID (subcats + docs) |
145
+ | 04 | `examples/04_search.py` | Search documents by name |
146
+ | 05 | `examples/05_upload.py` | Upload a file to a category |
147
+ | 06 | `examples/06_download.py` | Download a document by SID |
148
+ | 07 | `examples/07_category_crud.py` | Create, rename, and delete a category |
149
+ | 08 | `examples/08_document_operations.py` | Update ERP metadata, move, and remove a document |
150
+ | 09 | `examples/09_dir_structure.py` | Check or create nested directory structure |
151
+
152
+ ## Development
153
+
154
+ ```bash
155
+ pip install -e ".[dev]"
156
+ ruff check src/ tests/
157
+ mypy src/
158
+ pytest --cov=docges_api_py
159
+ ```
160
+
161
+ ## Architecture notes
162
+
163
+ - The DocGes REST API is a thin bridge in front of DocGes WCF services. It uses session-based auth: `/Auth/Login` returns a `loginResponse` (containing `userInfo` and `wareHouseInfo`) that must be passed back on every Content request via `requestModel.loginResponse`.
164
+ - Content endpoints expect `contenidoModel`, `fileModel`, etc. as **top-level fields** alongside `requestModel`, not nested inside it. The client builds the correct payload shape automatically.
165
+ - For DocGes Web (bridge) compatibility, the client also includes `loginDocGesData` (username/password/appID) in `requestModel` — this is needed by some bridge deployments that reconstruct the DocGes login model server-side.
166
+ - All file content is base64-encoded in transit (handled automatically by the client).
167
+
168
+ ## Project structure
169
+
170
+ ```
171
+ docges-api-py/
172
+ ├── src/docges_api_py/
173
+ │ ├── __init__.py # Exports AsyncDocGes, models
174
+ │ ├── client.py # AsyncDocGes client (all endpoints)
175
+ │ └── models/
176
+ │ ├── __init__.py # Re-exports all models
177
+ │ ├── auth.py # AuthRequest, AuthResponse
178
+ │ ├── document.py # Document
179
+ │ ├── requests.py # Request models (Pydantic v2)
180
+ │ └── responses.py # Response models (ResCat, ResFileDownload, etc.)
181
+ ├── tests/
182
+ │ ├── conftest.py
183
+ │ ├── test_client_auth.py
184
+ │ ├── test_initial_cats.py
185
+ │ ├── test_content_methods.py
186
+ │ ├── test_remaining_methods.py
187
+ │ ├── test_check_dir_struct.py
188
+ │ ├── test_models_requests.py
189
+ │ ├── test_models_responses.py
190
+ │ ├── test_models_init.py
191
+ │ ├── test_endpoints.py
192
+ │ ├── test_retry.py
193
+ │ ├── test_token_refresh.py
194
+ │ └── test_examples.py
195
+ ├── examples/
196
+ │ ├── 01_auth.py
197
+ │ ├── 02_initial_cats.py
198
+ │ ├── 03_browse_category.py
199
+ │ ├── 04_search.py
200
+ │ ├── 05_upload.py
201
+ │ ├── 06_download.py
202
+ │ ├── 07_category_crud.py
203
+ │ ├── 08_document_operations.py
204
+ │ └── 09_dir_structure.py
205
+ ├── docs/
206
+ │ └── MIGRATION.md
207
+ ├── scripts/
208
+ │ └── docges_debug/ # Debug helpers for payload investigation
209
+ ├── pyproject.toml
210
+ ├── ruff.toml
211
+ ├── mypy.ini
212
+ └── README.md
213
+ ```
214
+
215
+ ## Contributing
216
+
209
217
  See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
@@ -1,56 +1,56 @@
1
- [build-system]
2
- requires = ["setuptools>=68.0", "wheel"]
3
- build-backend = "setuptools.build_meta"
4
-
5
- [project]
6
- name = "docges-api-py"
7
- version = "0.1.9"
8
- description = "Async, typed Python client for DocGes REST API"
9
- readme = "README.md"
10
- requires-python = ">=3.12"
11
- license = { text = "MIT" }
12
- authors = [
13
- { name = "ct.galega", email = "soporte@ctgalega.com" }
14
- ]
15
- dependencies = [
16
- "httpx>=0.27",
17
- "pydantic>=2.0",
18
- ]
19
-
20
- [project.optional-dependencies]
21
- dev = [
22
- "pytest>=8.0",
23
- "pytest-asyncio>=0.23",
24
- "respx>=0.22",
25
- "pytest-cov>=5.0",
26
- "ruff>=0.4",
27
- "mypy>=1.10",
28
- ]
29
-
30
- [tool.setuptools.packages.find]
31
- where = ["src"]
32
-
33
- [tool.pytest.ini_options]
34
- asyncio_mode = "auto"
35
- testpaths = ["tests"]
36
-
37
- [tool.ruff]
38
- target-version = "py312"
39
- line-length = 120
40
-
41
- [tool.ruff.lint]
42
- select = ["E", "F", "W", "I", "UP", "B", "SIM", "RUF"]
43
-
44
- [tool.mypy]
45
- python_version = "3.12"
46
- warn_return_any = true
47
- warn_unused_configs = true
48
- disallow_untyped_defs = true
49
-
50
- [tool.coverage.run]
51
- source = ["docges_api_py"]
52
- omit = ["tests/*"]
53
-
54
- [tool.coverage.report]
55
- fail_under = 80
56
- show_missing = true
1
+ [build-system]
2
+ requires = ["setuptools>=68.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "docges-api-py"
7
+ version = "0.2.0"
8
+ description = "Async, typed Python client for DocGes REST API"
9
+ readme = "README.md"
10
+ requires-python = ">=3.12"
11
+ license = { text = "MIT" }
12
+ authors = [
13
+ { name = "ct.galega", email = "soporte@ctgalega.com" }
14
+ ]
15
+ dependencies = [
16
+ "httpx>=0.27",
17
+ "pydantic>=2.0",
18
+ ]
19
+
20
+ [project.optional-dependencies]
21
+ dev = [
22
+ "pytest>=8.0",
23
+ "pytest-asyncio>=0.23",
24
+ "respx>=0.22",
25
+ "pytest-cov>=5.0",
26
+ "ruff>=0.4",
27
+ "mypy>=1.10",
28
+ ]
29
+
30
+ [tool.setuptools.packages.find]
31
+ where = ["src"]
32
+
33
+ [tool.pytest.ini_options]
34
+ asyncio_mode = "auto"
35
+ testpaths = ["tests"]
36
+
37
+ [tool.ruff]
38
+ target-version = "py312"
39
+ line-length = 120
40
+
41
+ [tool.ruff.lint]
42
+ select = ["E", "F", "W", "I", "UP", "B", "SIM", "RUF"]
43
+
44
+ [tool.mypy]
45
+ python_version = "3.12"
46
+ warn_return_any = true
47
+ warn_unused_configs = true
48
+ disallow_untyped_defs = true
49
+
50
+ [tool.coverage.run]
51
+ source = ["docges_api_py"]
52
+ omit = ["tests/*"]
53
+
54
+ [tool.coverage.report]
55
+ fail_under = 80
56
+ show_missing = true