quickbase-extract 0.1.0__tar.gz → 0.2.1__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 (44) hide show
  1. {quickbase_extract-0.1.0 → quickbase_extract-0.2.1}/.editorconfig +0 -8
  2. {quickbase_extract-0.1.0 → quickbase_extract-0.2.1}/.gitignore +0 -9
  3. quickbase_extract-0.2.1/CHANGELOG.md +93 -0
  4. quickbase_extract-0.2.1/PKG-INFO +4163 -0
  5. quickbase_extract-0.2.1/README.md +4136 -0
  6. {quickbase_extract-0.1.0 → quickbase_extract-0.2.1}/pyproject.toml +3 -9
  7. {quickbase_extract-0.1.0 → quickbase_extract-0.2.1}/src/quickbase_extract/__init__.py +37 -34
  8. {quickbase_extract-0.1.0 → quickbase_extract-0.2.1}/src/quickbase_extract/api_handlers.py +6 -4
  9. quickbase_extract-0.2.1/src/quickbase_extract/cache_manager.py +333 -0
  10. quickbase_extract-0.2.1/src/quickbase_extract/cache_orchestration.py +298 -0
  11. {quickbase_extract-0.1.0 → quickbase_extract-0.2.1}/src/quickbase_extract/cache_sync.py +17 -9
  12. quickbase_extract-0.2.1/src/quickbase_extract/config.py +27 -0
  13. quickbase_extract-0.2.1/src/quickbase_extract/report_data.py +388 -0
  14. quickbase_extract-0.2.1/src/quickbase_extract/report_metadata.py +309 -0
  15. quickbase_extract-0.2.1/src/quickbase_extract/utils.py +17 -0
  16. {quickbase_extract-0.1.0 → quickbase_extract-0.2.1}/tests/conftest.py +46 -32
  17. {quickbase_extract-0.1.0 → quickbase_extract-0.2.1}/tests/test_api_handlers.py +2 -0
  18. quickbase_extract-0.2.1/tests/test_cache_manager.py +472 -0
  19. quickbase_extract-0.2.1/tests/test_cache_orchestration.py +949 -0
  20. quickbase_extract-0.2.1/tests/test_cache_sync.py +119 -0
  21. quickbase_extract-0.2.1/tests/test_report_data.py +615 -0
  22. quickbase_extract-0.2.1/tests/test_report_metadata.py +399 -0
  23. quickbase_extract-0.2.1/tests/test_utils.py +32 -0
  24. quickbase_extract-0.1.0/CHANGELOG.md +0 -32
  25. quickbase_extract-0.1.0/PKG-INFO +0 -1735
  26. quickbase_extract-0.1.0/README.md +0 -1708
  27. quickbase_extract-0.1.0/src/quickbase_extract/cache_freshness.py +0 -199
  28. quickbase_extract-0.1.0/src/quickbase_extract/cache_manager.py +0 -234
  29. quickbase_extract-0.1.0/src/quickbase_extract/client.py +0 -61
  30. quickbase_extract-0.1.0/src/quickbase_extract/report_data.py +0 -253
  31. quickbase_extract-0.1.0/src/quickbase_extract/report_metadata.py +0 -316
  32. quickbase_extract-0.1.0/src/quickbase_extract/utils.py +0 -42
  33. quickbase_extract-0.1.0/tests/test_cache_freshness.py +0 -236
  34. quickbase_extract-0.1.0/tests/test_cache_manager.py +0 -308
  35. quickbase_extract-0.1.0/tests/test_cache_sync.py +0 -124
  36. quickbase_extract-0.1.0/tests/test_client.py +0 -170
  37. quickbase_extract-0.1.0/tests/test_report_data.py +0 -395
  38. quickbase_extract-0.1.0/tests/test_report_metadata.py +0 -255
  39. quickbase_extract-0.1.0/tests/test_utils.py +0 -71
  40. {quickbase_extract-0.1.0 → quickbase_extract-0.2.1}/.pre-commit-config.yaml +0 -0
  41. {quickbase_extract-0.1.0 → quickbase_extract-0.2.1}/.python-version +0 -0
  42. {quickbase_extract-0.1.0 → quickbase_extract-0.2.1}/LICENSE.txt +0 -0
  43. {quickbase_extract-0.1.0 → quickbase_extract-0.2.1}/TODO.md +0 -0
  44. {quickbase_extract-0.1.0 → quickbase_extract-0.2.1}/src/quickbase_extract/py.typed +0 -0
@@ -20,14 +20,6 @@ indent_style = space
20
20
  indent_size = 4
21
21
  max_line_length = 120
22
22
 
23
- # ============================================================
24
- # JavaScript / TypeScript
25
- # ============================================================
26
- [*.{js,jsx,ts,tsx}]
27
- indent_style = space
28
- indent_size = 2
29
- max_line_length = 120
30
-
31
23
  # ============================================================
32
24
  # JSON
33
25
  # ============================================================
@@ -48,15 +48,6 @@ src/*.egg-info/
48
48
  *.log
49
49
  logs/
50
50
 
51
- # Database files
52
- *.db
53
- *.sqlite
54
- *.sqlite3
55
-
56
- # Node modules
57
- node_modules/
58
- npm-debug.log
59
-
60
51
  # IDE caches
61
52
  .idea/
62
53
  *.swp
@@ -0,0 +1,93 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.2.1] - 2026-04-25
9
+
10
+ ### Fixed
11
+
12
+ - `sync_from_s3()` now preserves S3 `LastModified` timestamps via `os.utime()`, so `get_cache_age_hours()` returns accurate ages after S3 restore (previously always returned ~0 on Lambda cold start)
13
+ - Renamed misleading `should_sync` variable to `already_synced` in `sync_from_s3_once()` for clarity
14
+
15
+ ### Removed
16
+
17
+ - `FORCE_CACHE_REFRESH` environment variable support from `sync_from_s3_once()` — use `force=True` parameter instead
18
+
19
+ ## [0.2.0] - 2026-04-22
20
+
21
+ ### Added
22
+
23
+ - `ensure_cache_freshness()` function in new `cache_orchestration` module for orchestrating cache freshness checks
24
+ - Independent cache refresh: metadata and data refresh separately based on their staleness
25
+ - `METADATA_STALE_HOURS`, `DATA_STALE_HOURS`, `FORCE_CACHE_REFRESH` environment variables
26
+ - `cache_all_data` parameter in `ensure_cache_freshness()` to cache all reports regardless of subset
27
+ - `report_configs_all` and `report_configs_to_cache` parameters to separate metadata refresh from data caching
28
+ - Cache freshness management documentation and examples
29
+ - `CacheManager.is_cache_empty()` method to check if cache directory is empty
30
+ - `CacheManager.get_cache_age_hours()` method to get age of oldest file in cache
31
+ - `CacheManager` now accepts `s3_prefix` parameter for flexible S3 path configuration
32
+ - Environment-first cache path structure: `{project}/{env}/cache/` instead of `cache/{env}/`
33
+ - `ReportConfig` NamedTuple in new `config.py` module for type-safe report identification
34
+ - `_extract_report_names()` helper function in `report_data.py` to reduce code duplication
35
+ - `_replace_ask_placeholders()` function for dynamic filter manipulation with runtime ask_values
36
+ - Support for per-report ask_values in `get_data_parallel()` for dynamic filtering
37
+ - Multiple organization strategies for report configs (by app, by function, by environment, by tags)
38
+ - Environment-specific caching strategies (dev/staging/prod with different subsets)
39
+
40
+ ### Changed
41
+
42
+ - **All functions now require `CacheManager` instance**: Changed from optional `cache_root` parameter
43
+ - Cache structure now follows pattern: `my_project/dev/cache/report_metadata/...`
44
+ - Previously: `.quickbase-cache/dev/report_metadata/...`
45
+ - `ensure_cache_freshness()` refreshes only stale caches instead of always refreshing both
46
+ - `sync_from_s3_once()` now requires `cache_mgr` parameter instead of using singleton
47
+ - `sync_from_s3_once()` now supports `FORCE_CACHE_REFRESH` environment variable
48
+ - S3 sync operations now use `s3_prefix` for path construction instead of auto-adding environment
49
+ - CacheManager now provides cache inspection methods for both metadata and data directories
50
+ - **All functions now require `ReportConfig` instances instead of dicts**
51
+ - `fetch_report_metadata_api()` now returns only essential fields (no full `report` object)
52
+
53
+ ### Removed
54
+
55
+ - `cache_freshness.py` module — functionality consolidated into `cache_manager.py` (use `ensure_cache_freshness()` instead)
56
+ - `check_cache_freshness()`, `get_cache_files()`, `get_cache_summary()` functions — use `CacheManager` methods directly or `ensure_cache_freshness()` for orchestration
57
+ - `refresh_all()` function**: Use `ensure_cache_freshness()` for cache management
58
+ - `client.py` module**: Users must create Quickbase clients directly using `quickbase-api` package
59
+ - `get_cache_manager()` singleton**: Users must create `CacheManager` instances explicitly
60
+ - `find_report()` function from utils - no longer needed with `ReportConfig`
61
+ - Dict-based report config format - all configs must use `ReportConfig` NamedTuple
62
+ - Nested `report` object from metadata - simplified structure
63
+
64
+ ### Fixed
65
+
66
+ - Cache freshness checks now work independently for metadata vs data
67
+ - S3 sync no longer double-adds environment prefix to paths
68
+
69
+ ## [0.1.0] - 2026-04-19
70
+
71
+ ### Added
72
+
73
+ - Initial release
74
+ - Parallel report fetching with configurable worker threads
75
+ - Local and S3-backed caching for reduced API calls
76
+ - Automatic retry logic with exponential backoff for rate limits
77
+ - AWS Lambda support with S3 cache synchronization
78
+ - Cache monitoring tools for freshness checks
79
+ - Type hints and TypedDict support for better IDE integration
80
+ - Comprehensive error handling and detailed logging
81
+ - Data transformation with field ID to label conversion
82
+ - Support for multiple Quickbase applications
83
+
84
+ ### Features
85
+
86
+ - **Parallel Processing**: Fetch multiple reports concurrently for improved performance
87
+ - **Smart Caching**: Local and S3-backed caching to minimize API calls
88
+ - **Automatic Retries**: Built-in retry logic with exponential backoff for rate limits
89
+ - **Lambda Ready**: First-class support for AWS Lambda with S3 cache sync
90
+ - **Type Safe**: Full type hints with TypedDict for better IDE support
91
+ - **Cache Monitoring**: Tools to check cache freshness and manage stale data
92
+ - **Robust Error Handling**: Comprehensive error handling with detailed logging
93
+ - **Data Transformation**: Automatically converts field IDs to human-readable labels