pointr-cloud-common 0.1.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.
- pointr_cloud_common-0.1.0/LICENSE-PROPRIETARY.md +104 -0
- pointr_cloud_common-0.1.0/PKG-INFO +340 -0
- pointr_cloud_common-0.1.0/README.md +214 -0
- pointr_cloud_common-0.1.0/pyproject.toml +33 -0
- pointr_cloud_common-0.1.0/setup.cfg +4 -0
- pointr_cloud_common-0.1.0/src/pointr_cloud_common/__init__.py +21 -0
- pointr_cloud_common-0.1.0/src/pointr_cloud_common/api/__init__.py +4 -0
- pointr_cloud_common-0.1.0/src/pointr_cloud_common/api/common/__init__.py +0 -0
- pointr_cloud_common-0.1.0/src/pointr_cloud_common/api/v8/__init__.py +0 -0
- pointr_cloud_common-0.1.0/src/pointr_cloud_common/api/v9/__init__.py +10 -0
- pointr_cloud_common-0.1.0/src/pointr_cloud_common/api/v9/base_service.py +42 -0
- pointr_cloud_common-0.1.0/src/pointr_cloud_common/api/v9/building_service.py +290 -0
- pointr_cloud_common-0.1.0/src/pointr_cloud_common/api/v9/client_service.py +81 -0
- pointr_cloud_common-0.1.0/src/pointr_cloud_common/api/v9/environment_token_service.py +116 -0
- pointr_cloud_common-0.1.0/src/pointr_cloud_common/api/v9/level_service.py +123 -0
- pointr_cloud_common-0.1.0/src/pointr_cloud_common/api/v9/sdk_service.py +140 -0
- pointr_cloud_common-0.1.0/src/pointr_cloud_common/api/v9/site_service.py +270 -0
- pointr_cloud_common-0.1.0/src/pointr_cloud_common/api/v9/v9_api_service.py +254 -0
- pointr_cloud_common-0.1.0/src/pointr_cloud_common/dto/__init__.py +7 -0
- pointr_cloud_common-0.1.0/src/pointr_cloud_common/dto/common/__init__.py +0 -0
- pointr_cloud_common-0.1.0/src/pointr_cloud_common/dto/v8/__init__.py +0 -0
- pointr_cloud_common-0.1.0/src/pointr_cloud_common/dto/v9/__init__.py +11 -0
- pointr_cloud_common-0.1.0/src/pointr_cloud_common/dto/v9/building_dto.py +123 -0
- pointr_cloud_common-0.1.0/src/pointr_cloud_common/dto/v9/client_metadata_dto.py +50 -0
- pointr_cloud_common-0.1.0/src/pointr_cloud_common/dto/v9/create_response_dto.py +37 -0
- pointr_cloud_common-0.1.0/src/pointr_cloud_common/dto/v9/gps_geofence_dto.py +89 -0
- pointr_cloud_common-0.1.0/src/pointr_cloud_common/dto/v9/level_dto.py +101 -0
- pointr_cloud_common-0.1.0/src/pointr_cloud_common/dto/v9/sdk_configuration_dto.py +131 -0
- pointr_cloud_common-0.1.0/src/pointr_cloud_common/dto/v9/site_dto.py +125 -0
- pointr_cloud_common-0.1.0/src/pointr_cloud_common/dto/v9/validation.py +3 -0
- pointr_cloud_common-0.1.0/src/pointr_cloud_common/helpers/__init__.py +0 -0
- pointr_cloud_common-0.1.0/src/pointr_cloud_common/utils/__init__.py +0 -0
- pointr_cloud_common-0.1.0/src/pointr_cloud_common/utils/constants.py +17 -0
- pointr_cloud_common-0.1.0/src/pointr_cloud_common.egg-info/PKG-INFO +340 -0
- pointr_cloud_common-0.1.0/src/pointr_cloud_common.egg-info/SOURCES.txt +43 -0
- pointr_cloud_common-0.1.0/src/pointr_cloud_common.egg-info/dependency_links.txt +1 -0
- pointr_cloud_common-0.1.0/src/pointr_cloud_common.egg-info/requires.txt +1 -0
- pointr_cloud_common-0.1.0/src/pointr_cloud_common.egg-info/top_level.txt +1 -0
- pointr_cloud_common-0.1.0/tests/test_base_service.py +52 -0
- pointr_cloud_common-0.1.0/tests/test_building_service.py +156 -0
- pointr_cloud_common-0.1.0/tests/test_client_service.py +141 -0
- pointr_cloud_common-0.1.0/tests/test_level_service.py +160 -0
- pointr_cloud_common-0.1.0/tests/test_sdk_service.py +167 -0
- pointr_cloud_common-0.1.0/tests/test_site_service.py +153 -0
- pointr_cloud_common-0.1.0/tests/test_v9_api_service.py +243 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# PROPRIETARY SOFTWARE LICENSE
|
|
2
|
+
|
|
3
|
+
## V9 API TOOLKIT
|
|
4
|
+
|
|
5
|
+
Copyright (c) 2025 Pointr Limited. All Rights Reserved.
|
|
6
|
+
|
|
7
|
+
### 1. OWNERSHIP
|
|
8
|
+
|
|
9
|
+
This software and its documentation ("Software") is the proprietary and confidential
|
|
10
|
+
information of Pointr Limited ("Company") and is protected by copyright laws and international
|
|
11
|
+
treaty provisions. The Software contains trade secrets and proprietary information
|
|
12
|
+
owned by the Company and is made available to you, the licensee, under the terms
|
|
13
|
+
of this license agreement.
|
|
14
|
+
|
|
15
|
+
### 2. LICENSE GRANT
|
|
16
|
+
|
|
17
|
+
The Company grants you a non-exclusive, non-transferable license to install and use the Software solely for the purpose of interacting with the Company APIs, provided that you are:
|
|
18
|
+
|
|
19
|
+
(a) an employee, contractor, or agent of Pointr Limited, or
|
|
20
|
+
|
|
21
|
+
(b) a third party who has received express permission or access credentials from the Company.
|
|
22
|
+
|
|
23
|
+
This license does not permit redistribution or modification of the Software unless explicitly authorized in writing by the Company.
|
|
24
|
+
|
|
25
|
+
### 3. RESTRICTIONS
|
|
26
|
+
|
|
27
|
+
You may not:
|
|
28
|
+
|
|
29
|
+
a) Copy, modify, adapt, translate, or create derivative works based upon the Software.
|
|
30
|
+
|
|
31
|
+
b) Reverse engineer, decompile, disassemble, or otherwise attempt to discover the source code of the Software, except to the extent that such activity is expressly permitted by applicable law notwithstanding this limitation.
|
|
32
|
+
|
|
33
|
+
c) Remove, alter, or obscure any proprietary notices (including copyright notices) on any copies of the Software.
|
|
34
|
+
|
|
35
|
+
d) Use the Software for any purpose other than as expressly authorized in this license.
|
|
36
|
+
|
|
37
|
+
e) Transfer, sublicense, or assign your rights under this license to any other person or entity without the prior written consent of the Company.
|
|
38
|
+
|
|
39
|
+
### 4. CONFIDENTIALITY
|
|
40
|
+
|
|
41
|
+
You acknowledge that the Software contains valuable trade secrets and confidential
|
|
42
|
+
information belonging to the Company. You agree to maintain the confidentiality of
|
|
43
|
+
the Software and to use at least the same degree of care to prevent unauthorized
|
|
44
|
+
disclosure of the Software as you would use to protect your own confidential information
|
|
45
|
+
of similar importance, but in no event less than reasonable care.
|
|
46
|
+
|
|
47
|
+
### 5. TERM AND TERMINATION
|
|
48
|
+
|
|
49
|
+
This license is effective until terminated. The Company may terminate this license
|
|
50
|
+
at any time if you fail to comply with any term or condition of this license. Upon
|
|
51
|
+
termination, you must cease all use of the Software and destroy all copies of the
|
|
52
|
+
Software in your possession or control.
|
|
53
|
+
|
|
54
|
+
### 6. DISCLAIMER OF WARRANTIES
|
|
55
|
+
|
|
56
|
+
THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR
|
|
57
|
+
IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
|
|
58
|
+
FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. THE COMPANY DOES NOT WARRANT
|
|
59
|
+
THAT THE SOFTWARE WILL MEET YOUR REQUIREMENTS OR THAT THE OPERATION OF THE SOFTWARE
|
|
60
|
+
WILL BE UNINTERRUPTED OR ERROR-FREE.
|
|
61
|
+
|
|
62
|
+
### 7. LIMITATION OF LIABILITY
|
|
63
|
+
|
|
64
|
+
IN NO EVENT SHALL THE COMPANY BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
|
|
65
|
+
PUNITIVE, OR CONSEQUENTIAL DAMAGES, OR DAMAGES FOR LOSS OF PROFITS, REVENUE, DATA,
|
|
66
|
+
OR DATA USE, INCURRED BY YOU OR ANY THIRD PARTY, WHETHER IN AN ACTION IN CONTRACT
|
|
67
|
+
OR TORT, EVEN IF THE COMPANY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
|
68
|
+
|
|
69
|
+
### 8. EXPORT REGULATIONS
|
|
70
|
+
|
|
71
|
+
The Software may be subject to export or import regulations in other countries.
|
|
72
|
+
You agree to strictly comply with all such laws and regulations.
|
|
73
|
+
|
|
74
|
+
### 9. GOVERNING LAW
|
|
75
|
+
|
|
76
|
+
This license shall be governed by and construed in accordance with the laws of
|
|
77
|
+
England and Wales, without giving effect to any principles of conflicts of law.
|
|
78
|
+
|
|
79
|
+
### 10. ENTIRE AGREEMENT
|
|
80
|
+
|
|
81
|
+
This license constitutes the entire agreement between you and the Company regarding
|
|
82
|
+
the use of the Software and supersedes all prior or contemporaneous understandings
|
|
83
|
+
regarding such subject matter.
|
|
84
|
+
|
|
85
|
+
### 11. UPDATES AND MAINTENANCE
|
|
86
|
+
|
|
87
|
+
The Company is not obligated to provide updates, enhancements, or maintenance for
|
|
88
|
+
the Software under this license.
|
|
89
|
+
|
|
90
|
+
### 12. SURVIVAL
|
|
91
|
+
|
|
92
|
+
Sections 1, 3, 4, 6, 7, 9, and any other provisions that should reasonably survive
|
|
93
|
+
termination of this license shall survive termination.
|
|
94
|
+
|
|
95
|
+
By using the Software, you acknowledge that you have read this license, understand it,
|
|
96
|
+
and agree to be bound by its terms and conditions.
|
|
97
|
+
|
|
98
|
+
Pointr
|
|
99
|
+
|
|
100
|
+
Office 406 – Pavilion Club 96 Kensington High Street London, W8 4SG United Kingdom
|
|
101
|
+
|
|
102
|
+
📧 contact@pointr.tech
|
|
103
|
+
|
|
104
|
+
📞 +44 (0)208 720 7087
|
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pointr-cloud-common
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Common utilities and DTOs shared across PointrCloud apps
|
|
5
|
+
Author-email: Serhat Gürgenyatağı <serhat.gurgenyatagi@pointr.tech>
|
|
6
|
+
License: # PROPRIETARY SOFTWARE LICENSE
|
|
7
|
+
|
|
8
|
+
## V9 API TOOLKIT
|
|
9
|
+
|
|
10
|
+
Copyright (c) 2025 Pointr Limited. All Rights Reserved.
|
|
11
|
+
|
|
12
|
+
### 1. OWNERSHIP
|
|
13
|
+
|
|
14
|
+
This software and its documentation ("Software") is the proprietary and confidential
|
|
15
|
+
information of Pointr Limited ("Company") and is protected by copyright laws and international
|
|
16
|
+
treaty provisions. The Software contains trade secrets and proprietary information
|
|
17
|
+
owned by the Company and is made available to you, the licensee, under the terms
|
|
18
|
+
of this license agreement.
|
|
19
|
+
|
|
20
|
+
### 2. LICENSE GRANT
|
|
21
|
+
|
|
22
|
+
The Company grants you a non-exclusive, non-transferable license to install and use the Software solely for the purpose of interacting with the Company APIs, provided that you are:
|
|
23
|
+
|
|
24
|
+
(a) an employee, contractor, or agent of Pointr Limited, or
|
|
25
|
+
|
|
26
|
+
(b) a third party who has received express permission or access credentials from the Company.
|
|
27
|
+
|
|
28
|
+
This license does not permit redistribution or modification of the Software unless explicitly authorized in writing by the Company.
|
|
29
|
+
|
|
30
|
+
### 3. RESTRICTIONS
|
|
31
|
+
|
|
32
|
+
You may not:
|
|
33
|
+
|
|
34
|
+
a) Copy, modify, adapt, translate, or create derivative works based upon the Software.
|
|
35
|
+
|
|
36
|
+
b) Reverse engineer, decompile, disassemble, or otherwise attempt to discover the source code of the Software, except to the extent that such activity is expressly permitted by applicable law notwithstanding this limitation.
|
|
37
|
+
|
|
38
|
+
c) Remove, alter, or obscure any proprietary notices (including copyright notices) on any copies of the Software.
|
|
39
|
+
|
|
40
|
+
d) Use the Software for any purpose other than as expressly authorized in this license.
|
|
41
|
+
|
|
42
|
+
e) Transfer, sublicense, or assign your rights under this license to any other person or entity without the prior written consent of the Company.
|
|
43
|
+
|
|
44
|
+
### 4. CONFIDENTIALITY
|
|
45
|
+
|
|
46
|
+
You acknowledge that the Software contains valuable trade secrets and confidential
|
|
47
|
+
information belonging to the Company. You agree to maintain the confidentiality of
|
|
48
|
+
the Software and to use at least the same degree of care to prevent unauthorized
|
|
49
|
+
disclosure of the Software as you would use to protect your own confidential information
|
|
50
|
+
of similar importance, but in no event less than reasonable care.
|
|
51
|
+
|
|
52
|
+
### 5. TERM AND TERMINATION
|
|
53
|
+
|
|
54
|
+
This license is effective until terminated. The Company may terminate this license
|
|
55
|
+
at any time if you fail to comply with any term or condition of this license. Upon
|
|
56
|
+
termination, you must cease all use of the Software and destroy all copies of the
|
|
57
|
+
Software in your possession or control.
|
|
58
|
+
|
|
59
|
+
### 6. DISCLAIMER OF WARRANTIES
|
|
60
|
+
|
|
61
|
+
THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR
|
|
62
|
+
IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
|
|
63
|
+
FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. THE COMPANY DOES NOT WARRANT
|
|
64
|
+
THAT THE SOFTWARE WILL MEET YOUR REQUIREMENTS OR THAT THE OPERATION OF THE SOFTWARE
|
|
65
|
+
WILL BE UNINTERRUPTED OR ERROR-FREE.
|
|
66
|
+
|
|
67
|
+
### 7. LIMITATION OF LIABILITY
|
|
68
|
+
|
|
69
|
+
IN NO EVENT SHALL THE COMPANY BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
|
|
70
|
+
PUNITIVE, OR CONSEQUENTIAL DAMAGES, OR DAMAGES FOR LOSS OF PROFITS, REVENUE, DATA,
|
|
71
|
+
OR DATA USE, INCURRED BY YOU OR ANY THIRD PARTY, WHETHER IN AN ACTION IN CONTRACT
|
|
72
|
+
OR TORT, EVEN IF THE COMPANY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
|
73
|
+
|
|
74
|
+
### 8. EXPORT REGULATIONS
|
|
75
|
+
|
|
76
|
+
The Software may be subject to export or import regulations in other countries.
|
|
77
|
+
You agree to strictly comply with all such laws and regulations.
|
|
78
|
+
|
|
79
|
+
### 9. GOVERNING LAW
|
|
80
|
+
|
|
81
|
+
This license shall be governed by and construed in accordance with the laws of
|
|
82
|
+
England and Wales, without giving effect to any principles of conflicts of law.
|
|
83
|
+
|
|
84
|
+
### 10. ENTIRE AGREEMENT
|
|
85
|
+
|
|
86
|
+
This license constitutes the entire agreement between you and the Company regarding
|
|
87
|
+
the use of the Software and supersedes all prior or contemporaneous understandings
|
|
88
|
+
regarding such subject matter.
|
|
89
|
+
|
|
90
|
+
### 11. UPDATES AND MAINTENANCE
|
|
91
|
+
|
|
92
|
+
The Company is not obligated to provide updates, enhancements, or maintenance for
|
|
93
|
+
the Software under this license.
|
|
94
|
+
|
|
95
|
+
### 12. SURVIVAL
|
|
96
|
+
|
|
97
|
+
Sections 1, 3, 4, 6, 7, 9, and any other provisions that should reasonably survive
|
|
98
|
+
termination of this license shall survive termination.
|
|
99
|
+
|
|
100
|
+
By using the Software, you acknowledge that you have read this license, understand it,
|
|
101
|
+
and agree to be bound by its terms and conditions.
|
|
102
|
+
|
|
103
|
+
Pointr
|
|
104
|
+
|
|
105
|
+
Office 406 – Pavilion Club 96 Kensington High Street London, W8 4SG United Kingdom
|
|
106
|
+
|
|
107
|
+
📧 contact@pointr.tech
|
|
108
|
+
|
|
109
|
+
📞 +44 (0)208 720 7087
|
|
110
|
+
|
|
111
|
+
Project-URL: Homepage, https://github.com/pointrlabs/ptr-swdel-internal-util-automation/PointrCloudCommon
|
|
112
|
+
Project-URL: Bug Tracker, https://github.com/pointrlabs/ptr-swdel-internal-util-automation/PointrCloudCommon/issues
|
|
113
|
+
Classifier: Programming Language :: Python :: 3
|
|
114
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
115
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
116
|
+
Classifier: License :: Other/Proprietary License
|
|
117
|
+
Classifier: Operating System :: OS Independent
|
|
118
|
+
Classifier: Intended Audience :: Developers
|
|
119
|
+
Classifier: Development Status :: 4 - Beta
|
|
120
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
121
|
+
Requires-Python: >=3.9
|
|
122
|
+
Description-Content-Type: text/markdown
|
|
123
|
+
License-File: LICENSE-PROPRIETARY.md
|
|
124
|
+
Requires-Dist: requests>=2.25.0
|
|
125
|
+
Dynamic: license-file
|
|
126
|
+
|
|
127
|
+
# Pointr Cloud Commons [](https://badge.fury.io/py/pointr-cloud-common) [](https://pypi.org/project/pointr-cloud-common/)
|
|
128
|
+
|
|
129
|
+
A Python package for interacting with Pointr Cloud APIs, providing services for managing sites, buildings, levels, and SDK configurations.
|
|
130
|
+
|
|
131
|
+
## For Users
|
|
132
|
+
|
|
133
|
+
If you're looking to use this library, please refer to the [Usage Guide](./USAGE.md) for detailed instructions and examples.
|
|
134
|
+
|
|
135
|
+
## For Developers
|
|
136
|
+
|
|
137
|
+
This section is for developers who want to contribute to the Pointr Cloud Commons library.
|
|
138
|
+
|
|
139
|
+
### Development Setup
|
|
140
|
+
|
|
141
|
+
1. Clone the repository:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
git clone https://github.com/pointrlabs/ptr-swdel-internal-util-automation
|
|
145
|
+
cd PointrCloudCommon
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
2. Create a virtual environment:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
python -m venv venv
|
|
152
|
+
source venv/bin/activate # On Windows: venv\Scripts\activate
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
3. Install development dependencies using UV:
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
uv pip install -e ".[dev]"
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Project Structure
|
|
162
|
+
|
|
163
|
+
```
|
|
164
|
+
pointr-cloud-common/
|
|
165
|
+
├── src/ # Source code
|
|
166
|
+
│ └── pointr_cloud_common/
|
|
167
|
+
│ ├── __init__.py # Package initialization
|
|
168
|
+
│ ├── api/ # API services
|
|
169
|
+
│ │ ├── __init__.py
|
|
170
|
+
│ │ ├── common/ # Common API functionality
|
|
171
|
+
│ │ ├── v8/ # V8 API services
|
|
172
|
+
│ │ └── v9/ # V9 API services
|
|
173
|
+
│ ├── dto/ # Data Transfer Objects
|
|
174
|
+
│ │ ├── __init__.py
|
|
175
|
+
│ │ ├── common/ # Common DTOs
|
|
176
|
+
│ │ ├── v8/ # V8 DTOs
|
|
177
|
+
│ │ └── v9/ # V9 DTOs
|
|
178
|
+
│ ├── utils/ # Utility functions
|
|
179
|
+
│ │ └── __init__.py
|
|
180
|
+
│ └── helpers/ # Helper functions
|
|
181
|
+
│ └── __init__.py
|
|
182
|
+
├── tests/ # Test suite
|
|
183
|
+
│ ├── __init__.py
|
|
184
|
+
│ ├── test_dto/ # DTO tests
|
|
185
|
+
│ └── test_utils/ # Utility tests
|
|
186
|
+
├── pyproject.toml # Project configuration
|
|
187
|
+
├── README.md # This file
|
|
188
|
+
├── USAGE.md # User guide
|
|
189
|
+
└── LICENSE-PROPRIETARY.md # License file
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### Key Components
|
|
193
|
+
|
|
194
|
+
#### API Services
|
|
195
|
+
|
|
196
|
+
The library is organized into several services, each responsible for a specific area of functionality:
|
|
197
|
+
|
|
198
|
+
- **V9ApiService**: The main service for V9 API that provides access to all other V9 services. It handles authentication and API requests.
|
|
199
|
+
- **SiteApiService**: Service for site-related API operations.
|
|
200
|
+
- **BuildingApiService**: Service for building-related API operations.
|
|
201
|
+
- **LevelApiService**: Service for level-related API operations.
|
|
202
|
+
- **ClientApiService**: Service for client-related API operations.
|
|
203
|
+
- **SdkApiService**: Service for SDK configuration-related API operations.
|
|
204
|
+
|
|
205
|
+
#### Data Transfer Objects (DTOs)
|
|
206
|
+
|
|
207
|
+
DTOs are used to represent data structures:
|
|
208
|
+
|
|
209
|
+
- **SiteDTO**: Represents a site
|
|
210
|
+
- **BuildingDTO**: Represents a building
|
|
211
|
+
- **LevelDTO**: Represents a level
|
|
212
|
+
- **ClientMetadataDTO**: Represents client metadata
|
|
213
|
+
- **SdkConfigurationDTO**: Represents an SDK configuration
|
|
214
|
+
- **CreateResponseDTO**: Represents a create response
|
|
215
|
+
- **GpsGeofenceDTO**: Represents a GPS geofence
|
|
216
|
+
|
|
217
|
+
### Testing
|
|
218
|
+
|
|
219
|
+
The library uses pytest for testing. To run the tests:
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
pytest
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
To run tests with coverage:
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
pytest --cov=pointr_cloud_common
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
To generate a coverage report:
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
pytest --cov=pointr_cloud_common --cov-report=html
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### Adding New Features
|
|
238
|
+
|
|
239
|
+
1. **Create a new branch**:
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
git checkout -b feature/your-feature-name
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
2. **Implement your changes**:
|
|
246
|
+
|
|
247
|
+
- Add new services in the appropriate `api/` directory
|
|
248
|
+
- Add new DTOs in the appropriate `dto/` directory
|
|
249
|
+
- Add utility functions in the `utils/` directory
|
|
250
|
+
- Add helper functions in the `helpers/` directory
|
|
251
|
+
|
|
252
|
+
3. **Add tests**:
|
|
253
|
+
|
|
254
|
+
- Add unit tests in the `tests/` directory
|
|
255
|
+
- Ensure all new code is covered by tests
|
|
256
|
+
|
|
257
|
+
4. **Update documentation**:
|
|
258
|
+
|
|
259
|
+
- Update the user guide in `USAGE.md`
|
|
260
|
+
|
|
261
|
+
5. **Submit a pull request**:
|
|
262
|
+
- Push your branch to the repository
|
|
263
|
+
- Create a pull request with a clear description of your changes
|
|
264
|
+
|
|
265
|
+
### Code Style
|
|
266
|
+
|
|
267
|
+
This project follows the [PEP 8](https://www.python.org/dev/peps/pep-0008/) style guide. We recommend using tools like `flake8` and `black` to ensure code quality:
|
|
268
|
+
|
|
269
|
+
```bash
|
|
270
|
+
# Check code style
|
|
271
|
+
flake8 src tests
|
|
272
|
+
|
|
273
|
+
# Format code
|
|
274
|
+
black src tests
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
### Documentation Guidelines
|
|
278
|
+
|
|
279
|
+
- Use docstrings for all modules, classes, and functions
|
|
280
|
+
- Follow the [Google Python Style Guide](https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings) for docstrings
|
|
281
|
+
- Keep the user guide up-to-date with any changes
|
|
282
|
+
- Add examples for new features
|
|
283
|
+
|
|
284
|
+
### Release Process
|
|
285
|
+
|
|
286
|
+
1. **Update version**:
|
|
287
|
+
|
|
288
|
+
- Update the version in `pyproject.toml`
|
|
289
|
+
- Update the version in `src/pointr_cloud_common/__init__.py`
|
|
290
|
+
|
|
291
|
+
2. **Update changelog**:
|
|
292
|
+
|
|
293
|
+
- Add a new section to the changelog with the new version
|
|
294
|
+
- List all changes, new features, bug fixes, etc.
|
|
295
|
+
|
|
296
|
+
3. **Create a release branch**:
|
|
297
|
+
|
|
298
|
+
```bash
|
|
299
|
+
git checkout -b release/vX.Y.Z
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
4. **Build and test the package**:
|
|
303
|
+
|
|
304
|
+
```bash
|
|
305
|
+
python -m build
|
|
306
|
+
uv pip install dist/pointr_cloud_common-X.Y.Z-py3-none-any.whl
|
|
307
|
+
# Run tests to ensure the package works
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
5. **Submit a pull request**:
|
|
311
|
+
|
|
312
|
+
- Push your branch to the repository
|
|
313
|
+
- Create a pull request with a clear description of the release
|
|
314
|
+
|
|
315
|
+
6. **Deployment**:
|
|
316
|
+
- The package is deployed via a manual workflow in the deployment repository
|
|
317
|
+
- Contact the DevOps team to trigger the deployment workflow after your PR is merged
|
|
318
|
+
- The workflow will handle building, testing, and publishing the package to the internal PyPI server
|
|
319
|
+
- For public releases, additional approval is required
|
|
320
|
+
|
|
321
|
+
### Continuous Integration
|
|
322
|
+
|
|
323
|
+
This project uses GitHub Actions for continuous integration. The CI pipeline runs on every pull request and includes:
|
|
324
|
+
|
|
325
|
+
- Running tests
|
|
326
|
+
- Checking code style
|
|
327
|
+
- Building the package
|
|
328
|
+
- Generating coverage reports
|
|
329
|
+
|
|
330
|
+
### License
|
|
331
|
+
|
|
332
|
+
This project is proprietary software and is the intellectual property of Pointr Limited. All rights reserved. This repository is intended for internal development and authorized external distribution only. Do not use, modify, or distribute this software unless you are an employee of Pointr or have received explicit permission to do so.
|
|
333
|
+
|
|
334
|
+
See [LICENSE-PROPRIETARY.md](./LICENSE-PROPRIETARY.md) for license details.
|
|
335
|
+
|
|
336
|
+
### Contact
|
|
337
|
+
|
|
338
|
+
If you have any questions or need help, please contact the maintainers:
|
|
339
|
+
|
|
340
|
+
- Serhat Gürgenyatağı - [serhat.gurgenyatagi@pointr.tech](mailto:serhat.gurgenyatagi@pointr.tech)
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
# Pointr Cloud Commons [](https://badge.fury.io/py/pointr-cloud-common) [](https://pypi.org/project/pointr-cloud-common/)
|
|
2
|
+
|
|
3
|
+
A Python package for interacting with Pointr Cloud APIs, providing services for managing sites, buildings, levels, and SDK configurations.
|
|
4
|
+
|
|
5
|
+
## For Users
|
|
6
|
+
|
|
7
|
+
If you're looking to use this library, please refer to the [Usage Guide](./USAGE.md) for detailed instructions and examples.
|
|
8
|
+
|
|
9
|
+
## For Developers
|
|
10
|
+
|
|
11
|
+
This section is for developers who want to contribute to the Pointr Cloud Commons library.
|
|
12
|
+
|
|
13
|
+
### Development Setup
|
|
14
|
+
|
|
15
|
+
1. Clone the repository:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
git clone https://github.com/pointrlabs/ptr-swdel-internal-util-automation
|
|
19
|
+
cd PointrCloudCommon
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
2. Create a virtual environment:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
python -m venv venv
|
|
26
|
+
source venv/bin/activate # On Windows: venv\Scripts\activate
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
3. Install development dependencies using UV:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
uv pip install -e ".[dev]"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Project Structure
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
pointr-cloud-common/
|
|
39
|
+
├── src/ # Source code
|
|
40
|
+
│ └── pointr_cloud_common/
|
|
41
|
+
│ ├── __init__.py # Package initialization
|
|
42
|
+
│ ├── api/ # API services
|
|
43
|
+
│ │ ├── __init__.py
|
|
44
|
+
│ │ ├── common/ # Common API functionality
|
|
45
|
+
│ │ ├── v8/ # V8 API services
|
|
46
|
+
│ │ └── v9/ # V9 API services
|
|
47
|
+
│ ├── dto/ # Data Transfer Objects
|
|
48
|
+
│ │ ├── __init__.py
|
|
49
|
+
│ │ ├── common/ # Common DTOs
|
|
50
|
+
│ │ ├── v8/ # V8 DTOs
|
|
51
|
+
│ │ └── v9/ # V9 DTOs
|
|
52
|
+
│ ├── utils/ # Utility functions
|
|
53
|
+
│ │ └── __init__.py
|
|
54
|
+
│ └── helpers/ # Helper functions
|
|
55
|
+
│ └── __init__.py
|
|
56
|
+
├── tests/ # Test suite
|
|
57
|
+
│ ├── __init__.py
|
|
58
|
+
│ ├── test_dto/ # DTO tests
|
|
59
|
+
│ └── test_utils/ # Utility tests
|
|
60
|
+
├── pyproject.toml # Project configuration
|
|
61
|
+
├── README.md # This file
|
|
62
|
+
├── USAGE.md # User guide
|
|
63
|
+
└── LICENSE-PROPRIETARY.md # License file
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Key Components
|
|
67
|
+
|
|
68
|
+
#### API Services
|
|
69
|
+
|
|
70
|
+
The library is organized into several services, each responsible for a specific area of functionality:
|
|
71
|
+
|
|
72
|
+
- **V9ApiService**: The main service for V9 API that provides access to all other V9 services. It handles authentication and API requests.
|
|
73
|
+
- **SiteApiService**: Service for site-related API operations.
|
|
74
|
+
- **BuildingApiService**: Service for building-related API operations.
|
|
75
|
+
- **LevelApiService**: Service for level-related API operations.
|
|
76
|
+
- **ClientApiService**: Service for client-related API operations.
|
|
77
|
+
- **SdkApiService**: Service for SDK configuration-related API operations.
|
|
78
|
+
|
|
79
|
+
#### Data Transfer Objects (DTOs)
|
|
80
|
+
|
|
81
|
+
DTOs are used to represent data structures:
|
|
82
|
+
|
|
83
|
+
- **SiteDTO**: Represents a site
|
|
84
|
+
- **BuildingDTO**: Represents a building
|
|
85
|
+
- **LevelDTO**: Represents a level
|
|
86
|
+
- **ClientMetadataDTO**: Represents client metadata
|
|
87
|
+
- **SdkConfigurationDTO**: Represents an SDK configuration
|
|
88
|
+
- **CreateResponseDTO**: Represents a create response
|
|
89
|
+
- **GpsGeofenceDTO**: Represents a GPS geofence
|
|
90
|
+
|
|
91
|
+
### Testing
|
|
92
|
+
|
|
93
|
+
The library uses pytest for testing. To run the tests:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
pytest
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
To run tests with coverage:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
pytest --cov=pointr_cloud_common
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
To generate a coverage report:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
pytest --cov=pointr_cloud_common --cov-report=html
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Adding New Features
|
|
112
|
+
|
|
113
|
+
1. **Create a new branch**:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
git checkout -b feature/your-feature-name
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
2. **Implement your changes**:
|
|
120
|
+
|
|
121
|
+
- Add new services in the appropriate `api/` directory
|
|
122
|
+
- Add new DTOs in the appropriate `dto/` directory
|
|
123
|
+
- Add utility functions in the `utils/` directory
|
|
124
|
+
- Add helper functions in the `helpers/` directory
|
|
125
|
+
|
|
126
|
+
3. **Add tests**:
|
|
127
|
+
|
|
128
|
+
- Add unit tests in the `tests/` directory
|
|
129
|
+
- Ensure all new code is covered by tests
|
|
130
|
+
|
|
131
|
+
4. **Update documentation**:
|
|
132
|
+
|
|
133
|
+
- Update the user guide in `USAGE.md`
|
|
134
|
+
|
|
135
|
+
5. **Submit a pull request**:
|
|
136
|
+
- Push your branch to the repository
|
|
137
|
+
- Create a pull request with a clear description of your changes
|
|
138
|
+
|
|
139
|
+
### Code Style
|
|
140
|
+
|
|
141
|
+
This project follows the [PEP 8](https://www.python.org/dev/peps/pep-0008/) style guide. We recommend using tools like `flake8` and `black` to ensure code quality:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
# Check code style
|
|
145
|
+
flake8 src tests
|
|
146
|
+
|
|
147
|
+
# Format code
|
|
148
|
+
black src tests
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Documentation Guidelines
|
|
152
|
+
|
|
153
|
+
- Use docstrings for all modules, classes, and functions
|
|
154
|
+
- Follow the [Google Python Style Guide](https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings) for docstrings
|
|
155
|
+
- Keep the user guide up-to-date with any changes
|
|
156
|
+
- Add examples for new features
|
|
157
|
+
|
|
158
|
+
### Release Process
|
|
159
|
+
|
|
160
|
+
1. **Update version**:
|
|
161
|
+
|
|
162
|
+
- Update the version in `pyproject.toml`
|
|
163
|
+
- Update the version in `src/pointr_cloud_common/__init__.py`
|
|
164
|
+
|
|
165
|
+
2. **Update changelog**:
|
|
166
|
+
|
|
167
|
+
- Add a new section to the changelog with the new version
|
|
168
|
+
- List all changes, new features, bug fixes, etc.
|
|
169
|
+
|
|
170
|
+
3. **Create a release branch**:
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
git checkout -b release/vX.Y.Z
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
4. **Build and test the package**:
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
python -m build
|
|
180
|
+
uv pip install dist/pointr_cloud_common-X.Y.Z-py3-none-any.whl
|
|
181
|
+
# Run tests to ensure the package works
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
5. **Submit a pull request**:
|
|
185
|
+
|
|
186
|
+
- Push your branch to the repository
|
|
187
|
+
- Create a pull request with a clear description of the release
|
|
188
|
+
|
|
189
|
+
6. **Deployment**:
|
|
190
|
+
- The package is deployed via a manual workflow in the deployment repository
|
|
191
|
+
- Contact the DevOps team to trigger the deployment workflow after your PR is merged
|
|
192
|
+
- The workflow will handle building, testing, and publishing the package to the internal PyPI server
|
|
193
|
+
- For public releases, additional approval is required
|
|
194
|
+
|
|
195
|
+
### Continuous Integration
|
|
196
|
+
|
|
197
|
+
This project uses GitHub Actions for continuous integration. The CI pipeline runs on every pull request and includes:
|
|
198
|
+
|
|
199
|
+
- Running tests
|
|
200
|
+
- Checking code style
|
|
201
|
+
- Building the package
|
|
202
|
+
- Generating coverage reports
|
|
203
|
+
|
|
204
|
+
### License
|
|
205
|
+
|
|
206
|
+
This project is proprietary software and is the intellectual property of Pointr Limited. All rights reserved. This repository is intended for internal development and authorized external distribution only. Do not use, modify, or distribute this software unless you are an employee of Pointr or have received explicit permission to do so.
|
|
207
|
+
|
|
208
|
+
See [LICENSE-PROPRIETARY.md](./LICENSE-PROPRIETARY.md) for license details.
|
|
209
|
+
|
|
210
|
+
### Contact
|
|
211
|
+
|
|
212
|
+
If you have any questions or need help, please contact the maintainers:
|
|
213
|
+
|
|
214
|
+
- Serhat Gürgenyatağı - [serhat.gurgenyatagi@pointr.tech](mailto:serhat.gurgenyatagi@pointr.tech)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "pointr-cloud-common"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Common utilities and DTOs shared across PointrCloud apps"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
authors = [
|
|
7
|
+
{name = "Serhat Gürgenyatağı", email = "serhat.gurgenyatagi@pointr.tech"},
|
|
8
|
+
]
|
|
9
|
+
license = {file = "LICENSE-PROPRIETARY.md"}
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
classifiers = [
|
|
12
|
+
"Programming Language :: Python :: 3",
|
|
13
|
+
"Programming Language :: Python :: 3.9",
|
|
14
|
+
"Programming Language :: Python :: 3.10",
|
|
15
|
+
"License :: Other/Proprietary License",
|
|
16
|
+
"Operating System :: OS Independent",
|
|
17
|
+
"Intended Audience :: Developers",
|
|
18
|
+
"Development Status :: 4 - Beta",
|
|
19
|
+
"Topic :: Software Development :: Libraries",
|
|
20
|
+
]
|
|
21
|
+
dependencies = [
|
|
22
|
+
"requests>=2.25.0",
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
[project.urls]
|
|
26
|
+
Homepage = "https://github.com/pointrlabs/ptr-swdel-internal-util-automation/PointrCloudCommon"
|
|
27
|
+
"Bug Tracker" = "https://github.com/pointrlabs/ptr-swdel-internal-util-automation/PointrCloudCommon/issues"
|
|
28
|
+
|
|
29
|
+
[tool.setuptools]
|
|
30
|
+
package-dir = {"" = "src"}
|
|
31
|
+
|
|
32
|
+
[tool.setuptools.packages.find]
|
|
33
|
+
where = ["src"]
|