technicallyfit 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.
Files changed (28) hide show
  1. technicallyfit-0.1.0/.gitignore +117 -0
  2. technicallyfit-0.1.0/LICENSE +21 -0
  3. technicallyfit-0.1.0/PKG-INFO +72 -0
  4. technicallyfit-0.1.0/README.md +50 -0
  5. technicallyfit-0.1.0/pyproject.toml +37 -0
  6. technicallyfit-0.1.0/src/technicallyfit/__init__.py +179 -0
  7. technicallyfit-0.1.0/src/technicallyfit/_generated/__init__.py +3 -0
  8. technicallyfit-0.1.0/src/technicallyfit/_generated/live_rules.py +592 -0
  9. technicallyfit-0.1.0/src/technicallyfit/_generated/models.py +2893 -0
  10. technicallyfit-0.1.0/src/technicallyfit/_generated/observation.py +161 -0
  11. technicallyfit-0.1.0/src/technicallyfit/_generated/operations.py +1124 -0
  12. technicallyfit-0.1.0/src/technicallyfit/_generated/protocols.py +136 -0
  13. technicallyfit-0.1.0/src/technicallyfit/_generated/registry.py +1077 -0
  14. technicallyfit-0.1.0/src/technicallyfit/_generated/spec.py +678 -0
  15. technicallyfit-0.1.0/src/technicallyfit/_generated/version.py +4 -0
  16. technicallyfit-0.1.0/src/technicallyfit/_transport.py +49 -0
  17. technicallyfit-0.1.0/src/technicallyfit/attestations.py +269 -0
  18. technicallyfit-0.1.0/src/technicallyfit/client.py +260 -0
  19. technicallyfit-0.1.0/src/technicallyfit/errors.py +175 -0
  20. technicallyfit-0.1.0/src/technicallyfit/events.py +283 -0
  21. technicallyfit-0.1.0/src/technicallyfit/live.py +272 -0
  22. technicallyfit-0.1.0/src/technicallyfit/live_rules.py +478 -0
  23. technicallyfit-0.1.0/src/technicallyfit/observations.py +515 -0
  24. technicallyfit-0.1.0/src/technicallyfit/offline_queue.py +100 -0
  25. technicallyfit-0.1.0/src/technicallyfit/py.typed +0 -0
  26. technicallyfit-0.1.0/src/technicallyfit/retry.py +92 -0
  27. technicallyfit-0.1.0/src/technicallyfit/sign_in.py +226 -0
  28. technicallyfit-0.1.0/src/technicallyfit/webhooks.py +104 -0
@@ -0,0 +1,117 @@
1
+ # Dependencies
2
+ node_modules/
3
+ __pycache__/
4
+ *.pyc
5
+ .venv/
6
+ venv/
7
+ *.egg-info/
8
+ dist/
9
+ build/
10
+
11
+ # Environment
12
+ .env
13
+ .env.local
14
+ .env.*.local
15
+
16
+ # IDE
17
+ .vscode/
18
+ .idea/
19
+ *.swp
20
+ *.swo
21
+ .DS_Store
22
+
23
+ # Next.js
24
+ .next/
25
+ out/
26
+ *.tsbuildinfo
27
+
28
+ # Expo
29
+ .expo/
30
+
31
+ # Tools / scratch workspace. tools/engine-lab is the one tracked folder: the
32
+ # vendored, read-only engine lab reference (API-1087).
33
+ tools/*
34
+ !tools/engine-lab/
35
+
36
+ # Archive
37
+ archive/
38
+
39
+ # Python
40
+ *.so
41
+ *.pyd
42
+ pip-log.txt
43
+
44
+ # Solver artifacts
45
+ *.mps
46
+ *.sol
47
+ *.lp
48
+
49
+ # Temporary
50
+ *.tmp
51
+ *.log
52
+
53
+ # Caches
54
+ .pytest_cache/
55
+ # Turborepo local cache, run summaries and per-package task logs (API-1176)
56
+ .turbo/
57
+
58
+ # Build outputs
59
+ dist/
60
+
61
+ # Claude: local state stays out, tracked project skills stay in
62
+ .claude/*
63
+ !.claude/skills
64
+ # API-3070: the shared project hooks (the Python freeze); personal settings stay in settings.local.json
65
+ !.claude/settings.json
66
+
67
+ # Deprecated
68
+ _deprecated/
69
+
70
+ # Local SQLite databases (e.g. apps/api/tfit_demo.db)
71
+ *.db
72
+ *.sqlite
73
+ *.sqlite3
74
+
75
+ # Test / E2E artifacts
76
+ test-results/
77
+ playwright-report/
78
+ storybook-static/
79
+ apps/web/storybook-static/
80
+
81
+ # Generated screenshots
82
+ .screenshots/
83
+
84
+ # Local scratch / experiments
85
+ playground/
86
+ tmp/
87
+
88
+ # Grant-application docs — not part of the codebase
89
+ grants/
90
+
91
+ # Scraped lead data (contains PII)
92
+ leads/
93
+ # API-2431: the coach Leads area is code, not lead data.
94
+ !apps/web/src/app/coach/leads/
95
+ !apps/web/src/components/coach/leads/
96
+
97
+ # local sqlite backups
98
+ apps/api/*.db.bak-*
99
+ artifacts/
100
+
101
+ # Local product-demo sandbox (not part of the product)
102
+ technicallyfit-product-demo/
103
+
104
+ # A local venv symlink is not a directory; the slash form above misses it.
105
+ .venv
106
+
107
+ # Local Claude model verification transcripts (API-847)
108
+ .vera-harness/
109
+
110
+ # Local per-worker engine route inventory evidence (API-2004).
111
+ /.engine-route-trace/
112
+
113
+ # Legacy checkout-local pytest-testmon records. Shared records live under .git.
114
+ .testmondata*
115
+
116
+ # Test result ledger in CI (API-3082); locally it lives under the Git common dir.
117
+ .tfit-test-cache/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 TechnicallyFit Dynamics Inc.
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,72 @@
1
+ Metadata-Version: 2.5
2
+ Name: technicallyfit
3
+ Version: 0.1.0
4
+ Summary: Python client for the TechnicallyFit API: typed calls generated from the public OpenAPI spec, plus observation builders, retries, offline batching, typed errors, teammate sign-in and webhook verification.
5
+ Project-URL: Homepage, https://docs.technicallyfit.com
6
+ Project-URL: Documentation, https://docs.technicallyfit.com/sdks/python
7
+ Author: TechnicallyFit Dynamics Inc.
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Keywords: api,fitness,openapi,sdk,technicallyfit,training
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3 :: Only
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
17
+ Classifier: Typing :: Typed
18
+ Requires-Python: >=3.11
19
+ Provides-Extra: live
20
+ Requires-Dist: websockets>=12.0; extra == 'live'
21
+ Description-Content-Type: text/markdown
22
+
23
+ # technicallyfit
24
+
25
+ The official Python client for the [TechnicallyFit API](https://docs.technicallyfit.com).
26
+ Python 3.11 and newer, standard library only.
27
+
28
+ - A method for every public `/v1` operation, typed with `TypedDict`s generated from the
29
+ public OpenAPI spec.
30
+ - Retries that honor `Retry-After` and the rate-limit headers, and reuse idempotency keys.
31
+ - One typed error per error code.
32
+ - Observation builders checked against `observation/1` and the quantity registry.
33
+ - An offline queue that sends each event once.
34
+ - Teammate sign-in for member apps, with a refreshing credential.
35
+ - Webhook signature verification.
36
+
37
+ ## Install
38
+
39
+ ```bash
40
+ pip install technicallyfit
41
+ ```
42
+
43
+ ## First call
44
+
45
+ ```python
46
+ import os
47
+
48
+ from technicallyfit import Client
49
+
50
+ tf = Client(os.environ["TF_API_KEY"])
51
+
52
+ organization = tf.get_organization()
53
+ print(organization["name"])
54
+ ```
55
+
56
+ The first argument is an organization key (`tf_test_...` or `tf_live_...`), a teammate
57
+ token, or a function that returns one. `base_url` defaults to the production API.
58
+
59
+ Organization keys read and write every teammate of your organization: keep them on your
60
+ servers. In an app on a person's device, sign the person in and use a teammate token instead.
61
+
62
+ ## Documentation
63
+
64
+ - [Python SDK guide](https://docs.technicallyfit.com/sdks/python)
65
+ - [Observation builders](https://docs.technicallyfit.com/sdks/observation-builders)
66
+ - [Offline batching](https://docs.technicallyfit.com/sdks/offline-batching)
67
+ - [Webhook verification](https://docs.technicallyfit.com/sdks/webhook-verification)
68
+ - [Error codes](https://docs.technicallyfit.com/guides/errors)
69
+
70
+ ## License
71
+
72
+ MIT. The full text is in the `LICENSE` file that ships with this package.
@@ -0,0 +1,50 @@
1
+ # technicallyfit
2
+
3
+ The official Python client for the [TechnicallyFit API](https://docs.technicallyfit.com).
4
+ Python 3.11 and newer, standard library only.
5
+
6
+ - A method for every public `/v1` operation, typed with `TypedDict`s generated from the
7
+ public OpenAPI spec.
8
+ - Retries that honor `Retry-After` and the rate-limit headers, and reuse idempotency keys.
9
+ - One typed error per error code.
10
+ - Observation builders checked against `observation/1` and the quantity registry.
11
+ - An offline queue that sends each event once.
12
+ - Teammate sign-in for member apps, with a refreshing credential.
13
+ - Webhook signature verification.
14
+
15
+ ## Install
16
+
17
+ ```bash
18
+ pip install technicallyfit
19
+ ```
20
+
21
+ ## First call
22
+
23
+ ```python
24
+ import os
25
+
26
+ from technicallyfit import Client
27
+
28
+ tf = Client(os.environ["TF_API_KEY"])
29
+
30
+ organization = tf.get_organization()
31
+ print(organization["name"])
32
+ ```
33
+
34
+ The first argument is an organization key (`tf_test_...` or `tf_live_...`), a teammate
35
+ token, or a function that returns one. `base_url` defaults to the production API.
36
+
37
+ Organization keys read and write every teammate of your organization: keep them on your
38
+ servers. In an app on a person's device, sign the person in and use a teammate token instead.
39
+
40
+ ## Documentation
41
+
42
+ - [Python SDK guide](https://docs.technicallyfit.com/sdks/python)
43
+ - [Observation builders](https://docs.technicallyfit.com/sdks/observation-builders)
44
+ - [Offline batching](https://docs.technicallyfit.com/sdks/offline-batching)
45
+ - [Webhook verification](https://docs.technicallyfit.com/sdks/webhook-verification)
46
+ - [Error codes](https://docs.technicallyfit.com/guides/errors)
47
+
48
+ ## License
49
+
50
+ MIT. The full text is in the `LICENSE` file that ships with this package.
@@ -0,0 +1,37 @@
1
+ [build-system]
2
+ requires = ["hatchling>=1.27"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "technicallyfit"
7
+ version = "0.1.0"
8
+ description = "Python client for the TechnicallyFit API: typed calls generated from the public OpenAPI spec, plus observation builders, retries, offline batching, typed errors, teammate sign-in and webhook verification."
9
+ readme = "README.md"
10
+ requires-python = ">=3.11"
11
+ license = "MIT"
12
+ license-files = ["LICENSE"]
13
+ authors = [{ name = "TechnicallyFit Dynamics Inc." }]
14
+ keywords = ["technicallyfit", "fitness", "training", "api", "sdk", "openapi"]
15
+ dependencies = []
16
+ classifiers = [
17
+ "Intended Audience :: Developers",
18
+ "Operating System :: OS Independent",
19
+ "Programming Language :: Python :: 3",
20
+ "Programming Language :: Python :: 3 :: Only",
21
+ "Programming Language :: Python :: 3.11",
22
+ "Topic :: Software Development :: Libraries :: Python Modules",
23
+ "Typing :: Typed",
24
+ ]
25
+
26
+ [project.optional-dependencies]
27
+ live = ["websockets>=12.0"]
28
+
29
+ [project.urls]
30
+ Homepage = "https://docs.technicallyfit.com"
31
+ Documentation = "https://docs.technicallyfit.com/sdks/python"
32
+
33
+ [tool.hatch.build.targets.wheel]
34
+ packages = ["src/technicallyfit"]
35
+
36
+ [tool.hatch.build.targets.sdist]
37
+ include = ["src/technicallyfit", "README.md", "LICENSE", "pyproject.toml"]
@@ -0,0 +1,179 @@
1
+ """The TechnicallyFit API client for Python.
2
+
3
+ Typed calls generated from the public OpenAPI spec, plus observation builders, retries that
4
+ honor Retry-After, offline batching, typed errors, teammate sign-in and webhook
5
+ verification. Organization keys belong on your servers only.
6
+ """
7
+
8
+ from ._generated.spec import (
9
+ DEFAULT_BASE_URL,
10
+ ERROR_CODES,
11
+ EVENT_REJECTION_CODES,
12
+ EVENT_TYPES,
13
+ MAX_EVENTS_PER_BULK_REQUEST,
14
+ MAX_EVENTS_PER_TEAMMATE_REQUEST,
15
+ SERVERS,
16
+ TEAMMATE_TOKEN_SCOPES,
17
+ )
18
+ from ._generated.version import SDK_VERSION
19
+ from ._transport import HttpResponse, Transport, urllib_transport
20
+ from .client import Client, Credential, TokenCredential
21
+ from .errors import (
22
+ ERROR_CLASSES,
23
+ AttestorNotApprovedError,
24
+ ConfigurationError,
25
+ ConflictError,
26
+ ConnectionError,
27
+ ConsentRequiredError,
28
+ EngineUnavailableError,
29
+ ForbiddenError,
30
+ InternalError,
31
+ InvalidRequestError,
32
+ NotFoundError,
33
+ ObservationIssue,
34
+ ObservationValidationError,
35
+ PayloadTooLargeError,
36
+ PlanRequiredError,
37
+ RateLimitError,
38
+ RateLimitInfo,
39
+ RedirectRefusedError,
40
+ TeammateSignedOutError,
41
+ TeammateSignInError,
42
+ TechnicallyFitError,
43
+ UnauthorizedError,
44
+ ValidationFailedError,
45
+ error_for,
46
+ )
47
+ from .events import MAX_REQUEST_BYTES, check_event, chunk_events, event, with_idempotency_key
48
+ from .live import (
49
+ LiveBatchAck,
50
+ LiveCloseResult,
51
+ LiveCueEvent,
52
+ LiveSession,
53
+ LiveSessionError,
54
+ open_live_session,
55
+ )
56
+ from .live_rules import (
57
+ LIVE_CUE_RULE_JSON_SCHEMA,
58
+ LIVE_CUE_RULES,
59
+ LIVE_RULE_PRESETS,
60
+ LIVE_RULES_VERSION,
61
+ SESSION_ADAPTATION_CAP,
62
+ STREAM_REDUCER_JSON_SCHEMA,
63
+ STREAM_REDUCERS,
64
+ TRIGGER_RULE_JSON_SCHEMA,
65
+ CueEvaluationResult,
66
+ EvaluationResult,
67
+ EvaluatorState,
68
+ MovementDerivedState,
69
+ ReducedSummary,
70
+ evaluate_cue_rule,
71
+ evaluate_rule,
72
+ reduce_stream,
73
+ )
74
+ from .observations import ObservationCheck, measurement, observation_instant, read_quantity, resolve_quantity, self_report, validate_observation
75
+ from .offline_queue import FlushResult, MemoryStorage, OfflineQueue, OfflineStorage
76
+ from .retry import RetryOptions
77
+ from .sign_in import (
78
+ PendingSignIn,
79
+ RefreshingTeammateCredential,
80
+ TeammateSignInConfig,
81
+ TeammateTokens,
82
+ begin_teammate_sign_in,
83
+ complete_teammate_sign_in,
84
+ create_pkce,
85
+ )
86
+ from .webhooks import WebhookVerificationError, verify_webhook, verify_webhook_signature
87
+
88
+ __version__ = SDK_VERSION
89
+
90
+ __all__ = [
91
+ "DEFAULT_BASE_URL",
92
+ "ERROR_CLASSES",
93
+ "ERROR_CODES",
94
+ "EVENT_REJECTION_CODES",
95
+ "EVENT_TYPES",
96
+ "LIVE_CUE_RULES",
97
+ "LIVE_CUE_RULE_JSON_SCHEMA",
98
+ "LIVE_RULES_VERSION",
99
+ "LIVE_RULE_PRESETS",
100
+ "MAX_EVENTS_PER_BULK_REQUEST",
101
+ "MAX_EVENTS_PER_TEAMMATE_REQUEST",
102
+ "MAX_REQUEST_BYTES",
103
+ "SDK_VERSION",
104
+ "SERVERS",
105
+ "SESSION_ADAPTATION_CAP",
106
+ "STREAM_REDUCERS",
107
+ "STREAM_REDUCER_JSON_SCHEMA",
108
+ "TEAMMATE_TOKEN_SCOPES",
109
+ "TRIGGER_RULE_JSON_SCHEMA",
110
+ "AttestorNotApprovedError",
111
+ "Client",
112
+ "ConfigurationError",
113
+ "ConflictError",
114
+ "ConnectionError",
115
+ "ConsentRequiredError",
116
+ "Credential",
117
+ "CueEvaluationResult",
118
+ "EngineUnavailableError",
119
+ "EvaluationResult",
120
+ "EvaluatorState",
121
+ "FlushResult",
122
+ "ForbiddenError",
123
+ "HttpResponse",
124
+ "InternalError",
125
+ "InvalidRequestError",
126
+ "LiveBatchAck",
127
+ "LiveCloseResult",
128
+ "LiveCueEvent",
129
+ "LiveSession",
130
+ "LiveSessionError",
131
+ "MemoryStorage",
132
+ "MovementDerivedState",
133
+ "NotFoundError",
134
+ "ObservationCheck",
135
+ "ObservationIssue",
136
+ "ObservationValidationError",
137
+ "OfflineQueue",
138
+ "OfflineStorage",
139
+ "PayloadTooLargeError",
140
+ "PlanRequiredError",
141
+ "PendingSignIn",
142
+ "RateLimitError",
143
+ "RateLimitInfo",
144
+ "RedirectRefusedError",
145
+ "ReducedSummary",
146
+ "RefreshingTeammateCredential",
147
+ "RetryOptions",
148
+ "TeammateSignInConfig",
149
+ "TeammateSignInError",
150
+ "TeammateSignedOutError",
151
+ "TeammateTokens",
152
+ "TechnicallyFitError",
153
+ "TokenCredential",
154
+ "Transport",
155
+ "UnauthorizedError",
156
+ "ValidationFailedError",
157
+ "WebhookVerificationError",
158
+ "begin_teammate_sign_in",
159
+ "check_event",
160
+ "chunk_events",
161
+ "complete_teammate_sign_in",
162
+ "create_pkce",
163
+ "error_for",
164
+ "evaluate_cue_rule",
165
+ "evaluate_rule",
166
+ "reduce_stream",
167
+ "event",
168
+ "measurement",
169
+ "observation_instant",
170
+ "open_live_session",
171
+ "read_quantity",
172
+ "resolve_quantity",
173
+ "self_report",
174
+ "urllib_transport",
175
+ "validate_observation",
176
+ "verify_webhook",
177
+ "verify_webhook_signature",
178
+ "with_idempotency_key",
179
+ ]
@@ -0,0 +1,3 @@
1
+ # Generated by scripts/generate-sdks.mjs from packages/contracts/openapi.public.json.
2
+ # Do not edit by hand: run `npm run sdk:generate` at the repository root.
3
+ """Generated code. Import from `technicallyfit` instead."""