reference-api-buddy 0.4.2__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 (34) hide show
  1. reference_api_buddy-0.4.2/CHANGELOG.md +78 -0
  2. reference_api_buddy-0.4.2/LICENSE +21 -0
  3. reference_api_buddy-0.4.2/MANIFEST.in +9 -0
  4. reference_api_buddy-0.4.2/PKG-INFO +1042 -0
  5. reference_api_buddy-0.4.2/README.md +966 -0
  6. reference_api_buddy-0.4.2/pyproject.toml +150 -0
  7. reference_api_buddy-0.4.2/reference_api_buddy/__init__.py +22 -0
  8. reference_api_buddy-0.4.2/reference_api_buddy/cache/__init__.py +1 -0
  9. reference_api_buddy-0.4.2/reference_api_buddy/cache/engine.py +353 -0
  10. reference_api_buddy-0.4.2/reference_api_buddy/cli.py +167 -0
  11. reference_api_buddy-0.4.2/reference_api_buddy/core/__init__.py +1 -0
  12. reference_api_buddy-0.4.2/reference_api_buddy/core/admin_utils.py +77 -0
  13. reference_api_buddy-0.4.2/reference_api_buddy/core/config.py +171 -0
  14. reference_api_buddy-0.4.2/reference_api_buddy/core/handler.py +990 -0
  15. reference_api_buddy-0.4.2/reference_api_buddy/core/proxy.py +416 -0
  16. reference_api_buddy-0.4.2/reference_api_buddy/core/server.py +40 -0
  17. reference_api_buddy-0.4.2/reference_api_buddy/core/ttl_manager.py +41 -0
  18. reference_api_buddy-0.4.2/reference_api_buddy/database/__init__.py +1 -0
  19. reference_api_buddy-0.4.2/reference_api_buddy/database/manager.py +410 -0
  20. reference_api_buddy-0.4.2/reference_api_buddy/database/models.py +61 -0
  21. reference_api_buddy-0.4.2/reference_api_buddy/monitoring/manager.py +186 -0
  22. reference_api_buddy-0.4.2/reference_api_buddy/security/__init__.py +1 -0
  23. reference_api_buddy-0.4.2/reference_api_buddy/security/manager.py +161 -0
  24. reference_api_buddy-0.4.2/reference_api_buddy/throttling/__init__.py +1 -0
  25. reference_api_buddy-0.4.2/reference_api_buddy/throttling/manager.py +120 -0
  26. reference_api_buddy-0.4.2/reference_api_buddy/utils/__init__.py +1 -0
  27. reference_api_buddy-0.4.2/reference_api_buddy/utils/logger.py +225 -0
  28. reference_api_buddy-0.4.2/reference_api_buddy.egg-info/PKG-INFO +1042 -0
  29. reference_api_buddy-0.4.2/reference_api_buddy.egg-info/SOURCES.txt +32 -0
  30. reference_api_buddy-0.4.2/reference_api_buddy.egg-info/dependency_links.txt +1 -0
  31. reference_api_buddy-0.4.2/reference_api_buddy.egg-info/entry_points.txt +2 -0
  32. reference_api_buddy-0.4.2/reference_api_buddy.egg-info/requires.txt +26 -0
  33. reference_api_buddy-0.4.2/reference_api_buddy.egg-info/top_level.txt +1 -0
  34. reference_api_buddy-0.4.2/setup.cfg +4 -0
@@ -0,0 +1,78 @@
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
+
9
+ ## [0.4.2] - 2025-09-16
10
+
11
+ ### Added
12
+ - Complete administrative API with 6 endpoints for system monitoring and debugging:
13
+ - `GET /admin/config` - Returns current runtime configuration with sensitive data sanitized
14
+ - `GET /admin/status` - Provides comprehensive system health and operational metrics
15
+ - `GET /admin/cache` - Returns detailed cache statistics and health information
16
+ - `GET /admin/domains` - Shows all configured domain mappings and their status
17
+ - `GET /admin/cache/{domain}` - Returns cache entries and statistics for specific domains
18
+ - `POST /admin/validate-config` - Validates configuration without applying changes
19
+ - Security integration with secure key authentication for admin endpoints
20
+ - Configuration sanitization that automatically redacts sensitive fields (keys, secrets, passwords, tokens)
21
+ - Comprehensive system health monitoring with component status tracking
22
+ - Cache analytics including hit rates, TTL distribution, and entry details
23
+ - Domain-specific monitoring with error tracking and performance metrics
24
+ - Admin utilities module for shared functionality across admin endpoints
25
+ - Rate limiting and access logging for admin endpoints
26
+ - Full JSON response formatting with proper error handling
27
+ - Comprehensive test coverage with 20 unit tests and 14 integration tests
28
+
29
+ ### Changed
30
+ - Updated datetime handling throughout codebase to use `datetime.now(timezone.utc)` instead of deprecated `datetime.utcnow()`
31
+ - Improved type annotations with proper `Dict[str, Any]` usage for better mypy compliance
32
+ - Enhanced handler architecture to support admin endpoint routing
33
+
34
+ ### Fixed
35
+ - Eliminated all Python 3.13 datetime deprecation warnings
36
+ - Fixed inconsistent datetime import patterns across the codebase
37
+ - Resolved mypy type checking issues with mixed dictionary types
38
+ - Aligned CI flake8 configuration with pre-commit hooks to prevent configuration drift
39
+
40
+ ### Security
41
+ - Admin endpoints respect existing security configuration requirements
42
+ - Sensitive configuration data is automatically sanitized in API responses
43
+ - Admin access attempts are logged for security auditing
44
+ - Secure key validation prevents unauthorized access to administrative functions
45
+
46
+ ## [0.3.0] - 2025-08-22
47
+
48
+ ### Added
49
+ - Monitoring interface (`MonitoringManager`) for programmatic access to proxy, cache, upstream, database, and throttling metrics
50
+ - Unit tests for monitoring interface
51
+
52
+ ### Changed
53
+
54
+ ### Deprecated
55
+
56
+ ### Removed
57
+
58
+ ### Fixed
59
+
60
+ ### Security
61
+
62
+ ## [0.2.0] - 2025-08-21
63
+
64
+ ### Added
65
+ - Domain-level TTL configuration support for flexible cache management
66
+ - Enhanced cache engine with configurable TTL per domain mapping
67
+
68
+ ### Fixed
69
+ - Fixed bug in handling `Transfer-Encoding: chunked` responses from upstream servers
70
+ - Fixed previous hard-coded cache entry TTL, now uses domain-specific configuration
71
+
72
+ ## [0.1.0] - 2025-08-19
73
+
74
+ ### Added
75
+ - Initial proof-of-concept implementation
76
+ - Core proxy functionality with caching and throttling
77
+ - Unit and integration test suite
78
+ - Documentation and design specifications
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Tinker Monkey
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,9 @@
1
+ include README.md
2
+ include LICENSE
3
+ include CHANGELOG.md
4
+ include pyproject.toml
5
+ recursive-include reference_api_buddy *.py
6
+ recursive-exclude tests *
7
+ recursive-exclude documentation *
8
+ recursive-exclude smoke_tests *
9
+ exclude setup.py