Skip to main content

APCloudy Pipeline

Scrapy integration that sends items, requests, logs, and stats to AP Cloudy with HMAC auth and full job log capture.

Install

pip install apcloudy-pipeline

Settings

Only the item pipeline is required — requests, logs, stats, parent_url, and error logging are enabled automatically:

APCLOUDY_URL = "https://your-api.com"
APCLOUDY_API_KEY = "your_public_api_key"
APCLOUDY_SECRET_KEY = "your_secret_key"
JOB_ID = 123
APCLOUDY_BATCH_SIZE = 50  # optional

ITEM_PIPELINES = {
    "apcloudy_pipeline.pipelines.APCloudyItemPipeline": 300,
}

Log level follows Scrapy LOG_LEVEL.

Payload

{
  "job_id": "123",
  "data": {
    "requests": [{ "url": "...", "parent_url": "https://...", "status_code": 200, "success": true, "...": "..." }],
    "items": [{ "title": "...", "_ts": 1753358220 }],
    "logs": [{
      "index": 0,
      "time": "2026-07-01 13:02:55",
      "timestamp": 1751374975.12,
      "level": "INFO",
      "logger": "scrapy.core.engine",
      "message": "Spider opened",
      "exception": null
    }],
    "stats": { "item_scraped_count": 1, "finish_reason": "finished" }
  }
}

Logs cover startup → crawl → stats dump → closed (plus print() spider lines).

Auth

X-API-KEY / X-TIMESTAMP / X-SIGNATURE
POST {APCLOUDY_URL}/api/webhook/consume
signature = HMAC-SHA256(secret, timestamp + "." + body)

Notes

  • Yield items from callbacks (not only return inside a generator).
  • Request parent_url is the page that scheduled the request (e.g. sitemap → product). Start URLs have null.
  • Data flushes on batch size, every 10s, and on engine/process stop — same payload shape as before.
  • Requires Python 3.8+, Scrapy 2.0+, requests, w3lib, itemadapter.

License

MIT

Metadata

Release files for apcloudy-pipeline 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for apcloudy-pipeline 0.2.0
File Size Uploaded
apcloudy_pipeline-0.2.0.tar.gz 13.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for apcloudy-pipeline 0.2.0
File Interpreter ABI Platform
apcloudy_pipeline-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 28.4 kB

Release files / apcloudy_pipeline-0.2.0.tar.gz

Download URL apcloudy_pipeline-0.2.0.tar.gz
Size 13.0 kB
Tags Source
SHA-256 checksum
How to use checksums
01b4eb40fec30733a316c7ec7151593faa522ec01662c51973a2ce93df36e433
BLAKE2b-256 checksum
How to use checksums
a17281328e75cc0227422bd1aedb72f2c6826953a7a8bbfa43c22830c92d0b3f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / apcloudy_pipeline-0.2.0-py3-none-any.whl

Download URL apcloudy_pipeline-0.2.0-py3-none-any.whl
Size 15.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2e3ea92dcd3585e9262d903c20a61ec352e68ffac6a13ff7be0418c83a6a6ff4
BLAKE2b-256 checksum
How to use checksums
2c4c01b3c7021778531e27951027f6121136eb520954261a802bef749346af88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.9

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page