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
returninside a generator). - Request
parent_urlis the page that scheduled the request (e.g. sitemap → product). Start URLs havenull. - 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)
| File | Size | Uploaded | |
|---|---|---|---|
| apcloudy_pipeline-0.2.0.tar.gz | 13.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|