triplicity-backend 1.0.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 (26) hide show
  1. triplicity_backend-1.0.0/.gitignore +5 -0
  2. triplicity_backend-1.0.0/LICENSE.txt +21 -0
  3. triplicity_backend-1.0.0/PKG-INFO +55 -0
  4. triplicity_backend-1.0.0/README.md +39 -0
  5. triplicity_backend-1.0.0/generated/triplicity_backend_wire/__init__.py +64 -0
  6. triplicity_backend-1.0.0/generated/triplicity_backend_wire/api/__init__.py +5 -0
  7. triplicity_backend-1.0.0/generated/triplicity_backend_wire/api/backend_api.py +634 -0
  8. triplicity_backend-1.0.0/generated/triplicity_backend_wire/api_client.py +865 -0
  9. triplicity_backend-1.0.0/generated/triplicity_backend_wire/api_response.py +21 -0
  10. triplicity_backend-1.0.0/generated/triplicity_backend_wire/configuration.py +654 -0
  11. triplicity_backend-1.0.0/generated/triplicity_backend_wire/exceptions.py +218 -0
  12. triplicity_backend-1.0.0/generated/triplicity_backend_wire/models/__init__.py +24 -0
  13. triplicity_backend-1.0.0/generated/triplicity_backend_wire/models/activity_event.py +201 -0
  14. triplicity_backend-1.0.0/generated/triplicity_backend_wire/models/activity_receipt.py +98 -0
  15. triplicity_backend-1.0.0/generated/triplicity_backend_wire/models/api_error.py +88 -0
  16. triplicity_backend-1.0.0/generated/triplicity_backend_wire/models/authentication_details.py +119 -0
  17. triplicity_backend-1.0.0/generated/triplicity_backend_wire/models/backend_request_context.py +127 -0
  18. triplicity_backend-1.0.0/generated/triplicity_backend_wire/models/create_visit_request.py +108 -0
  19. triplicity_backend-1.0.0/generated/triplicity_backend_wire/models/request_metadata.py +133 -0
  20. triplicity_backend-1.0.0/generated/triplicity_backend_wire/models/visit_result.py +146 -0
  21. triplicity_backend-1.0.0/generated/triplicity_backend_wire/py.typed +0 -0
  22. triplicity_backend-1.0.0/generated/triplicity_backend_wire/rest.py +334 -0
  23. triplicity_backend-1.0.0/pyproject.toml +37 -0
  24. triplicity_backend-1.0.0/triplicity_backend/__init__.py +5 -0
  25. triplicity_backend-1.0.0/triplicity_backend/client.py +172 -0
  26. triplicity_backend-1.0.0/triplicity_backend/py.typed +1 -0
@@ -0,0 +1,5 @@
1
+ .venv/
2
+ __pycache__/
3
+ *.pyc
4
+ *.egg-info/
5
+ dist/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 IATFusion
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,55 @@
1
+ Metadata-Version: 2.4
2
+ Name: triplicity-backend
3
+ Version: 1.0.0
4
+ Summary: Triplicity server-side visit and activity reporting
5
+ Author: IATFusion
6
+ License-Expression: MIT
7
+ License-File: LICENSE.txt
8
+ Classifier: Programming Language :: Python :: 3 :: Only
9
+ Classifier: Typing :: Typed
10
+ Requires-Python: >=3.11
11
+ Requires-Dist: pydantic<3,>=2.12
12
+ Requires-Dist: python-dateutil<3,>=2.8.2
13
+ Requires-Dist: typing-extensions<5,>=4.7.1
14
+ Requires-Dist: urllib3<3,>=2.7
15
+ Description-Content-Type: text/markdown
16
+
17
+ # Triplicity backend SDK for Python
18
+
19
+ Install the synchronous SDK into the virtual environment for your Python 3.11+
20
+ reporting service. Anyone can install the package from PyPI.
21
+
22
+ ```sh
23
+ pip install triplicity-backend
24
+ ```
25
+
26
+ Reporting requires a private server token for your tenant. Set the variables
27
+ below on your server. Use the collector's HTTPS base URL ending in `/v1/`
28
+ for `TRIPLICITY_ENDPOINT`. Call `record_activity()` after your application
29
+ has determined the outcome.
30
+
31
+ ```python
32
+ import os
33
+ from triplicity_backend import TriplicityClient
34
+
35
+ with TriplicityClient(
36
+ endpoint=os.environ["TRIPLICITY_ENDPOINT"], # HTTPS URL ending in /v1/
37
+ tenant_ref=os.environ["TRIPLICITY_TENANT"],
38
+ server_token=os.environ["TRIPLICITY_SERVER_TOKEN"],
39
+ ) as client:
40
+ visit = client.create_visit()
41
+ receipt = client.record_activity(visit.visit_ref, action="login", outcome="success")
42
+ ```
43
+
44
+ The client makes one visit creation attempt and
45
+ can repeat an activity once after a transport failure, timeout, or server error.
46
+ For subsequent application-managed retries, supply the same event ID, timestamp
47
+ and activity details while the visit is active. `TriplicityError` exposes
48
+ `kind`, HTTP `status` and the optional raw `retry_after` header. Avoid logging
49
+ credentials and payloads.
50
+
51
+ ## Release notes
52
+
53
+ Version 1.0.0 is the first public Python release. It supports backend
54
+ OpenAPI contract 1.1.0, activity payloads 1.0 and 1.1, and collector
55
+ v1.4.0 or later. The SDK is distributed under the MIT license.
@@ -0,0 +1,39 @@
1
+ # Triplicity backend SDK for Python
2
+
3
+ Install the synchronous SDK into the virtual environment for your Python 3.11+
4
+ reporting service. Anyone can install the package from PyPI.
5
+
6
+ ```sh
7
+ pip install triplicity-backend
8
+ ```
9
+
10
+ Reporting requires a private server token for your tenant. Set the variables
11
+ below on your server. Use the collector's HTTPS base URL ending in `/v1/`
12
+ for `TRIPLICITY_ENDPOINT`. Call `record_activity()` after your application
13
+ has determined the outcome.
14
+
15
+ ```python
16
+ import os
17
+ from triplicity_backend import TriplicityClient
18
+
19
+ with TriplicityClient(
20
+ endpoint=os.environ["TRIPLICITY_ENDPOINT"], # HTTPS URL ending in /v1/
21
+ tenant_ref=os.environ["TRIPLICITY_TENANT"],
22
+ server_token=os.environ["TRIPLICITY_SERVER_TOKEN"],
23
+ ) as client:
24
+ visit = client.create_visit()
25
+ receipt = client.record_activity(visit.visit_ref, action="login", outcome="success")
26
+ ```
27
+
28
+ The client makes one visit creation attempt and
29
+ can repeat an activity once after a transport failure, timeout, or server error.
30
+ For subsequent application-managed retries, supply the same event ID, timestamp
31
+ and activity details while the visit is active. `TriplicityError` exposes
32
+ `kind`, HTTP `status` and the optional raw `retry_after` header. Avoid logging
33
+ credentials and payloads.
34
+
35
+ ## Release notes
36
+
37
+ Version 1.0.0 is the first public Python release. It supports backend
38
+ OpenAPI contract 1.1.0, activity payloads 1.0 and 1.1, and collector
39
+ v1.4.0 or later. The SDK is distributed under the MIT license.
@@ -0,0 +1,64 @@
1
+ # coding: utf-8
2
+
3
+ # flake8: noqa
4
+
5
+ """
6
+ Triplicity Backend Reporting API
7
+
8
+ Create tenant-scoped visits and report outcomes from your application server.
9
+
10
+ The version of the OpenAPI document: 1.1.0
11
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
12
+
13
+ Do not edit the class manually.
14
+ """ # noqa: E501
15
+
16
+
17
+ __version__ = "1.0.0"
18
+
19
+ # Define package exports
20
+ __all__ = [
21
+ "BackendApi",
22
+ "ApiResponse",
23
+ "ApiClient",
24
+ "Configuration",
25
+ "OpenApiException",
26
+ "ApiTypeError",
27
+ "ApiValueError",
28
+ "ApiKeyError",
29
+ "ApiAttributeError",
30
+ "ApiException",
31
+ "ActivityEvent",
32
+ "ActivityReceipt",
33
+ "ApiError",
34
+ "AuthenticationDetails",
35
+ "BackendRequestContext",
36
+ "CreateVisitRequest",
37
+ "RequestMetadata",
38
+ "VisitResult",
39
+ ]
40
+
41
+ # import apis into sdk package
42
+ from triplicity_backend_wire.api.backend_api import BackendApi as BackendApi
43
+
44
+ # import ApiClient
45
+ from triplicity_backend_wire.api_response import ApiResponse as ApiResponse
46
+ from triplicity_backend_wire.api_client import ApiClient as ApiClient
47
+ from triplicity_backend_wire.configuration import Configuration as Configuration
48
+ from triplicity_backend_wire.exceptions import OpenApiException as OpenApiException
49
+ from triplicity_backend_wire.exceptions import ApiTypeError as ApiTypeError
50
+ from triplicity_backend_wire.exceptions import ApiValueError as ApiValueError
51
+ from triplicity_backend_wire.exceptions import ApiKeyError as ApiKeyError
52
+ from triplicity_backend_wire.exceptions import ApiAttributeError as ApiAttributeError
53
+ from triplicity_backend_wire.exceptions import ApiException as ApiException
54
+
55
+ # import models into sdk package
56
+ from triplicity_backend_wire.models.activity_event import ActivityEvent as ActivityEvent
57
+ from triplicity_backend_wire.models.activity_receipt import ActivityReceipt as ActivityReceipt
58
+ from triplicity_backend_wire.models.api_error import ApiError as ApiError
59
+ from triplicity_backend_wire.models.authentication_details import AuthenticationDetails as AuthenticationDetails
60
+ from triplicity_backend_wire.models.backend_request_context import BackendRequestContext as BackendRequestContext
61
+ from triplicity_backend_wire.models.create_visit_request import CreateVisitRequest as CreateVisitRequest
62
+ from triplicity_backend_wire.models.request_metadata import RequestMetadata as RequestMetadata
63
+ from triplicity_backend_wire.models.visit_result import VisitResult as VisitResult
64
+
@@ -0,0 +1,5 @@
1
+ # flake8: noqa
2
+
3
+ # import apis into api package
4
+ from triplicity_backend_wire.api.backend_api import BackendApi
5
+