functionVerified releasev1

fetch_snapshot

Fetch and normalize a bounded sample of real Hacker News stories through the official API. Explicit feed, item limit, timeout, retries and total time budget. Requires network access and httpx in the caller's environment; returns records and acquisition provenance. No bundled dataset or fallback data.

Library
case4-hn
Updated
Runtime
current process; user-managed packages · Python 3.13

Interface

Verified contract

Callable Object

Inputs

NameType
feedstr
max_itemsint
timeoutfloat
attemptsint
budget_secondsfloat
proxystr | None
transportunspecified

Outputs

NameType
defaultdict

Exact release

Pinned local call

from spl import SPLClient

result = SPLClient.embedded().call(
    "splime://@splime.project/case4-hn/fetch_snapshot@1",
    kwargs={'attempts': 0, 'budget_seconds': 0.0, 'feed': 'replace-with-value', 'max_items': 0, 'proxy': 'replace-with-value', 'timeout': 0.0, 'transport': 'replace-with-value'},
    trust=True,
)

Review before running. Public bundles contain executable code. Verify the publisher and exact content hash; a virtual environment isolates dependencies, not the operating system.

Evidence

Evidence-backed concepts

  • Fetch snapshot
  • Total time budget
  • Requires network access
  • No bundled dataset
  • Official API
  • Explicit feed
  • Acquisition provenance
  • Httpx caller s environment

History

Public versions

  • v19 downloads

Discover

Similar Objects

Explore all