enterprise-crawler-framework 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 (78) hide show
  1. enterprise_crawler_framework-1.0.0/CHANGELOG.md +88 -0
  2. enterprise_crawler_framework-1.0.0/CODE_OF_CONDUCT.md +0 -0
  3. enterprise_crawler_framework-1.0.0/CONTRIBUTING.md +24 -0
  4. enterprise_crawler_framework-1.0.0/LICENSE +0 -0
  5. enterprise_crawler_framework-1.0.0/MANIFEST.in +10 -0
  6. enterprise_crawler_framework-1.0.0/PKG-INFO +37 -0
  7. enterprise_crawler_framework-1.0.0/README.md +25 -0
  8. enterprise_crawler_framework-1.0.0/SECURITY.md +83 -0
  9. enterprise_crawler_framework-1.0.0/enterprise_crawler/__init__.py +52 -0
  10. enterprise_crawler_framework-1.0.0/enterprise_crawler/cli/__init__.py +19 -0
  11. enterprise_crawler_framework-1.0.0/enterprise_crawler/cli/__main__.py +7 -0
  12. enterprise_crawler_framework-1.0.0/enterprise_crawler/cli/main.py +689 -0
  13. enterprise_crawler_framework-1.0.0/enterprise_crawler/config/__init__.py +19 -0
  14. enterprise_crawler_framework-1.0.0/enterprise_crawler/config/loader.py +944 -0
  15. enterprise_crawler_framework-1.0.0/enterprise_crawler/config/settings.py +519 -0
  16. enterprise_crawler_framework-1.0.0/enterprise_crawler/contracts/__init__.py +15 -0
  17. enterprise_crawler_framework-1.0.0/enterprise_crawler/contracts/crawler.py +13 -0
  18. enterprise_crawler_framework-1.0.0/enterprise_crawler/contracts/enums.py +49 -0
  19. enterprise_crawler_framework-1.0.0/enterprise_crawler/contracts/event.py +17 -0
  20. enterprise_crawler_framework-1.0.0/enterprise_crawler/contracts/execution.py +18 -0
  21. enterprise_crawler_framework-1.0.0/enterprise_crawler/contracts/health.py +11 -0
  22. enterprise_crawler_framework-1.0.0/enterprise_crawler/contracts/plugin.py +18 -0
  23. enterprise_crawler_framework-1.0.0/enterprise_crawler/contracts/record.py +14 -0
  24. enterprise_crawler_framework-1.0.0/enterprise_crawler/core/base_bot.py +1555 -0
  25. enterprise_crawler_framework-1.0.0/enterprise_crawler/core/crawler.py +537 -0
  26. enterprise_crawler_framework-1.0.0/enterprise_crawler/core/downloader.py +617 -0
  27. enterprise_crawler_framework-1.0.0/enterprise_crawler/core/http_client.py +912 -0
  28. enterprise_crawler_framework-1.0.0/enterprise_crawler/core/lifecycle.py +339 -0
  29. enterprise_crawler_framework-1.0.0/enterprise_crawler/core/orchestrator.py +0 -0
  30. enterprise_crawler_framework-1.0.0/enterprise_crawler/core/scheduler.py +0 -0
  31. enterprise_crawler_framework-1.0.0/enterprise_crawler/core/session.py +450 -0
  32. enterprise_crawler_framework-1.0.0/enterprise_crawler/events/__init__.py +177 -0
  33. enterprise_crawler_framework-1.0.0/enterprise_crawler/events/dead_letter.py +867 -0
  34. enterprise_crawler_framework-1.0.0/enterprise_crawler/events/dispatcher.py +702 -0
  35. enterprise_crawler_framework-1.0.0/enterprise_crawler/events/queue.py +1173 -0
  36. enterprise_crawler_framework-1.0.0/enterprise_crawler/events/retry.py +1099 -0
  37. enterprise_crawler_framework-1.0.0/enterprise_crawler/events/sqlite_dead_letter.py +1470 -0
  38. enterprise_crawler_framework-1.0.0/enterprise_crawler/events/sqlite_queue.py +1703 -0
  39. enterprise_crawler_framework-1.0.0/enterprise_crawler/events/worker.py +1711 -0
  40. enterprise_crawler_framework-1.0.0/enterprise_crawler/exceptions/__init__.py +73 -0
  41. enterprise_crawler_framework-1.0.0/enterprise_crawler/exceptions/base.py +12 -0
  42. enterprise_crawler_framework-1.0.0/enterprise_crawler/exceptions/configuration.py +11 -0
  43. enterprise_crawler_framework-1.0.0/enterprise_crawler/exceptions/contracts.py +5 -0
  44. enterprise_crawler_framework-1.0.0/enterprise_crawler/exceptions/lifecycle.py +13 -0
  45. enterprise_crawler_framework-1.0.0/enterprise_crawler/exceptions/network.py +21 -0
  46. enterprise_crawler_framework-1.0.0/enterprise_crawler/exceptions/plugin.py +13 -0
  47. enterprise_crawler_framework-1.0.0/enterprise_crawler/exceptions/processing.py +5 -0
  48. enterprise_crawler_framework-1.0.0/enterprise_crawler/exceptions/storage.py +9 -0
  49. enterprise_crawler_framework-1.0.0/enterprise_crawler/exceptions/validation.py +9 -0
  50. enterprise_crawler_framework-1.0.0/enterprise_crawler/plugins/__init__.py +128 -0
  51. enterprise_crawler_framework-1.0.0/enterprise_crawler/plugins/autoload.py +633 -0
  52. enterprise_crawler_framework-1.0.0/enterprise_crawler/plugins/discovery.py +797 -0
  53. enterprise_crawler_framework-1.0.0/enterprise_crawler/plugins/loader.py +694 -0
  54. enterprise_crawler_framework-1.0.0/enterprise_crawler/plugins/manager.py +1116 -0
  55. enterprise_crawler_framework-1.0.0/enterprise_crawler/plugins/registry.py +687 -0
  56. enterprise_crawler_framework-1.0.0/enterprise_crawler/processing/__init__.py +218 -0
  57. enterprise_crawler_framework-1.0.0/enterprise_crawler/processing/csv.py +1316 -0
  58. enterprise_crawler_framework-1.0.0/enterprise_crawler/processing/feed.py +1571 -0
  59. enterprise_crawler_framework-1.0.0/enterprise_crawler/processing/html.py +1634 -0
  60. enterprise_crawler_framework-1.0.0/enterprise_crawler/processing/json.py +984 -0
  61. enterprise_crawler_framework-1.0.0/enterprise_crawler/processing/pdf.py +863 -0
  62. enterprise_crawler_framework-1.0.0/enterprise_crawler/processing/pipeline.py +1086 -0
  63. enterprise_crawler_framework-1.0.0/enterprise_crawler/processing/xml.py +944 -0
  64. enterprise_crawler_framework-1.0.0/enterprise_crawler/storage/__init__.py +31 -0
  65. enterprise_crawler_framework-1.0.0/enterprise_crawler/storage/atomic.py +414 -0
  66. enterprise_crawler_framework-1.0.0/enterprise_crawler/storage/local.py +475 -0
  67. enterprise_crawler_framework-1.0.0/enterprise_crawler/storage/local_state_store.py +1137 -0
  68. enterprise_crawler_framework-1.0.0/enterprise_crawler/storage/storage_manager.py +497 -0
  69. enterprise_crawler_framework-1.0.0/enterprise_crawler/version.py +22 -0
  70. enterprise_crawler_framework-1.0.0/enterprise_crawler_framework.egg-info/PKG-INFO +37 -0
  71. enterprise_crawler_framework-1.0.0/enterprise_crawler_framework.egg-info/SOURCES.txt +76 -0
  72. enterprise_crawler_framework-1.0.0/enterprise_crawler_framework.egg-info/dependency_links.txt +1 -0
  73. enterprise_crawler_framework-1.0.0/enterprise_crawler_framework.egg-info/entry_points.txt +2 -0
  74. enterprise_crawler_framework-1.0.0/enterprise_crawler_framework.egg-info/requires.txt +1 -0
  75. enterprise_crawler_framework-1.0.0/enterprise_crawler_framework.egg-info/top_level.txt +1 -0
  76. enterprise_crawler_framework-1.0.0/examples/basic_bot/hello_bot.py +55 -0
  77. enterprise_crawler_framework-1.0.0/pyproject.toml +44 -0
  78. enterprise_crawler_framework-1.0.0/setup.cfg +4 -0
@@ -0,0 +1,88 @@
1
+ # Changelog
2
+
3
+ All notable changes to Enterprise Crawler Framework are documented in this
4
+ file.
5
+
6
+ The project follows Semantic Versioning.
7
+
8
+ ## [1.0.0] - 2026-08-20
9
+
10
+ ### Added
11
+
12
+ - Stable `BaseBot` lifecycle contract.
13
+ - Top-level `Crawler` runtime facade.
14
+ - Public `ExecutionResult` and `ExecutionStatus` contracts.
15
+ - Cooperative shutdown support.
16
+ - Runtime state and execution snapshots.
17
+ - HTTP client with retry and circuit-breaker behavior.
18
+ - Session management.
19
+ - Streaming downloader with size and SHA-256 validation.
20
+ - Opt-in local storage.
21
+ - Atomic file writing.
22
+ - SQLite-backed local state storage.
23
+ - Configuration models and loading helpers.
24
+ - JSON processing.
25
+ - XML processing.
26
+ - CSV processing.
27
+ - HTML processing.
28
+ - Feed processing.
29
+ - PDF processing primitives.
30
+ - Composable processing pipeline.
31
+ - Plugin registry.
32
+ - Plugin manager.
33
+ - Plugin loader.
34
+ - Metadata-only plugin discovery.
35
+ - Python entry-point plugin discovery.
36
+ - Plugin autoload composition.
37
+ - In-memory event queue.
38
+ - Durable SQLite event queue.
39
+ - Claim-token ownership.
40
+ - Queue leases and expired-lease recovery.
41
+ - Event dispatcher.
42
+ - Event worker.
43
+ - Retry classification policy.
44
+ - Exponential retry backoff.
45
+ - Durable scheduled retries.
46
+ - Configurable retry delay caps.
47
+ - Injectable retry jitter.
48
+ - In-memory dead-letter queue.
49
+ - Durable SQLite dead-letter queue.
50
+ - CLI `version` command.
51
+ - CLI `doctor` command.
52
+ - CLI plugin discovery commands.
53
+ - Top-level public API for the primary bot workflow.
54
+ - Runnable `examples/basic_bot/hello_bot.py` quickstart.
55
+ - Wheel and source-distribution build support.
56
+ - Dynamic package versioning from `enterprise_crawler.version.__version__`.
57
+ - Release artifact clean-install smoke testing.
58
+ - GitHub Actions test, lint, and release gates.
59
+
60
+ ### Guarantees
61
+
62
+ - `BaseBot.run()` is framework-owned and cannot be overridden by subclasses.
63
+ - Injected runtime dependencies are not automatically owned by consumers.
64
+ - Storage and plugins are opt-in.
65
+ - Plugin discovery does not import third-party plugin code.
66
+ - Event acknowledgement and negative acknowledgement require valid ownership.
67
+ - Stale queue claim tokens cannot finalize recovered messages.
68
+ - Lease expiration and retry scheduling remain separate concepts.
69
+ - Scheduled retries survive SQLite reopen and process restart.
70
+ - Retry waiting does not increment delivery count.
71
+ - Dead-letter transfer is fail-closed.
72
+ - Retry exhaustion cannot create an infinite immediate requeue loop.
73
+ - Default retry jitter is disabled and preserves deterministic behavior.
74
+ - Wheel and source-distribution metadata use the same runtime version source.
75
+
76
+ ### Verification
77
+
78
+ The final pre-release local regression baseline for 1.0.0 is:
79
+
80
+ - 1629 unit tests passed.
81
+ - 103 integration tests passed.
82
+ - 2 integration tests skipped.
83
+ - 1732 total tests passed.
84
+ - 0 failures.
85
+ - 0 errors.
86
+
87
+ Release artifacts were additionally verified through clean wheel and source
88
+ distribution installations outside the repository.
File without changes
@@ -0,0 +1,24 @@
1
+ # Contributing to Enterprise Crawler Framework
2
+
3
+ Thank you for contributing to Enterprise Crawler Framework.
4
+
5
+ The project aims to remain a small, reliable, domain-independent foundation for
6
+ building production data-collection systems.
7
+
8
+ Changes should preserve clear subsystem boundaries and fail-closed behavior.
9
+
10
+ ## Development Requirements
11
+
12
+ - Python 3.11 or newer
13
+ - pip
14
+ - Git
15
+
16
+ The framework runtime dependency set is intentionally small.
17
+
18
+ ## Local Setup
19
+
20
+ Clone the repository and install it in editable mode:
21
+
22
+ ```bash
23
+ python -m pip install --upgrade pip
24
+ python -m pip install -e .
File without changes
@@ -0,0 +1,10 @@
1
+ include README.md
2
+ include LICENSE
3
+ include CHANGELOG.md
4
+ include SECURITY.md
5
+ include CONTRIBUTING.md
6
+ include CODE_OF_CONDUCT.md
7
+ include pyproject.toml
8
+ include MANIFEST.in
9
+
10
+ recursive-include examples *.py
@@ -0,0 +1,37 @@
1
+ Metadata-Version: 2.4
2
+ Name: enterprise-crawler-framework
3
+ Version: 1.0.0
4
+ Summary: Enterprise-grade crawler framework.
5
+ Author: Lord Jester
6
+ License-Expression: MIT
7
+ Requires-Python: >=3.11
8
+ Description-Content-Type: text/markdown
9
+ License-File: LICENSE
10
+ Requires-Dist: requests>=2.31
11
+ Dynamic: license-file
12
+
13
+ # Enterprise Crawler Framework
14
+
15
+ Enterprise Crawler Framework is a Python framework for building reliable,
16
+ reusable data-collection bots and crawler runtimes.
17
+
18
+ It provides a structured foundation for HTTP collection, lifecycle management,
19
+ storage, processing, plugins, event-driven workloads, retries, durable queues,
20
+ and failure handling without forcing application-specific business rules into
21
+ the framework core.
22
+
23
+ Current version: **1.0.0**
24
+
25
+ ## Requirements
26
+
27
+ - Python 3.11 or newer
28
+ - `requests >= 2.31`
29
+
30
+ ## Installation
31
+
32
+ ### From the repository
33
+
34
+ Clone the repository and install the package:
35
+
36
+ ```bash
37
+ python -m pip install .
@@ -0,0 +1,25 @@
1
+ # Enterprise Crawler Framework
2
+
3
+ Enterprise Crawler Framework is a Python framework for building reliable,
4
+ reusable data-collection bots and crawler runtimes.
5
+
6
+ It provides a structured foundation for HTTP collection, lifecycle management,
7
+ storage, processing, plugins, event-driven workloads, retries, durable queues,
8
+ and failure handling without forcing application-specific business rules into
9
+ the framework core.
10
+
11
+ Current version: **1.0.0**
12
+
13
+ ## Requirements
14
+
15
+ - Python 3.11 or newer
16
+ - `requests >= 2.31`
17
+
18
+ ## Installation
19
+
20
+ ### From the repository
21
+
22
+ Clone the repository and install the package:
23
+
24
+ ```bash
25
+ python -m pip install .
@@ -0,0 +1,83 @@
1
+ # Security Policy
2
+
3
+ Enterprise Crawler Framework is infrastructure software that may interact with
4
+ remote services, local files, persistent state, plugins, and event queues.
5
+
6
+ Security reports are treated separately from ordinary bug reports.
7
+
8
+ ## Supported Versions
9
+
10
+ | Version | Security Support |
11
+ | --- | --- |
12
+ | 1.0.x | Supported |
13
+ | < 1.0 | Not supported |
14
+
15
+ Only the latest patch release of a supported minor version is guaranteed to
16
+ receive security fixes.
17
+
18
+ ## Reporting a Vulnerability
19
+
20
+ Do not publish exploit details, credentials, tokens, private data, or
21
+ proof-of-concept attacks in a public issue.
22
+
23
+ Preferred reporting path:
24
+
25
+ 1. Use the repository's private vulnerability reporting feature from the
26
+ GitHub **Security** tab when it is available.
27
+ 2. Include the affected framework version.
28
+ 3. Describe the vulnerable component and expected security boundary.
29
+ 4. Include minimal reproduction steps.
30
+ 5. Explain the potential impact.
31
+ 6. Include a proposed mitigation if one is known.
32
+
33
+ If private vulnerability reporting is not available, open a public issue that
34
+ contains no vulnerability details and request a private contact channel from
35
+ the maintainer.
36
+
37
+ ## Sensitive Information
38
+
39
+ Never include the following in a report:
40
+
41
+ - production passwords
42
+ - API keys
43
+ - session cookies
44
+ - private tokens
45
+ - customer data
46
+ - confidential documents
47
+ - private infrastructure addresses
48
+ - exploitable credentials
49
+
50
+ Use sanitized fixtures whenever possible.
51
+
52
+ ## Security Boundaries
53
+
54
+ The framework intentionally follows several fail-closed principles.
55
+
56
+ Injected dependencies are not automatically owned or closed by consumers.
57
+
58
+ Plugin discovery and plugin loading are separate operations. Discovery of
59
+ entry-point metadata must not require importing third-party plugin code.
60
+
61
+ Event queue ownership is represented through claim tokens. A stale claim token
62
+ must not acknowledge or negatively acknowledge a recovered message.
63
+
64
+ Dead-letter transfer must preserve the source event when destination storage
65
+ fails.
66
+
67
+ Storage and plugin systems are opt-in.
68
+
69
+ TLS verification is enabled by default. Disabling TLS verification should be
70
+ treated as an explicit operator decision.
71
+
72
+ ## Coordinated Disclosure
73
+
74
+ Please allow reasonable time for investigation, patch preparation, regression
75
+ testing, and release before publicly disclosing a confirmed vulnerability.
76
+
77
+ The maintainer may request additional reproduction information when necessary.
78
+
79
+ ## Non-Security Bugs
80
+
81
+ Crashes, validation errors, incorrect documentation, performance problems, and
82
+ ordinary functional defects that do not create a security impact should be
83
+ reported through the normal issue tracker instead of the security channel.
@@ -0,0 +1,52 @@
1
+ """
2
+ Enterprise Crawler Framework
3
+
4
+ Top-level public API.
5
+
6
+ The root package intentionally exposes only the small set of types required
7
+ for the primary framework workflow:
8
+
9
+ BaseBot
10
+
11
+ Crawler
12
+
13
+ ExecutionResult
14
+
15
+ Subsystem-specific APIs remain available from their dedicated namespaces,
16
+ for example:
17
+
18
+ enterprise_crawler.config
19
+ enterprise_crawler.events
20
+ enterprise_crawler.plugins
21
+ enterprise_crawler.processing
22
+ enterprise_crawler.storage
23
+ """
24
+
25
+ from .version import (
26
+ __version__,
27
+ __title__,
28
+ FRAMEWORK_NAME,
29
+ )
30
+ from .contracts import (
31
+ ExecutionResult,
32
+ )
33
+ from .contracts.enums import (
34
+ ExecutionStatus,
35
+ )
36
+ from .core.base_bot import (
37
+ BaseBot,
38
+ )
39
+ from .core.crawler import (
40
+ Crawler,
41
+ )
42
+
43
+
44
+ __all__ = [
45
+ "__version__",
46
+ "__title__",
47
+ "FRAMEWORK_NAME",
48
+ "BaseBot",
49
+ "Crawler",
50
+ "ExecutionResult",
51
+ "ExecutionStatus",
52
+ ]
@@ -0,0 +1,19 @@
1
+ from enterprise_crawler.cli.main import (
2
+ DoctorCheck,
3
+ build_parser,
4
+ main,
5
+ run_doctor,
6
+ run_plugins_inspect,
7
+ run_plugins_list,
8
+ run_version,
9
+ )
10
+
11
+ __all__ = [
12
+ "DoctorCheck",
13
+ "build_parser",
14
+ "main",
15
+ "run_doctor",
16
+ "run_plugins_inspect",
17
+ "run_plugins_list",
18
+ "run_version",
19
+ ]
@@ -0,0 +1,7 @@
1
+ from enterprise_crawler.cli.main import main
2
+
3
+
4
+ if __name__ == "__main__":
5
+ raise SystemExit(
6
+ main()
7
+ )