parallel-web-tools 0.5.0__tar.gz → 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 (53) hide show
  1. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/PKG-INFO +16 -2
  2. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/README.md +14 -0
  3. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/__init__.py +3 -1
  4. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/cli/commands.py +87 -0
  5. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/core/__init__.py +4 -0
  6. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/core/findall.py +41 -1
  7. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/integrations/bigquery/cloud_function/requirements.txt +1 -1
  8. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/pyproject.toml +2 -2
  9. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/.gitignore +0 -0
  10. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/cli/__init__.py +0 -0
  11. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/cli/planner.py +0 -0
  12. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/cli/skills.py +0 -0
  13. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/cli/updater.py +0 -0
  14. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/core/auth.py +0 -0
  15. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/core/batch.py +0 -0
  16. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/core/credentials.py +0 -0
  17. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/core/endpoints.py +0 -0
  18. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/core/monitor.py +0 -0
  19. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/core/polling.py +0 -0
  20. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/core/research.py +0 -0
  21. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/core/result.py +0 -0
  22. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/core/runner.py +0 -0
  23. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/core/schema.py +0 -0
  24. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/core/service.py +0 -0
  25. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/core/service_types.py +0 -0
  26. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/core/skills.py +0 -0
  27. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/core/sql_utils.py +0 -0
  28. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/core/user_agent.py +0 -0
  29. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/integrations/__init__.py +0 -0
  30. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/integrations/bigquery/__init__.py +0 -0
  31. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/integrations/bigquery/cloud_function/main.py +0 -0
  32. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/integrations/bigquery/deploy.py +0 -0
  33. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/integrations/bigquery/sql/create_functions.sql +0 -0
  34. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/integrations/duckdb/__init__.py +0 -0
  35. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/integrations/duckdb/batch.py +0 -0
  36. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/integrations/duckdb/findall.py +0 -0
  37. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/integrations/duckdb/udf.py +0 -0
  38. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/integrations/polars/__init__.py +0 -0
  39. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/integrations/polars/enrich.py +0 -0
  40. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/integrations/snowflake/__init__.py +0 -0
  41. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/integrations/snowflake/deploy.py +0 -0
  42. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/integrations/snowflake/sql/01_setup.sql +0 -0
  43. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/integrations/snowflake/sql/02_create_udf.sql +0 -0
  44. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/integrations/snowflake/sql/03_cleanup.sql +0 -0
  45. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/integrations/spark/__init__.py +0 -0
  46. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/integrations/spark/streaming.py +0 -0
  47. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/integrations/spark/udf.py +0 -0
  48. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/integrations/utils.py +0 -0
  49. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/processors/__init__.py +0 -0
  50. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/processors/bigquery.py +0 -0
  51. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/processors/csv.py +0 -0
  52. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/processors/duckdb.py +0 -0
  53. {parallel_web_tools-0.5.0 → parallel_web_tools-0.6.0}/parallel_web_tools/processors/json.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: parallel-web-tools
3
- Version: 0.5.0
3
+ Version: 0.6.0
4
4
  Summary: Parallel Tools: CLI and Python SDK for AI-powered web intelligence
5
5
  Project-URL: Homepage, https://github.com/parallel-web/parallel-web-tools
6
6
  Project-URL: Documentation, https://docs.parallel.ai
@@ -24,7 +24,7 @@ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
24
24
  Requires-Python: >=3.10
25
25
  Requires-Dist: click>=8.1.0
26
26
  Requires-Dist: httpx>=0.25.0
27
- Requires-Dist: parallel-web>=0.6.0
27
+ Requires-Dist: parallel-web<2,>=1.0.0
28
28
  Requires-Dist: python-dotenv>=1.0.0
29
29
  Requires-Dist: rich>=13.0.0
30
30
  Provides-Extra: all
@@ -175,6 +175,7 @@ parallel-cli
175
175
  ├── findall # Web-scale entity discovery
176
176
  │ ├── run # Discover entities matching a natural language objective
177
177
  │ ├── ingest # Preview the schema before running
178
+ │ ├── entity-search # Fast entity search (best-effort optimized for low latency)
178
179
  │ ├── status # Check status of a FindAll run
179
180
  │ ├── poll # Poll until completion
180
181
  │ ├── result # Fetch results of a completed run
@@ -341,6 +342,9 @@ parallel-cli enrich suggest "Find CEO" --json
341
342
  # FindAll: discover entities
342
343
  parallel-cli findall run "AI startups in healthcare" --json
343
344
 
345
+ # FindAll entity-search: fast, low-latency ranked entities (synchronous)
346
+ parallel-cli findall entity-search "AI startups in healthcare" -t companies -n 25
347
+
344
348
  # Monitor: track web changes
345
349
  parallel-cli monitor create "Track Tesla SEC filings" --frequency 1d --json
346
350
 
@@ -462,6 +466,16 @@ from parallel_web_tools import enrich_findall, extend_findall, get_findall_schem
462
466
  schema = get_findall_schema(result.run_id)
463
467
  enriched = enrich_findall(result.run_id, ["funding amount", "number of employees"])
464
468
  extended = extend_findall(result.run_id, additional_matches=10)
469
+
470
+
471
+ # Fast, low-latency entity search (synchronous)
472
+ from parallel_web_tools import entity_search_findall
473
+
474
+ entities = entity_search_findall(
475
+ "AI startups in healthcare",
476
+ entity_type="companies", # "companies" or "people"
477
+ match_limit=25,
478
+ )
465
479
  ```
466
480
 
467
481
  ### Monitor
@@ -89,6 +89,7 @@ parallel-cli
89
89
  ├── findall # Web-scale entity discovery
90
90
  │ ├── run # Discover entities matching a natural language objective
91
91
  │ ├── ingest # Preview the schema before running
92
+ │ ├── entity-search # Fast entity search (best-effort optimized for low latency)
92
93
  │ ├── status # Check status of a FindAll run
93
94
  │ ├── poll # Poll until completion
94
95
  │ ├── result # Fetch results of a completed run
@@ -255,6 +256,9 @@ parallel-cli enrich suggest "Find CEO" --json
255
256
  # FindAll: discover entities
256
257
  parallel-cli findall run "AI startups in healthcare" --json
257
258
 
259
+ # FindAll entity-search: fast, low-latency ranked entities (synchronous)
260
+ parallel-cli findall entity-search "AI startups in healthcare" -t companies -n 25
261
+
258
262
  # Monitor: track web changes
259
263
  parallel-cli monitor create "Track Tesla SEC filings" --frequency 1d --json
260
264
 
@@ -376,6 +380,16 @@ from parallel_web_tools import enrich_findall, extend_findall, get_findall_schem
376
380
  schema = get_findall_schema(result.run_id)
377
381
  enriched = enrich_findall(result.run_id, ["funding amount", "number of employees"])
378
382
  extended = extend_findall(result.run_id, additional_matches=10)
383
+
384
+
385
+ # Fast, low-latency entity search (synchronous)
386
+ from parallel_web_tools import entity_search_findall
387
+
388
+ entities = entity_search_findall(
389
+ "AI startups in healthcare",
390
+ entity_type="companies", # "companies" or "people"
391
+ match_limit=25,
392
+ )
379
393
  ```
380
394
 
381
395
  ### Monitor
@@ -13,6 +13,7 @@ from parallel_web_tools.core import (
13
13
  create_monitor,
14
14
  enrich_batch,
15
15
  enrich_single,
16
+ entity_search_findall,
16
17
  get_api_key,
17
18
  get_async_client,
18
19
  get_auth_status,
@@ -35,7 +36,7 @@ from parallel_web_tools.core import (
35
36
  update_monitor,
36
37
  )
37
38
 
38
- __version__ = "0.5.0"
39
+ __version__ = "0.6.0"
39
40
 
40
41
  __all__ = [
41
42
  # Auth
@@ -66,6 +67,7 @@ __all__ = [
66
67
  "run_enrichment_from_dict",
67
68
  # FindAll
68
69
  "run_findall",
70
+ "entity_search_findall",
69
71
  # Monitor
70
72
  "cancel_monitor",
71
73
  "create_monitor",
@@ -31,6 +31,7 @@ from parallel_web_tools.core import (
31
31
  create_monitor,
32
32
  create_research_task,
33
33
  enrich_findall,
34
+ entity_search_findall,
34
35
  extend_findall,
35
36
  get_api_key,
36
37
  get_auth_status,
@@ -2756,6 +2757,92 @@ def findall_ingest(objective: str, output_json: bool):
2756
2757
  _handle_error(e, output_json=output_json)
2757
2758
 
2758
2759
 
2760
+ @findall.command(name="entity-search")
2761
+ @click.argument("objective")
2762
+ @click.option(
2763
+ "-t",
2764
+ "--entity-type",
2765
+ type=click.Choice(["companies", "people"]),
2766
+ required=True,
2767
+ help="Entity type to search for",
2768
+ )
2769
+ @click.option(
2770
+ "-n",
2771
+ "--match-limit",
2772
+ type=click.IntRange(5, 1000),
2773
+ default=10,
2774
+ show_default=True,
2775
+ help="Maximum entities to return (5-1000)",
2776
+ )
2777
+ @click.option("-o", "--output", "output_file", type=click.Path(), help="Save result to JSON file")
2778
+ @click.option("--json", "output_json", is_flag=True, help="Output JSON to stdout")
2779
+ def findall_entity_search(
2780
+ objective: str,
2781
+ entity_type: str,
2782
+ match_limit: int,
2783
+ output_file: str | None,
2784
+ output_json: bool,
2785
+ ):
2786
+ """Return ranked entities matching a natural language objective.
2787
+
2788
+ A best-effort, low-latency search. For comprehensive match evaluation and
2789
+ enrichment, use `parallel-cli findall run` instead.
2790
+
2791
+ OBJECTIVE is a natural language description of what to find.
2792
+
2793
+ Examples:
2794
+
2795
+ parallel-cli findall entity-search "AI startups in San Francisco" -t companies
2796
+
2797
+ parallel-cli findall entity-search "Senior PMs at AI startups" -t people -n 25
2798
+
2799
+ parallel-cli findall entity-search "Charlotte roofing companies" -t companies -o out.json
2800
+ """
2801
+ try:
2802
+ result = entity_search_findall(
2803
+ objective,
2804
+ entity_type=entity_type,
2805
+ match_limit=match_limit,
2806
+ source="cli",
2807
+ )
2808
+
2809
+ write_json_output(result, output_file, output_json)
2810
+
2811
+ if not output_json:
2812
+ entities = result.get("entities", []) or []
2813
+
2814
+ console.print("\n[bold green]Entity Search Complete![/bold green]")
2815
+ console.print(f"[dim]Entity set: {result.get('entity_set_id')}[/dim]")
2816
+ console.print(f"[dim]Entity type: {entity_type} | Found: {len(entities)}[/dim]\n")
2817
+
2818
+ if entities:
2819
+ from rich.table import Table
2820
+
2821
+ table = Table(title=f"Entities ({len(entities)})")
2822
+ table.add_column("Name", style="cyan", no_wrap=True)
2823
+ table.add_column("URL", style="dim")
2824
+ table.add_column("Description", max_width=50)
2825
+
2826
+ for c in entities:
2827
+ table.add_row(
2828
+ c.get("name", ""),
2829
+ c.get("url", ""),
2830
+ (c.get("description", "") or "")[:50],
2831
+ )
2832
+
2833
+ console.print(table)
2834
+ console.print()
2835
+ else:
2836
+ console.print("[yellow]No entities returned.[/yellow]")
2837
+ console.print("[dim]Tip: check that --entity-type matches the objective (companies vs people).[/dim]\n")
2838
+
2839
+ if not output_file:
2840
+ console.print("[dim]Use --output to save full results, or --json for machine-readable output[/dim]")
2841
+
2842
+ except Exception as e:
2843
+ _handle_error(e, output_json=output_json)
2844
+
2845
+
2759
2846
  @findall.command(name="status")
2760
2847
  @click.argument("findall_id")
2761
2848
  @click.option("--json", "output_json", is_flag=True, help="Output as JSON")
@@ -25,10 +25,12 @@ from parallel_web_tools.core.batch import (
25
25
  run_tasks,
26
26
  )
27
27
  from parallel_web_tools.core.findall import (
28
+ ENTITY_SEARCH_ENTITY_TYPES,
28
29
  FINDALL_GENERATORS,
29
30
  cancel_findall_run,
30
31
  create_findall_run,
31
32
  enrich_findall,
33
+ entity_search_findall,
32
34
  extend_findall,
33
35
  get_findall_result,
34
36
  get_findall_schema,
@@ -138,10 +140,12 @@ __all__ = [
138
140
  "poll_research",
139
141
  "run_research",
140
142
  # FindAll
143
+ "ENTITY_SEARCH_ENTITY_TYPES",
141
144
  "FINDALL_GENERATORS",
142
145
  "cancel_findall_run",
143
146
  "create_findall_run",
144
147
  "enrich_findall",
148
+ "entity_search_findall",
145
149
  "extend_findall",
146
150
  "get_findall_result",
147
151
  "get_findall_schema",
@@ -14,7 +14,7 @@ The typical workflow is:
14
14
  from __future__ import annotations
15
15
 
16
16
  from collections.abc import Callable
17
- from typing import Any
17
+ from typing import Any, Literal, cast
18
18
 
19
19
  from parallel_web_tools.core.auth import create_client
20
20
  from parallel_web_tools.core.polling import poll_until
@@ -29,6 +29,10 @@ FINDALL_GENERATORS = {
29
29
 
30
30
  FINDALL_TERMINAL_STATUSES = ("completed", "failed", "cancelled")
31
31
 
32
+ # Entity types supported by the sync entity-search endpoint.
33
+ EntitySearchEntityType = Literal["companies", "people"]
34
+ ENTITY_SEARCH_ENTITY_TYPES: tuple[EntitySearchEntityType, ...] = ("companies", "people")
35
+
32
36
 
33
37
  def _serialize(obj: Any) -> Any:
34
38
  """Serialize an SDK object to a plain dict/list."""
@@ -579,6 +583,42 @@ def extend_findall(
579
583
  return _serialize(result)
580
584
 
581
585
 
586
+ def entity_search_findall(
587
+ objective: str,
588
+ entity_type: str,
589
+ match_limit: int,
590
+ api_key: str | None = None,
591
+ source: ClientSource = "python",
592
+ ) -> dict[str, Any]:
593
+ """Run a synchronous entity search for ranked entities.
594
+
595
+ Best-effort, low-latency search that returns ranked entities for a natural
596
+ language objective. For comprehensive match evaluation and enrichment, use
597
+ the full FindAll API (run_findall / create_findall_run).
598
+
599
+ Args:
600
+ objective: Natural language description of what to find.
601
+ entity_type: One of "companies" or "people".
602
+ match_limit: Maximum entities to return.
603
+ api_key: Optional API key override.
604
+ source: Client source identifier for User-Agent.
605
+
606
+ Returns:
607
+ Dict with entity_set_id and a ranked list of entities
608
+ ({"name", "description", "url"}).
609
+ """
610
+ if entity_type not in ENTITY_SEARCH_ENTITY_TYPES:
611
+ raise ValueError(f"entity_type must be one of {ENTITY_SEARCH_ENTITY_TYPES}, got {entity_type!r}")
612
+
613
+ client = create_client(api_key, source)
614
+ result = client.beta.findall.entity_search(
615
+ objective=objective,
616
+ entity_type=cast(EntitySearchEntityType, entity_type),
617
+ match_limit=match_limit,
618
+ )
619
+ return _serialize(result)
620
+
621
+
582
622
  def get_findall_schema(
583
623
  findall_id: str,
584
624
  api_key: str | None = None,
@@ -1,5 +1,5 @@
1
1
  # Cloud Function dependencies for BigQuery Remote Function
2
2
  functions-framework>=3.0.0
3
3
  flask>=3.0.0
4
- parallel-web-tools>=0.5.0
4
+ parallel-web-tools>=0.6.0
5
5
  google-cloud-secret-manager>=2.20.0
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "parallel-web-tools"
7
- version = "0.5.0"
7
+ version = "0.6.0"
8
8
  description = "Parallel Tools: CLI and Python SDK for AI-powered web intelligence"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -29,7 +29,7 @@ classifiers = [
29
29
  ]
30
30
 
31
31
  dependencies = [
32
- "parallel-web>=0.6.0",
32
+ "parallel-web>=1.0.0,<2",
33
33
  "python-dotenv>=1.0.0",
34
34
  # CLI dependencies (minimal - search, extract, enrich with CLI args)
35
35
  "click>=8.1.0",