aiorentman 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.
- aiorentman-0.2.0/LICENSE +21 -0
- aiorentman-0.2.0/PKG-INFO +344 -0
- aiorentman-0.2.0/README.md +321 -0
- aiorentman-0.2.0/pyproject.toml +149 -0
- aiorentman-0.2.0/pyproject.toml.orig +125 -0
- aiorentman-0.2.0/src/aiorentman/__init__.py +252 -0
- aiorentman-0.2.0/src/aiorentman/_endpoints.py +3672 -0
- aiorentman-0.2.0/src/aiorentman/_ratelimit.py +46 -0
- aiorentman-0.2.0/src/aiorentman/_transport.py +167 -0
- aiorentman-0.2.0/src/aiorentman/client.py +3749 -0
- aiorentman-0.2.0/src/aiorentman/const.py +22 -0
- aiorentman-0.2.0/src/aiorentman/exceptions.py +51 -0
- aiorentman-0.2.0/src/aiorentman/models.py +1843 -0
- aiorentman-0.2.0/src/aiorentman/parsers.py +2062 -0
- aiorentman-0.2.0/src/aiorentman/payloads.py +560 -0
- aiorentman-0.2.0/src/aiorentman/py.typed +0 -0
- aiorentman-0.2.0/src/aiorentman/query.py +150 -0
aiorentman-0.2.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Daan Vervacke
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: aiorentman
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Unofficial asynchronous Python library to interact with the Rentman API
|
|
5
|
+
Keywords: rentman,rental,equipment,materials,rfid,serial-numbers,api,asyncio,aiohttp,home-assistant
|
|
6
|
+
Author: Daan Vervacke
|
|
7
|
+
Author-email: Daan Vervacke <daan.vervacke@proton.me>
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Framework :: AsyncIO
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
14
|
+
Classifier: Topic :: Home Automation
|
|
15
|
+
Classifier: Typing :: Typed
|
|
16
|
+
Requires-Dist: aiohttp>=3.14.3
|
|
17
|
+
Requires-Python: >=3.14
|
|
18
|
+
Project-URL: Homepage, https://github.com/DaanVervacke/aiorentman
|
|
19
|
+
Project-URL: Repository, https://github.com/DaanVervacke/aiorentman
|
|
20
|
+
Project-URL: Issues, https://github.com/DaanVervacke/aiorentman/issues
|
|
21
|
+
Project-URL: Changelog, https://github.com/DaanVervacke/aiorentman/blob/main/CHANGELOG.md
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
|
|
24
|
+
# aiorentman
|
|
25
|
+
|
|
26
|
+
[](https://github.com/DaanVervacke/aiorentman/actions/workflows/check.yml)
|
|
27
|
+
[](https://pypi.org/project/aiorentman/)
|
|
28
|
+
[](https://pypi.org/project/aiorentman/)
|
|
29
|
+
[](https://opensource.org/licenses/MIT)
|
|
30
|
+
|
|
31
|
+
Unofficial asynchronous Python library to interact with the Rentman API. Requires Python >= 3.14.
|
|
32
|
+
|
|
33
|
+
This is a client for a documented public API, but it is not affiliated with or endorsed by Rentman B.V. Rentman runs one rolling API version and migrates integrations automatically, so the library pins its contract to the OpenAPI document it ships with and validates every endpoint against it.
|
|
34
|
+
|
|
35
|
+
## Install
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
pip install aiorentman
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Scope
|
|
42
|
+
|
|
43
|
+
The library covers the resources an RFID and materials project needs. Reads cover every documented GET path:
|
|
44
|
+
|
|
45
|
+
| Resource | List | Iterate | Get |
|
|
46
|
+
| --- | --- | --- | --- |
|
|
47
|
+
| Equipment (materials) | `async_list_equipment` | `async_iter_equipment` | `async_get_equipment` |
|
|
48
|
+
| Serial numbers | `async_list_serial_numbers` | `async_iter_serial_numbers` | `async_get_serial_number` |
|
|
49
|
+
| Serial numbers of a material | `async_list_serial_numbers_of_equipment` | `async_iter_serial_numbers_of_equipment` | |
|
|
50
|
+
| Actual content | `async_list_actual_content` | `async_iter_actual_content` | `async_get_actual_content` |
|
|
51
|
+
| Actual content of a serial | `async_list_actual_content_of_serial_number` | `async_iter_actual_content_of_serial_number` | |
|
|
52
|
+
| Assigned serials | `async_list_equipment_assigned_serials` | `async_iter_equipment_assigned_serials` | `async_get_equipment_assigned_serial` |
|
|
53
|
+
| Assigned serials of a serial | `async_list_equipment_assigned_serials_of_serial_number` | `async_iter_equipment_assigned_serials_of_serial_number` | |
|
|
54
|
+
| Set content | `async_list_equipment_set_content` | `async_iter_equipment_set_content` | `async_get_equipment_set_content` |
|
|
55
|
+
| Set content of a material | `async_list_equipment_set_content_of_equipment` | `async_iter_equipment_set_content_of_equipment` | |
|
|
56
|
+
| Folders | `async_list_folders` | `async_iter_folders` | `async_get_folder` |
|
|
57
|
+
| Stock locations | `async_list_stock_locations` | `async_iter_stock_locations` | `async_get_stock_location` |
|
|
58
|
+
| Warehouse statuses | `async_list_warehouse_statuses` | `async_iter_warehouse_statuses` | `async_get_warehouse_status` |
|
|
59
|
+
| Statuses | `async_list_statuses` | `async_iter_statuses` | `async_get_status` |
|
|
60
|
+
| Stock movements | `async_list_stock_movements` | `async_iter_stock_movements` | `async_get_stock_movement` |
|
|
61
|
+
| Stock movements of a material | `async_list_stock_movements_of_equipment` | `async_iter_stock_movements_of_equipment` | |
|
|
62
|
+
| Repairs | `async_list_repairs` | `async_iter_repairs` | `async_get_repair` |
|
|
63
|
+
| Repairs of a material | `async_list_repairs_of_equipment` | `async_iter_repairs_of_equipment` | |
|
|
64
|
+
| Projects | `async_list_projects` | `async_iter_projects` | `async_get_project` |
|
|
65
|
+
| Subprojects | `async_list_subprojects` | `async_iter_subprojects` | `async_get_subproject` |
|
|
66
|
+
| Subprojects of a project | `async_list_subprojects_of_project` | `async_iter_subprojects_of_project` | |
|
|
67
|
+
| Project equipment | `async_list_project_equipment` | `async_iter_project_equipment` | `async_get_project_equipment` |
|
|
68
|
+
| Project equipment of a project | `async_list_project_equipment_of_project` | `async_iter_project_equipment_of_project` | |
|
|
69
|
+
| Project equipment of a subproject | `async_list_project_equipment_of_subproject` | `async_iter_project_equipment_of_subproject` | |
|
|
70
|
+
| Accessories | `async_list_accessories` | `async_iter_accessories` | `async_get_accessory` |
|
|
71
|
+
| Accessories of a material | `async_list_accessories_of_equipment` | `async_iter_accessories_of_equipment` | |
|
|
72
|
+
| Alternatives | `async_list_alternatives` | `async_iter_alternatives` | `async_get_alternative` |
|
|
73
|
+
| Alternatives of a material | `async_list_alternatives_of_equipment` | `async_iter_alternatives_of_equipment` | |
|
|
74
|
+
| Suppliers | `async_list_suppliers` | `async_iter_suppliers` | `async_get_supplier` |
|
|
75
|
+
| Suppliers of a material | `async_list_suppliers_of_equipment` | `async_iter_suppliers_of_equipment` | |
|
|
76
|
+
| Vehicles | `async_list_vehicles` | `async_iter_vehicles` | `async_get_vehicle` |
|
|
77
|
+
| Vehicles of a stock location | `async_list_vehicles_of_stock_location` | `async_iter_vehicles_of_stock_location` | |
|
|
78
|
+
| Extra input fields | `async_list_extra_input_fields` | `async_iter_extra_input_fields` | `async_get_extra_input_field` |
|
|
79
|
+
| Project statuses | `async_list_project_statuses` | `async_iter_project_statuses` | `async_get_project_status` |
|
|
80
|
+
| Project types | `async_list_project_types` | `async_iter_project_types` | `async_get_project_type` |
|
|
81
|
+
| Project function groups | `async_list_project_function_groups` | `async_iter_project_function_groups` | `async_get_project_function_group` |
|
|
82
|
+
| Function groups of a project | `async_list_project_function_groups_of_project` | `async_iter_project_function_groups_of_project` | |
|
|
83
|
+
| Function groups of a subproject | `async_list_project_function_groups_of_subproject` | `async_iter_project_function_groups_of_subproject` | |
|
|
84
|
+
| Project functions | `async_list_project_functions` | `async_iter_project_functions` | `async_get_project_function` |
|
|
85
|
+
| Functions of a project | `async_list_project_functions_of_project` | `async_iter_project_functions_of_project` | |
|
|
86
|
+
| Functions of a function group | `async_list_project_functions_of_project_function_group` | `async_iter_project_functions_of_project_function_group` | |
|
|
87
|
+
| Project crew | `async_list_project_crew` | `async_iter_project_crew` | `async_get_project_crew` |
|
|
88
|
+
| Crew of a project | `async_list_project_crew_of_project` | `async_iter_project_crew_of_project` | |
|
|
89
|
+
| Crew of a subproject | `async_list_project_crew_of_subproject` | `async_iter_project_crew_of_subproject` | |
|
|
90
|
+
| Crew of a project function | `async_list_project_crew_of_project_function` | `async_iter_project_crew_of_project_function` | |
|
|
91
|
+
| Project vehicles | `async_list_project_vehicles` | `async_iter_project_vehicles` | `async_get_project_vehicle` |
|
|
92
|
+
| Vehicles of a project | `async_list_project_vehicles_of_project` | `async_iter_project_vehicles_of_project` | |
|
|
93
|
+
| Vehicles of a subproject | `async_list_project_vehicles_of_subproject` | `async_iter_project_vehicles_of_subproject` | |
|
|
94
|
+
| Vehicles of a project function | `async_list_project_vehicles_of_project_function` | `async_iter_project_vehicles_of_project_function` | |
|
|
95
|
+
| Project equipment groups | `async_list_project_equipment_groups` | `async_iter_project_equipment_groups` | `async_get_project_equipment_group` |
|
|
96
|
+
| Equipment groups of a project | `async_list_project_equipment_groups_of_project` | `async_iter_project_equipment_groups_of_project` | |
|
|
97
|
+
| Equipment groups of a subproject | `async_list_project_equipment_groups_of_subproject` | `async_iter_project_equipment_groups_of_subproject` | |
|
|
98
|
+
| Project equipment of an equipment group | `async_list_project_equipment_of_project_equipment_group` | `async_iter_project_equipment_of_project_equipment_group` | |
|
|
99
|
+
| Project costs | `async_list_project_costs` | `async_iter_project_costs` | `async_get_project_cost` |
|
|
100
|
+
| Costs of a project | `async_list_project_costs_of_project` | `async_iter_project_costs_of_project` | |
|
|
101
|
+
| Project requests | `async_list_project_requests` | `async_iter_project_requests` | `async_get_project_request` |
|
|
102
|
+
| Project request equipment | `async_list_project_request_equipment` | `async_iter_project_request_equipment` | `async_get_project_request_equipment` |
|
|
103
|
+
| Request equipment of a project request | `async_list_project_request_equipment_of_project_request` | `async_iter_project_request_equipment_of_project_request` | |
|
|
104
|
+
| Quotes | `async_list_quotes` | `async_iter_quotes` | `async_get_quote` |
|
|
105
|
+
| Quotes of a project | `async_list_quotes_of_project` | `async_iter_quotes_of_project` | |
|
|
106
|
+
| Invoice lines of a quote | `async_list_invoice_lines_of_quote` | `async_iter_invoice_lines_of_quote` | |
|
|
107
|
+
| Contracts | `async_list_contracts` | `async_iter_contracts` | `async_get_contract` |
|
|
108
|
+
| Contracts of a project | `async_list_contracts_of_project` | `async_iter_contracts_of_project` | |
|
|
109
|
+
| Invoices | `async_list_invoices` | `async_iter_invoices` | `async_get_invoice` |
|
|
110
|
+
| Invoice lines of an invoice | `async_list_invoice_lines_of_invoice` | `async_iter_invoice_lines_of_invoice` | |
|
|
111
|
+
| Payments of an invoice | `async_list_payments_of_invoice` | `async_iter_payments_of_invoice` | |
|
|
112
|
+
| Invoice lines | `async_list_invoice_lines` | `async_iter_invoice_lines` | `async_get_invoice_line` |
|
|
113
|
+
| Payments | `async_list_payments` | `async_iter_payments` | `async_get_payment` |
|
|
114
|
+
| Ledger codes | `async_list_ledger_codes` | `async_iter_ledger_codes` | `async_get_ledger_code` |
|
|
115
|
+
| Tax classes | `async_list_tax_classes` | `async_iter_tax_classes` | `async_get_tax_class` |
|
|
116
|
+
| Subrentals | `async_list_subrentals` | `async_iter_subrentals` | `async_get_subrental` |
|
|
117
|
+
| Subrental equipment | `async_list_subrental_equipment` | `async_iter_subrental_equipment` | `async_get_subrental_equipment` |
|
|
118
|
+
| Subrental equipment of a subrental | `async_list_subrental_equipment_of_subrental` | `async_iter_subrental_equipment_of_subrental` | |
|
|
119
|
+
| Subrental equipment of a group | `async_list_subrental_equipment_of_subrental_equipment_group` | `async_iter_subrental_equipment_of_subrental_equipment_group` | |
|
|
120
|
+
| Subrental equipment groups | `async_list_subrental_equipment_groups` | `async_iter_subrental_equipment_groups` | `async_get_subrental_equipment_group` |
|
|
121
|
+
| Equipment groups of a subrental | `async_list_subrental_equipment_groups_of_subrental` | `async_iter_subrental_equipment_groups_of_subrental` | |
|
|
122
|
+
| Purchase orders | `async_list_purchase_orders` | `async_iter_purchase_orders` | `async_get_purchase_order` |
|
|
123
|
+
| Invoice lines of a purchase order | `async_list_invoice_lines_of_purchase_order` | `async_iter_invoice_lines_of_purchase_order` | |
|
|
124
|
+
| Purchase order costs | `async_list_purchase_order_costs` | `async_iter_purchase_order_costs` | `async_get_purchase_order_cost` |
|
|
125
|
+
| Costs of a purchase order | `async_list_purchase_order_costs_of_purchase_order` | `async_iter_purchase_order_costs_of_purchase_order` | |
|
|
126
|
+
| Purchase order global costs | `async_list_purchase_order_global_costs` | `async_iter_purchase_order_global_costs` | `async_get_purchase_order_global_cost` |
|
|
127
|
+
| Global costs of a purchase order | `async_list_purchase_order_global_costs_of_purchase_order` | `async_iter_purchase_order_global_costs_of_purchase_order` | |
|
|
128
|
+
| Crew | `async_list_crew` | `async_iter_crew` | `async_get_crew` |
|
|
129
|
+
| Appointments of a crew member | `async_list_appointments_of_crew` | `async_iter_appointments_of_crew` | |
|
|
130
|
+
| Crew availability | `async_list_crew_availability` | `async_iter_crew_availability` | `async_get_crew_availability` |
|
|
131
|
+
| Availability of a crew member | `async_list_crew_availability_of_crew` | `async_iter_crew_availability_of_crew` | |
|
|
132
|
+
| Crew rates | `async_list_crew_rates` | `async_iter_crew_rates` | `async_get_crew_rate` |
|
|
133
|
+
| Rates of a crew member | `async_list_crew_rates_of_crew` | `async_iter_crew_rates_of_crew` | |
|
|
134
|
+
| Invitations | `async_list_invitations` | `async_iter_invitations` | `async_get_invitation` |
|
|
135
|
+
| Invitations of a crew member | `async_list_invitations_of_crew` | `async_iter_invitations_of_crew` | |
|
|
136
|
+
| Appointments | `async_list_appointments` | `async_iter_appointments` | `async_get_appointment` |
|
|
137
|
+
| Appointment crew | `async_list_appointment_crew` | `async_iter_appointment_crew` | `async_get_appointment_crew` |
|
|
138
|
+
| Crew of an appointment | `async_list_appointment_crew_of_appointment` | `async_iter_appointment_crew_of_appointment` | |
|
|
139
|
+
| Time registrations | `async_list_time_registrations` | `async_iter_time_registrations` | `async_get_time_registration` |
|
|
140
|
+
| Time registration activities | `async_list_time_registration_activities` | `async_iter_time_registration_activities` | `async_get_time_registration_activity` |
|
|
141
|
+
| Activities of a time registration | `async_list_time_registration_activities_of_time_registration` | `async_iter_time_registration_activities_of_time_registration` | |
|
|
142
|
+
| Leave requests | `async_list_leave_requests` | `async_iter_leave_requests` | `async_get_leave_request` |
|
|
143
|
+
| Time registrations of a leave request | `async_list_time_registrations_of_leave_request` | `async_iter_time_registrations_of_leave_request` | |
|
|
144
|
+
| Leave mutations | `async_list_leave_mutations` | `async_iter_leave_mutations` | `async_get_leave_mutation` |
|
|
145
|
+
| Leave types | `async_list_leave_types` | `async_iter_leave_types` | `async_get_leave_type` |
|
|
146
|
+
| Contacts | `async_list_contacts` | `async_iter_contacts` | `async_get_contact` |
|
|
147
|
+
| Contact persons | `async_list_contact_persons` | `async_iter_contact_persons` | `async_get_contact_person` |
|
|
148
|
+
| Contact persons of a contact | `async_list_contact_persons_of_contact` | `async_iter_contact_persons_of_contact` | |
|
|
149
|
+
| Tasks | `async_list_tasks` | `async_iter_tasks` | `async_get_tasks` |
|
|
150
|
+
| Subtasks | `async_list_subtasks` | `async_iter_subtasks` | `async_get_subtasks` |
|
|
151
|
+
| Task assignments | `async_list_task_assignments` | `async_iter_task_assignments` | `async_get_task_assignments` |
|
|
152
|
+
| Task statuses | `async_list_task_statuses` | `async_iter_task_statuses` | `async_get_task_statuses` |
|
|
153
|
+
| Files | `async_list_files` | `async_iter_files` | `async_get_files` |
|
|
154
|
+
| File folders | `async_list_file_folders` | `async_iter_file_folders` | `async_get_file_folders` |
|
|
155
|
+
| Subtasks of a task | `async_list_subtasks_of_task` | `async_iter_subtasks_of_task` | |
|
|
156
|
+
| Task assignments of a task | `async_list_task_assignments_of_task` | `async_iter_task_assignments_of_task` | |
|
|
157
|
+
| Files of a task | `async_list_files_of_task` | `async_iter_files_of_task` | |
|
|
158
|
+
| File folders of a task | `async_list_file_folders_of_task` | `async_iter_file_folders_of_task` | |
|
|
159
|
+
| Tasks of a contact person | `async_list_tasks_of_contact_person` | `async_iter_tasks_of_contact_person` | |
|
|
160
|
+
| Tasks of a contact | `async_list_tasks_of_contact` | `async_iter_tasks_of_contact` | |
|
|
161
|
+
| Tasks of a crew member | `async_list_tasks_of_crew` | `async_iter_tasks_of_crew` | |
|
|
162
|
+
| Tasks of a material | `async_list_tasks_of_equipment` | `async_iter_tasks_of_equipment` | |
|
|
163
|
+
| Tasks of an invoice | `async_list_tasks_of_invoice` | `async_iter_tasks_of_invoice` | |
|
|
164
|
+
| Tasks of a project | `async_list_tasks_of_project` | `async_iter_tasks_of_project` | |
|
|
165
|
+
| Tasks of a purchase order | `async_list_tasks_of_purchase_order` | `async_iter_tasks_of_purchase_order` | |
|
|
166
|
+
| Tasks of a quote | `async_list_tasks_of_quote` | `async_iter_tasks_of_quote` | |
|
|
167
|
+
| Tasks of a repair | `async_list_tasks_of_repair` | `async_iter_tasks_of_repair` | |
|
|
168
|
+
| Tasks of a serial number | `async_list_tasks_of_serial_number` | `async_iter_tasks_of_serial_number` | |
|
|
169
|
+
| Tasks of a subrental | `async_list_tasks_of_subrental` | `async_iter_tasks_of_subrental` | |
|
|
170
|
+
| Tasks of a vehicle | `async_list_tasks_of_vehicle` | `async_iter_tasks_of_vehicle` | |
|
|
171
|
+
| Tasks of a supplier | `async_list_tasks_of_supplier` | `async_iter_tasks_of_supplier` | |
|
|
172
|
+
| Files of a contact person | `async_list_files_of_contact_person` | `async_iter_files_of_contact_person` | |
|
|
173
|
+
| Files of a contact | `async_list_files_of_contact` | `async_iter_files_of_contact` | |
|
|
174
|
+
| Files of a crew member | `async_list_files_of_crew` | `async_iter_files_of_crew` | |
|
|
175
|
+
| Files of a material | `async_list_files_of_equipment` | `async_iter_files_of_equipment` | |
|
|
176
|
+
| Files of an invoice | `async_list_files_of_invoice` | `async_iter_files_of_invoice` | |
|
|
177
|
+
| Files of a project | `async_list_files_of_project` | `async_iter_files_of_project` | |
|
|
178
|
+
| Files of a purchase order | `async_list_files_of_purchase_order` | `async_iter_files_of_purchase_order` | |
|
|
179
|
+
| Files of a quote | `async_list_files_of_quote` | `async_iter_files_of_quote` | |
|
|
180
|
+
| Files of a repair | `async_list_files_of_repair` | `async_iter_files_of_repair` | |
|
|
181
|
+
| Files of a serial number | `async_list_files_of_serial_number` | `async_iter_files_of_serial_number` | |
|
|
182
|
+
| Files of a subrental | `async_list_files_of_subrental` | `async_iter_files_of_subrental` | |
|
|
183
|
+
| Files of a time registration | `async_list_files_of_time_registration` | `async_iter_files_of_time_registration` | |
|
|
184
|
+
| Files of a vehicle | `async_list_files_of_vehicle` | `async_iter_files_of_vehicle` | |
|
|
185
|
+
| Files of a supplier | `async_list_files_of_supplier` | `async_iter_files_of_supplier` | |
|
|
186
|
+
| File folders of a contact person | `async_list_file_folders_of_contact_person` | `async_iter_file_folders_of_contact_person` | |
|
|
187
|
+
| File folders of a contact | `async_list_file_folders_of_contact` | `async_iter_file_folders_of_contact` | |
|
|
188
|
+
| File folders of a crew member | `async_list_file_folders_of_crew` | `async_iter_file_folders_of_crew` | |
|
|
189
|
+
| File folders of a material | `async_list_file_folders_of_equipment` | `async_iter_file_folders_of_equipment` | |
|
|
190
|
+
| File folders of a project | `async_list_file_folders_of_project` | `async_iter_file_folders_of_project` | |
|
|
191
|
+
| File folders of a purchase order | `async_list_file_folders_of_purchase_order` | `async_iter_file_folders_of_purchase_order` | |
|
|
192
|
+
| File folders of a repair | `async_list_file_folders_of_repair` | `async_iter_file_folders_of_repair` | |
|
|
193
|
+
| File folders of a serial number | `async_list_file_folders_of_serial_number` | `async_iter_file_folders_of_serial_number` | |
|
|
194
|
+
| File folders of a subproject | `async_list_file_folders_of_subproject` | `async_iter_file_folders_of_subproject` | |
|
|
195
|
+
| File folders of a subrental | `async_list_file_folders_of_subrental` | `async_iter_file_folders_of_subrental` | |
|
|
196
|
+
| File folders of a supplier | `async_list_file_folders_of_supplier` | `async_iter_file_folders_of_supplier` | |
|
|
197
|
+
| File folders of a vehicle | `async_list_file_folders_of_vehicle` | `async_iter_file_folders_of_vehicle` | |
|
|
198
|
+
| Rates | `async_list_rates` | `async_iter_rates` | `async_get_rate` |
|
|
199
|
+
| Rate factors | `async_list_rate_factors` | `async_iter_rate_factors` | `async_get_rate_factor` |
|
|
200
|
+
| Rate factors of a rate | `async_list_rate_factors_of_rate` | `async_iter_rate_factors_of_rate` | |
|
|
201
|
+
| Factors | `async_list_factors` | `async_iter_factors` | `async_get_factor` |
|
|
202
|
+
| Factors of a factor group | `async_list_factors_of_factor_group` | `async_iter_factors_of_factor_group` | |
|
|
203
|
+
| Factor groups | `async_list_factor_groups` | `async_iter_factor_groups` | `async_get_factor_group` |
|
|
204
|
+
|
|
205
|
+
Writes cover every documented POST, PUT, and DELETE path:
|
|
206
|
+
|
|
207
|
+
| Resource | Create | Update | Delete |
|
|
208
|
+
| --- | --- | --- | --- |
|
|
209
|
+
| Accessories of a material | `async_create_accessory_of_equipment` | `async_update_accessory` | `async_delete_accessory` |
|
|
210
|
+
| Alternatives of a material | `async_create_alternative_of_equipment` | `async_update_alternative` | `async_delete_alternative` |
|
|
211
|
+
| Appointments | `async_create_appointment` | `async_update_appointment` | `async_delete_appointment` |
|
|
212
|
+
| Availability of a crew member | `async_create_crew_availability_of_crew` | `async_update_crew_availability` | `async_delete_crew_availability` |
|
|
213
|
+
| Contact persons of a contact | `async_create_contact_person_of_contact` | `async_update_contact_person` | `async_delete_contact_person` |
|
|
214
|
+
| Contacts | `async_create_contact` | `async_update_contact` | `async_delete_contact` |
|
|
215
|
+
| Crew on an appointment | `async_create_appointment_crew_of_appointment` | `async_update_appointment_crew` | `async_delete_appointment_crew` |
|
|
216
|
+
| Equipment (materials) | `async_create_equipment` | `async_update_equipment` | |
|
|
217
|
+
| Folders | `async_create_folder` | `async_update_folder` | |
|
|
218
|
+
| Function groups of a project | `async_create_project_function_group_of_project` | | |
|
|
219
|
+
| Leave mutations | `async_create_leave_mutation` | | |
|
|
220
|
+
| Leave requests | `async_create_leave_request` | `async_update_leave_request` | |
|
|
221
|
+
| Payments of an invoice | `async_create_payment_of_invoice` | `async_update_payment` | |
|
|
222
|
+
| Project costs of a project | `async_create_project_cost_of_project` | `async_update_project_cost` | `async_delete_project_cost` |
|
|
223
|
+
| Project functions of a project | `async_create_project_function_of_project` | | |
|
|
224
|
+
| Project requests | `async_create_project_request` | `async_update_project_request` | `async_delete_project_request` |
|
|
225
|
+
| Projects | `async_create_project` | | |
|
|
226
|
+
| Request equipment of a project request | `async_create_project_request_equipment_of_project_request` | `async_update_project_request_equipment` | `async_delete_project_request_equipment` |
|
|
227
|
+
| Serial numbers of a material | `async_create_serial_number_of_equipment` | `async_update_serial_number` | `async_delete_serial_number` |
|
|
228
|
+
| Set contents of a material | `async_create_equipment_set_content_of_equipment` | `async_update_equipment_set_content` | `async_delete_equipment_set_content` |
|
|
229
|
+
| Stock movements of a material | `async_create_stock_movement_of_equipment` | `async_update_stock_movement` | `async_delete_stock_movement` |
|
|
230
|
+
| Subprojects of a project | `async_create_subproject_of_project` | | |
|
|
231
|
+
| Subtasks of a task | `async_create_subtask_of_task` | `async_update_subtask` | `async_delete_subtask` |
|
|
232
|
+
| Suppliers of a material | `async_create_supplier_of_equipment` | `async_update_supplier` | `async_delete_supplier` |
|
|
233
|
+
| Task assignments of a task | `async_create_task_assignment_of_task` | `async_update_task_assignment` | `async_delete_task_assignment` |
|
|
234
|
+
| Task statuses | `async_create_task_status` | `async_update_task_status` | `async_delete_task_status` |
|
|
235
|
+
| Tasks | `async_create_task`, `async_create_task_of_contact`, `async_create_task_of_contact_person`, `async_create_task_of_contract`, `async_create_task_of_crew`, `async_create_task_of_equipment`, `async_create_task_of_invoice`, `async_create_task_of_project`, `async_create_task_of_purchase_order`, `async_create_task_of_quote`, `async_create_task_of_repair`, `async_create_task_of_serial_number`, `async_create_task_of_subrental`, `async_create_task_of_supplier`, `async_create_task_of_vehicle` | `async_update_task` | `async_delete_task` |
|
|
236
|
+
| Time registrations | `async_create_time_registration`, `async_create_time_registration_of_leave_request` | `async_update_time_registration` | `async_delete_time_registration` |
|
|
237
|
+
| Vehicles | `async_create_vehicle`, `async_create_vehicle_of_stock_location` | `async_update_vehicle` | `async_delete_vehicle` |
|
|
238
|
+
|
|
239
|
+
## Token
|
|
240
|
+
|
|
241
|
+
Rentman issues one static token per user, generated in the application under Configuration, Integrations. Only the last generated token is valid. Pass it explicitly or set `RENTMAN_TOKEN`:
|
|
242
|
+
|
|
243
|
+
```python
|
|
244
|
+
import asyncio
|
|
245
|
+
|
|
246
|
+
from aiorentman import RentmanClient
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
async def main() -> None:
|
|
250
|
+
async with RentmanClient(token="your-api-token") as client:
|
|
251
|
+
page = await client.async_list_equipment()
|
|
252
|
+
print(page.item_count, "materials on this page")
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
asyncio.run(main())
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
## Querying
|
|
259
|
+
|
|
260
|
+
Every list method takes a `Query` with the field selection, sorting, filters, expansion, and paging that the API supports:
|
|
261
|
+
|
|
262
|
+
```python
|
|
263
|
+
from aiorentman import Query, Sort, eq, lt
|
|
264
|
+
|
|
265
|
+
query = Query(
|
|
266
|
+
fields=("name", "code", "price"),
|
|
267
|
+
sort=(Sort("name"),),
|
|
268
|
+
expand=("folder",),
|
|
269
|
+
filters=(eq("code", "AUD-001"), lt("price", 200)),
|
|
270
|
+
limit=100,
|
|
271
|
+
)
|
|
272
|
+
page = await client.async_list_equipment(query)
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
Filters support the relational operators the API documents: `eq`, `neq`, `lt`, `lte`, `gt`, `gte`, and `is_null`. Field names come straight from the API schema, including `custom_<number>` custom fields.
|
|
276
|
+
|
|
277
|
+
Linked fields such as `equipment.folder` hold a `RentmanLink` with the API path of the linked resource. Expand a field and the parser returns the full typed model instead.
|
|
278
|
+
|
|
279
|
+
## RFID and materials
|
|
280
|
+
|
|
281
|
+
Rentman links every RFID tag to exactly one serial number, and the tag identifier lands in the `qrcodes` field of that serial number. The library exposes `qrcodes` as a parsed tuple. That field is generated by the Rentman backend, and the API can neither filter nor sort on it, so an RFID scan resolves against a local index built from a serial number sync:
|
|
282
|
+
|
|
283
|
+
```python
|
|
284
|
+
index: dict[str, int] = {}
|
|
285
|
+
query = Query(fields=("serial", "qrcodes", "equipment"), limit=1500)
|
|
286
|
+
async for serial in client.async_iter_serial_numbers(query):
|
|
287
|
+
for tag in serial.qrcodes:
|
|
288
|
+
index[tag] = serial.id
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
The docs describe the full workflow, including expansion and availability checks: see `docs/serial-numbers.rst`.
|
|
292
|
+
|
|
293
|
+
## Writing
|
|
294
|
+
|
|
295
|
+
Create and update methods take one payload class per resource, named after the model plus `Payload`. Fields left unset are left out of the request body, so an update touches only what the caller set:
|
|
296
|
+
|
|
297
|
+
```python
|
|
298
|
+
from datetime import UTC, datetime
|
|
299
|
+
|
|
300
|
+
from aiorentman import RentmanLink, TaskPayload
|
|
301
|
+
|
|
302
|
+
task = await client.async_create_task(
|
|
303
|
+
TaskPayload(
|
|
304
|
+
color="#ff0000",
|
|
305
|
+
name="Patch the rig",
|
|
306
|
+
deadline=datetime(2026, 10, 6, 17, 0, tzinfo=UTC),
|
|
307
|
+
status=RentmanLink("/taskstatuses/2"),
|
|
308
|
+
custom={"custom_3": "truss"},
|
|
309
|
+
)
|
|
310
|
+
)
|
|
311
|
+
await client.async_update_task(task.id, TaskPayload(color="#ff0000", name="Patched"))
|
|
312
|
+
await client.async_delete_task(task.id)
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
Datetime fields render as ISO 8601 and link fields take a `RentmanLink` holding the API path of the target. A create or update returns the parsed model of the saved object, or `None` when the response envelope degrades. A delete returns `None`. A 400 answer raises `RentmanValidationError` with the answer text in the message. Clearing a field to `null` is not supported, since fields left unset are not sent.
|
|
316
|
+
|
|
317
|
+
## Rate limits
|
|
318
|
+
|
|
319
|
+
Rentman allows 10 requests per second, at most 20 concurrent requests, and 50.000 requests per day. The client enforces the first two by default. Pass `requests_per_second=None` to disable pacing, or lower it when several consumers share one account. Exceeding the server-side limits raises `RentmanRateLimitError`.
|
|
320
|
+
|
|
321
|
+
## Errors
|
|
322
|
+
|
|
323
|
+
| Exception | Meaning |
|
|
324
|
+
| --- | --- |
|
|
325
|
+
| `RentmanAuthenticationError` | The token is missing or was rejected |
|
|
326
|
+
| `RentmanAuthorizationError` | The token does not grant access to a resource |
|
|
327
|
+
| `RentmanValidationError` | The API rejected a request body or query as invalid |
|
|
328
|
+
| `RentmanRateLimitError` | The request exceeded the rate limits |
|
|
329
|
+
| `RentmanCommunicationError` | The API is unreachable or answered with a failure |
|
|
330
|
+
| `RentmanTimeoutError` | A request exceeded the configured timeout |
|
|
331
|
+
| `RentmanInvalidResponseError` | A response payload was unusable |
|
|
332
|
+
| `RentmanNotFoundError` | The requested object does not exist |
|
|
333
|
+
| `RentmanClientClosedError` | The client was closed |
|
|
334
|
+
|
|
335
|
+
## Development
|
|
336
|
+
|
|
337
|
+
```bash
|
|
338
|
+
uv sync
|
|
339
|
+
uv run python -m scripts.check
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
## License
|
|
343
|
+
|
|
344
|
+
MIT. See [LICENSE](LICENSE).
|