pushframe 5.0.0__py3-none-any.whl

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 (49) hide show
  1. pushframe/__init__.py +4 -0
  2. pushframe/api/__init__.py +0 -0
  3. pushframe/api/accountApi.py +72 -0
  4. pushframe/api/activityApi.py +87 -0
  5. pushframe/api/assetApi.py +194 -0
  6. pushframe/api/baseApi.py +6 -0
  7. pushframe/api/frameApi.py +271 -0
  8. pushframe/api/notificationApi.py +15 -0
  9. pushframe/api/peopleApi.py +25 -0
  10. pushframe/api/playlistApi.py +9 -0
  11. pushframe/aura.py +182 -0
  12. pushframe/aws/__init__.py +0 -0
  13. pushframe/aws/awsclient.py +23 -0
  14. pushframe/aws/s3client.py +40 -0
  15. pushframe/aws/sqsclient.py +33 -0
  16. pushframe/cache.py +50 -0
  17. pushframe/cli.py +1134 -0
  18. pushframe/client.py +267 -0
  19. pushframe/exif.py +147 -0
  20. pushframe/export.py +53 -0
  21. pushframe/google/__init__.py +43 -0
  22. pushframe/google/bootstrap.py +134 -0
  23. pushframe/google/cache.py +167 -0
  24. pushframe/google/client.py +140 -0
  25. pushframe/google/enumerate.py +270 -0
  26. pushframe/google/manifest.py +111 -0
  27. pushframe/google/parsers.py +345 -0
  28. pushframe/google/redaction.py +33 -0
  29. pushframe/google/vault.py +126 -0
  30. pushframe/gsync.py +463 -0
  31. pushframe/migration.py +86 -0
  32. pushframe/models/__init__.py +0 -0
  33. pushframe/models/activity.py +79 -0
  34. pushframe/models/asset.py +159 -0
  35. pushframe/models/frame.py +105 -0
  36. pushframe/models/meta.py +11 -0
  37. pushframe/models/person.py +24 -0
  38. pushframe/models/user.py +22 -0
  39. pushframe/ratelimit.py +222 -0
  40. pushframe/reconcile.py +384 -0
  41. pushframe/sync.py +1105 -0
  42. pushframe/utils/dt.py +15 -0
  43. pushframe/utils/io.py +23 -0
  44. pushframe/utils/settings.py +59 -0
  45. pushframe-5.0.0.dist-info/METADATA +53 -0
  46. pushframe-5.0.0.dist-info/RECORD +49 -0
  47. pushframe-5.0.0.dist-info/WHEEL +4 -0
  48. pushframe-5.0.0.dist-info/entry_points.txt +2 -0
  49. pushframe-5.0.0.dist-info/licenses/LICENSE +31 -0
pushframe/utils/dt.py ADDED
@@ -0,0 +1,15 @@
1
+ from datetime import datetime
2
+
3
+ AURA_DT_FORMAT = '%Y-%m-%dT%H:%M:%S.%fZ'
4
+
5
+
6
+ def parse_aura_dt(aura_dt_str: str):
7
+ return datetime.strptime(aura_dt_str, AURA_DT_FORMAT)
8
+
9
+
10
+ def get_utc_now():
11
+ return datetime.utcnow()
12
+
13
+
14
+ def format_dt_to_aura(dt: datetime):
15
+ return dt.strftime(AURA_DT_FORMAT)
pushframe/utils/io.py ADDED
@@ -0,0 +1,23 @@
1
+ import json
2
+ import os
3
+ from typing import Union
4
+
5
+ from pydantic import BaseModel
6
+
7
+
8
+ def build_path(*args, make_dir: bool = True):
9
+ path = os.path.join(*args)
10
+ if make_dir:
11
+ os.makedirs(os.path.dirname(path), exist_ok=True)
12
+ return path
13
+
14
+
15
+ def _pydantic_default(obj):
16
+ if isinstance(obj, BaseModel):
17
+ return obj.model_dump(mode="json")
18
+ raise TypeError(f"Object of type {type(obj).__name__} is not JSON serializable")
19
+
20
+
21
+ def write_model(model: Union[BaseModel, list[BaseModel]], path: str) -> None:
22
+ with open(path, 'w') as out:
23
+ json.dump(model, out, default=_pydantic_default)
@@ -0,0 +1,59 @@
1
+ import os
2
+ from pathlib import Path
3
+
4
+
5
+ def _env(*names: str) -> str | None:
6
+ """First set variable among `names` (IDN-04, phase 20): PUSHFRAME_* is the
7
+ documented primary spelling, the legacy AURA_* spellings remain readable
8
+ as a one-release fallback. Explicitly-set values win in the order given."""
9
+ for name in names:
10
+ value = os.getenv(name)
11
+ if value is not None:
12
+ return value
13
+ return None
14
+
15
+
16
+ LOCALE = _env('PUSHFRAME_LOCALE', 'AURA_LOCALE') or 'en-US'
17
+ AURA_APP_IDENTIFIER = _env('PUSHFRAME_APP_IDENTIFIER', 'AURA_APP_IDENTIFIER') or 'com.pushd.client'
18
+ # TODO: Load device identifier through config
19
+ DEVICE_IDENTIFIER = _env('PUSHFRAME_DEVICE_IDENTIFIER', 'AURA_DEVICE_IDENTIFIER') or '0000000000000000'
20
+ IMAGE_PROXY_BASE_URL = 'https://imgproxy.pushd.com'
21
+
22
+
23
+ def _bool_env(name: str, default: bool) -> bool:
24
+ """Defensive boolean env-var parser (Phase 09, ANTI-05) -- Python's
25
+ built-in `bool("false")` is `True`, so every non-empty string env var
26
+ needs this membership test instead. Missing var -> `default`; present
27
+ -> case-insensitive membership in `('1', 'true', 'yes', 'on')`."""
28
+ return _bool_env2(os.getenv(name), default)
29
+
30
+
31
+ def _bool_env2(raw: str | None, default: bool) -> bool:
32
+ """Boolean parse of an already-resolved raw value (IDN-04): None ->
33
+ default; present -> case-insensitive membership in ('1','true','yes','on')."""
34
+ if raw is None:
35
+ return default
36
+ return raw.strip().lower() in ('1', 'true', 'yes', 'on')
37
+
38
+
39
+ # Proactive write-rate-budget + geo pre-flight guard config (Phase 09,
40
+ # ANTI-05) -- the first non-string env vars in this codebase, hence the
41
+ # `_bool_env` helper above and bare `float(...)` for the numeric ones.
42
+ AURA_WRITE_BUDGET_CAPACITY = float(_env('PUSHFRAME_WRITE_BUDGET_CAPACITY', 'AURA_WRITE_BUDGET_CAPACITY') or '30')
43
+ AURA_WRITE_BUDGET_REFILL_PER_MIN = float(_env('PUSHFRAME_WRITE_BUDGET_REFILL_PER_MIN', 'AURA_WRITE_BUDGET_REFILL_PER_MIN') or '0.75')
44
+ AURA_WRITE_BUDGET_WAIT = _bool_env2(_env('PUSHFRAME_WRITE_BUDGET_WAIT', 'AURA_WRITE_BUDGET_WAIT'), True)
45
+ AURA_WRITE_BUDGET_MAX_WAIT = float(_env('PUSHFRAME_WRITE_BUDGET_MAX_WAIT', 'AURA_WRITE_BUDGET_MAX_WAIT') or '3600')
46
+ # None -> geo pre-flight check skipped entirely, per check_geo's falsy contract.
47
+ AURA_COUNTRY = _env('PUSHFRAME_COUNTRY', 'AURA_COUNTRY')
48
+ AURA_GEO_FAIL_OPEN = _bool_env2(_env('PUSHFRAME_GEO_FAIL_OPEN', 'AURA_GEO_FAIL_OPEN'), True)
49
+ AURA_STATE_DIR = Path(_env('PUSHFRAME_STATE_DIR', 'AURA_STATE_DIR') or '~/.config/pushframe').expanduser()
50
+
51
+ # AWS endpoints/identifiers (Phase 19, MOD-02) -- moved out of the hardcoded
52
+ # module constants in pushframe/aws/s3client.py and sqsclient.py (closing
53
+ # their `TODO: read them in through config?`). Defaults ARE the literals that
54
+ # shipped for years, so an unset environment behaves byte-identically.
55
+ AWS_S3_BUCKET = _env('PUSHFRAME_AWS_S3_BUCKET', 'AURA_AWS_S3_BUCKET') or 'images.senseapp.co'
56
+ AWS_UPLOAD_IDENTITY_POOL_ID = _env(
57
+ 'PUSHFRAME_AWS_UPLOAD_POOL_ID', 'AURA_AWS_UPLOAD_POOL_ID') or 'us-east-1:b92826c0-8274-43db-abff-136977c13598'
58
+ AWS_SQS_IDENTITY_POOL_ID = _env(
59
+ 'PUSHFRAME_AWS_SQS_POOL_ID', 'AURA_AWS_SQS_POOL_ID') or 'us-east-1:98ccd0ff-69fe-4e9a-ad34-671b4381ab12'
@@ -0,0 +1,53 @@
1
+ Metadata-Version: 2.5
2
+ Name: pushframe
3
+ Version: 5.0.0
4
+ License: MIT License
5
+
6
+ Copyright (c) 2026 Fabrice DIDIERJEAN (coredmp95)
7
+ Copyright (c) 2023 zmanowar (zach@codehooker.com) — original auraframes client
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ of this software and associated documentation files (the "Software"), to deal
11
+ in the Software without restriction, including without limitation the rights
12
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ copies of the Software, and to permit persons to whom the Software is
14
+ furnished to do so, subject to the following conditions:
15
+
16
+ The above copyright notice and this permission notice shall be included in all
17
+ copies or substantial portions of the Software.
18
+
19
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ SOFTWARE.
26
+
27
+ ---
28
+
29
+ Provenance note: this project began as a fork of zmanowar's `auraframes`
30
+ (https://github.com/zmanowar/auraframes), which ships without an explicit
31
+ license. The original author's work (reverse-engineered API models, auth,
32
+ read/upload flows) is credited in the README and preserved in the git
33
+ history. This fork's own additions are licensed MIT above. If you are the
34
+ original author and want a different arrangement, please open an issue.
35
+ License-File: LICENSE
36
+ Requires-Python: >=3.14
37
+ Requires-Dist: boto3>=1.34
38
+ Requires-Dist: botocore>=1.34
39
+ Requires-Dist: geopy>=2.4
40
+ Requires-Dist: h2>=4
41
+ Requires-Dist: httpx[http2]>=0.27
42
+ Requires-Dist: loguru>=0.7
43
+ Requires-Dist: piexif>=1.1.3
44
+ Requires-Dist: pillow-heif>=1.6
45
+ Requires-Dist: pillow>=10.4
46
+ Requires-Dist: pydantic>=2
47
+ Requires-Dist: python-dotenv>=1.0
48
+ Requires-Dist: requests>=2.31
49
+ Requires-Dist: tqdm>=4.66
50
+ Provides-Extra: dev
51
+ Requires-Dist: pytest>=8; extra == 'dev'
52
+ Provides-Extra: google-browser
53
+ Requires-Dist: playwright>=1.63.0; extra == 'google-browser'
@@ -0,0 +1,49 @@
1
+ pushframe/__init__.py,sha256=-WHw8HbuRSp-Zfv2svg9sYcc5906dEk5ovWq-M3gBJ8,245
2
+ pushframe/aura.py,sha256=5P9ho5OHHyv5pzkQdWBk0wvKkEgvyfXXL9r3kOVxw0g,8050
3
+ pushframe/cache.py,sha256=tPa3m8u7_iSZA8zZMb-jfdSunWIg7AWCGMpQJFgV_Y0,1394
4
+ pushframe/cli.py,sha256=Jvu2indOJUxMqvmYli7qFo9x4yMNdVOqlWN3x95FlfM,56870
5
+ pushframe/client.py,sha256=zvLK-VQBSi7wpc42nUp-D9V4WlAjCBa6TUdJokVWrzI,11734
6
+ pushframe/exif.py,sha256=BATVlXUmNYfCcIQ-PzVyHqMhpAktAumMAj_UTkIctcc,5001
7
+ pushframe/export.py,sha256=FzxxGeJweTRGOboENLo1GnVtdiX3-l66EqqCXpdnI8Q,1994
8
+ pushframe/gsync.py,sha256=DlbRkCBTS4aNFgbFSNteEp9h-cZ0GTHLMH4nLIkPI1U,19909
9
+ pushframe/migration.py,sha256=HPQK7-EjYcvCZJkVUjieZspkn5Tx8VbW8aSyN7A4V5w,3171
10
+ pushframe/ratelimit.py,sha256=zct6vEdDSML-2Av3N44AYOBMrfo7Ymm6ZidWA1QCjNQ,10150
11
+ pushframe/reconcile.py,sha256=YpkBkVQwC5_XPPFYY0OxXk9b7xiEuFFGd2cqnMbSTu0,20195
12
+ pushframe/sync.py,sha256=HD1IMaR7nH6dveIXMa85qNV09d3IScuuhh3UqGStJ48,58011
13
+ pushframe/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
+ pushframe/api/accountApi.py,sha256=ncEsFVuZJJpHbC-D9klDhg80JnkhsRiDf_SCFOjCZPE,2624
15
+ pushframe/api/activityApi.py,sha256=q7JeXTFKiWuDiBKSDeaRODAXyKWvdM4-f5PSuB-dYWo,3673
16
+ pushframe/api/assetApi.py,sha256=EvO0VUtrCyWxWFPkM7BKChwX23m1AnXs7lHkyYdRLP8,9223
17
+ pushframe/api/baseApi.py,sha256=bh6n-VB1NNmMCCanjFNKFMj-vlfcZg3KIRuseqYzyz8,123
18
+ pushframe/api/frameApi.py,sha256=x98q3rcBu4Uyy6PIU61VAOKKeoxAXd-ZAkeQxTjvkks,13867
19
+ pushframe/api/notificationApi.py,sha256=WTEuPWa5eH_3kaKxlDadR6C8jQheRG-QusYntzoIyoU,417
20
+ pushframe/api/peopleApi.py,sha256=H0gTumZKXr9XNx2xFUgy6i_PNJj7fabWkRBBxDyQeKU,855
21
+ pushframe/api/playlistApi.py,sha256=xV-s9sUOeCiPCuZ_xUdrxwsqsIOmSiyKV2pqkDFdNMU,410
22
+ pushframe/aws/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
+ pushframe/aws/awsclient.py,sha256=tgVjzazUQi8GzS5C4HbwVn_WzhlhFWJ8GEQa7JE1-zk,761
24
+ pushframe/aws/s3client.py,sha256=7voCybCgmBVpM9JgbSbxGrczShlyFgi-ORBlsgd3H6U,1449
25
+ pushframe/aws/sqsclient.py,sha256=1lfvoXg0A_QqWdAuv28ae_lltnCBMQmdGG29BUsg8N4,1531
26
+ pushframe/google/__init__.py,sha256=PEvLM4wu30SEK-vgn8U3OP1R-Pg0-lrU-LhNQGm6W2A,1545
27
+ pushframe/google/bootstrap.py,sha256=ZkS32-PpKO00idqaISSjC2ZpnX45StoOZAKSHxGA8Gw,5972
28
+ pushframe/google/cache.py,sha256=CxccnrSBkMwWdlMAEJpe4o-g0OZ3v77T74toUWwCbJ8,6992
29
+ pushframe/google/client.py,sha256=XD6oi0P1Bb_pKRb6KuvDVVOeZvl-A9axAoLAitQ3Os4,5820
30
+ pushframe/google/enumerate.py,sha256=E224EsK3Uo3ihWyN8yL1H1gCfU-7puOay8RDZeiQzAE,11522
31
+ pushframe/google/manifest.py,sha256=59JU4WCKaO3qd9Le1f97GEmT5gc1Lb7I5tsm72V7aTE,4618
32
+ pushframe/google/parsers.py,sha256=yyOF0S4beaY_SlcjZZn375CW2ZTahCg2jjT2wmTlpCQ,12913
33
+ pushframe/google/redaction.py,sha256=I3KnEPNKXM7-Nr8RQQZnDSJD_6LRAvK43uO1YUXpd-o,1331
34
+ pushframe/google/vault.py,sha256=Y1AAjt-E0nohsZhhe3lLWL8oQ59_AGujscaSPtzStPw,5129
35
+ pushframe/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
36
+ pushframe/models/activity.py,sha256=KVPdaiba5oTMISPXesjJbeLIuUsLYyx-zCjzDWOGWpo,1872
37
+ pushframe/models/asset.py,sha256=VyP3ZLPlvgvU2CBV6JwwwWAcHP56wzqUd8Z7cWame18,6087
38
+ pushframe/models/frame.py,sha256=-DIRiJw9_okkFZ6ll1lKktL9Yhx7raA923i0dS9KAlw,3298
39
+ pushframe/models/meta.py,sha256=pi5VQYjutn2MmlGUZpmOHyr7cLbYlcuUCgJ4rY98ws4,330
40
+ pushframe/models/person.py,sha256=8eNAxSiF9yKjDL0BMApqO9qSqzdPJ5NTvjbLKk06kmI,462
41
+ pushframe/models/user.py,sha256=huscS56RlN3W0DMX20wAKbDACf5Ueg2ajJiU_zYvHs4,582
42
+ pushframe/utils/dt.py,sha256=lgziyv0Ie4138l2njwkV7VvMei_uPoZrt2CfZE4JnsU,297
43
+ pushframe/utils/io.py,sha256=bu1e-2FUCfMf9O1gcNtawqx2ecDeM1WjTjNqvjVTAYo,612
44
+ pushframe/utils/settings.py,sha256=NlDVcdGTJtjMSebQ_MRu8ASmaDWOllTZJwcWPifMTbo,3218
45
+ pushframe-5.0.0.dist-info/METADATA,sha256=KmEwFky6zjaCnJlsSeHxczrk8BK9_hUcT2cCeI4PTd4,2483
46
+ pushframe-5.0.0.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
47
+ pushframe-5.0.0.dist-info/entry_points.txt,sha256=3JQ8L1X8lpPWQfMLx0rto47zM_FZedgu1GpH7TQY8Ho,49
48
+ pushframe-5.0.0.dist-info/licenses/LICENSE,sha256=_YQ-4jjriQDARI8HmVx4te8JNpc57Dq7JduhhPu-lY4,1611
49
+ pushframe-5.0.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.32.4
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ pushframe = pushframe.cli:main
@@ -0,0 +1,31 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Fabrice DIDIERJEAN (coredmp95)
4
+ Copyright (c) 2023 zmanowar (zach@codehooker.com) — original auraframes client
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
23
+
24
+ ---
25
+
26
+ Provenance note: this project began as a fork of zmanowar's `auraframes`
27
+ (https://github.com/zmanowar/auraframes), which ships without an explicit
28
+ license. The original author's work (reverse-engineered API models, auth,
29
+ read/upload flows) is credited in the README and preserved in the git
30
+ history. This fork's own additions are licensed MIT above. If you are the
31
+ original author and want a different arrangement, please open an issue.