nlweb-crawler 0.6.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 (42) hide show
  1. nlweb_crawler-0.6.0/LICENSE +21 -0
  2. nlweb_crawler-0.6.0/PKG-INFO +65 -0
  3. nlweb_crawler-0.6.0/README.md +29 -0
  4. nlweb_crawler-0.6.0/nlweb_crawler/__init__.py +0 -0
  5. nlweb_crawler-0.6.0/nlweb_crawler/api.py +1349 -0
  6. nlweb_crawler-0.6.0/nlweb_crawler/config.py +37 -0
  7. nlweb_crawler-0.6.0/nlweb_crawler/cosmos_db.py +277 -0
  8. nlweb_crawler-0.6.0/nlweb_crawler/db.py +753 -0
  9. nlweb_crawler-0.6.0/nlweb_crawler/embedding_provider/__init__.py +3 -0
  10. nlweb_crawler-0.6.0/nlweb_crawler/embedding_provider/azure_oai_embedding.py +116 -0
  11. nlweb_crawler-0.6.0/nlweb_crawler/get_queue.py +35 -0
  12. nlweb_crawler-0.6.0/nlweb_crawler/job_manager.py +213 -0
  13. nlweb_crawler-0.6.0/nlweb_crawler/log.py +70 -0
  14. nlweb_crawler-0.6.0/nlweb_crawler/master.py +455 -0
  15. nlweb_crawler-0.6.0/nlweb_crawler/metrics.py +80 -0
  16. nlweb_crawler-0.6.0/nlweb_crawler/queue_interface.py +197 -0
  17. nlweb_crawler-0.6.0/nlweb_crawler/queue_interface_storage.py +131 -0
  18. nlweb_crawler-0.6.0/nlweb_crawler/rss2schema.py +232 -0
  19. nlweb_crawler-0.6.0/nlweb_crawler/scheduler.py +63 -0
  20. nlweb_crawler-0.6.0/nlweb_crawler/static/README.md +316 -0
  21. nlweb_crawler-0.6.0/nlweb_crawler/static/api-docs.html +943 -0
  22. nlweb_crawler-0.6.0/nlweb_crawler/static/app.js +391 -0
  23. nlweb_crawler-0.6.0/nlweb_crawler/static/faq.html +202 -0
  24. nlweb_crawler-0.6.0/nlweb_crawler/static/file.html +302 -0
  25. nlweb_crawler-0.6.0/nlweb_crawler/static/files.html +291 -0
  26. nlweb_crawler-0.6.0/nlweb_crawler/static/index.html +411 -0
  27. nlweb_crawler-0.6.0/nlweb_crawler/static/queue.html +282 -0
  28. nlweb_crawler-0.6.0/nlweb_crawler/static/site-details.html +677 -0
  29. nlweb_crawler-0.6.0/nlweb_crawler/static/site.html +298 -0
  30. nlweb_crawler-0.6.0/nlweb_crawler/static/workers.html +316 -0
  31. nlweb_crawler-0.6.0/nlweb_crawler/vector_db.py +538 -0
  32. nlweb_crawler-0.6.0/nlweb_crawler/worker.py +1153 -0
  33. nlweb_crawler-0.6.0/nlweb_crawler.egg-info/PKG-INFO +65 -0
  34. nlweb_crawler-0.6.0/nlweb_crawler.egg-info/SOURCES.txt +40 -0
  35. nlweb_crawler-0.6.0/nlweb_crawler.egg-info/dependency_links.txt +1 -0
  36. nlweb_crawler-0.6.0/nlweb_crawler.egg-info/entry_points.txt +4 -0
  37. nlweb_crawler-0.6.0/nlweb_crawler.egg-info/requires.txt +17 -0
  38. nlweb_crawler-0.6.0/nlweb_crawler.egg-info/top_level.txt +1 -0
  39. nlweb_crawler-0.6.0/pyproject.toml +93 -0
  40. nlweb_crawler-0.6.0/setup.cfg +4 -0
  41. nlweb_crawler-0.6.0/tests/test_master.py +92 -0
  42. nlweb_crawler-0.6.0/tests/test_worker.py +937 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 nlweb.ai
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,65 @@
1
+ Metadata-Version: 2.4
2
+ Name: nlweb-crawler
3
+ Version: 0.6.0
4
+ Summary: NLWeb Crawler - Web crawling and indexing service
5
+ Author: nlweb-ai
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/nlweb-ai/nlweb-ask-agent
8
+ Project-URL: Repository, https://github.com/nlweb-ai/nlweb-ask-agent
9
+ Project-URL: Issues, https://github.com/nlweb-ai/nlweb-ask-agent/issues
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Requires-Python: >=3.12
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENSE
18
+ Requires-Dist: flask>=2.3.3
19
+ Requires-Dist: flask-cors>=4.0.0
20
+ Requires-Dist: pymssql>=2.2.0
21
+ Requires-Dist: requests>=2.31.0
22
+ Requires-Dist: azure-storage-blob>=12.19.0
23
+ Requires-Dist: azure-identity>=1.14.0
24
+ Requires-Dist: azure-search-documents>=11.4.0
25
+ Requires-Dist: azure-storage-queue>=12.8.0
26
+ Requires-Dist: azure-cosmos>=4.5.0
27
+ Requires-Dist: openai>=1.0.0
28
+ Requires-Dist: feedparser>=6.0.0
29
+ Requires-Dist: python-dateutil>=2.8.0
30
+ Requires-Dist: prometheus-client>=0.21.0
31
+ Requires-Dist: Cython<3
32
+ Requires-Dist: pytest>=7.0.0
33
+ Requires-Dist: ruff>=0.4.0
34
+ Requires-Dist: pyright>=1.1.408
35
+ Dynamic: license-file
36
+
37
+ # Crawler
38
+
39
+ Distributed web crawler for schema.org structured data.
40
+
41
+ ## Architecture
42
+
43
+ Master/worker pattern running as separate pods in Kubernetes:
44
+ - **Master**: Flask API + job scheduler
45
+ - **Worker**: Queue processor (embedding + upload to Azure AI Search)
46
+
47
+ Flow: Parse schema.org sitemaps → queue JSON files → embed → upload
48
+
49
+ ## Endpoints
50
+
51
+ - `GET /` - Web UI
52
+ - `GET /api/status` - System status
53
+ - `POST /api/sites` - Add site to crawl
54
+ - `GET /api/queue/status` - Queue statistics
55
+
56
+ ## Commands
57
+
58
+ Run `make help` for the full list. Key targets:
59
+
60
+ ```
61
+ make dev # Run master + worker via Docker Compose
62
+ make test # Run pytest
63
+ make build # Build image to ACR
64
+ make deploy # Deploy to AKS via Helm
65
+ ```
@@ -0,0 +1,29 @@
1
+ # Crawler
2
+
3
+ Distributed web crawler for schema.org structured data.
4
+
5
+ ## Architecture
6
+
7
+ Master/worker pattern running as separate pods in Kubernetes:
8
+ - **Master**: Flask API + job scheduler
9
+ - **Worker**: Queue processor (embedding + upload to Azure AI Search)
10
+
11
+ Flow: Parse schema.org sitemaps → queue JSON files → embed → upload
12
+
13
+ ## Endpoints
14
+
15
+ - `GET /` - Web UI
16
+ - `GET /api/status` - System status
17
+ - `POST /api/sites` - Add site to crawl
18
+ - `GET /api/queue/status` - Queue statistics
19
+
20
+ ## Commands
21
+
22
+ Run `make help` for the full list. Key targets:
23
+
24
+ ```
25
+ make dev # Run master + worker via Docker Compose
26
+ make test # Run pytest
27
+ make build # Build image to ACR
28
+ make deploy # Deploy to AKS via Helm
29
+ ```
File without changes