Shared Scrapy base spider + typed service configuration registry
Project description
scrapyx-core
Shared base spider and typed service configuration utilities for Scrapy projects.
What you get
-
BaseServiceSpider— production-ready base class that:- exposes
service_config,captcha_needed,site_key - collects
items/errors, hasyield_empty_item() - initializes from a typed Service registry (from settings / optional file)
- exposes
-
ServiceConfig/ServiceRegistry— Pydantic models for strict config. -
load_registry_from_settings()— mergessettings["SERVICES"]with optional JSON file pointed bySCRAPYX_SERVICES_FILE. -
validators— functions you can call (or wire from an extension) to fail fast in CI/Scrapyd.
Minimal usage
# in your spiders
from scrapyx_core.base import BaseServiceSpider
class InspectionSpider(BaseServiceSpider):
name = "inspection"
# use self.service_config / self.captcha_needed / self.site_key
Optionally, set SCRAPYX_SERVICES_FILE=/path/to/services.json to load/merge external config.
This package is middleware-agnostic and pairs well with scrapyx-mw (add-on + middlewares).
Install and optional extras
Base usage (BaseServiceSpider, ServiceRegistry, config) requires only the default install:
uv add scrapyx-core
# or: pip install scrapyx-core
Extensions that need extra dependencies:
- WebhookExtension (webhook callbacks on spider close):
uv add scrapyx-core[webhook]orpip install scrapyx-core[webhook] - CompletionPublisherExtension (FastStream/RabbitMQ/Redis):
uv add scrapyx-core[completion]orpip install scrapyx-core[completion] - Both:
uv add scrapyx-core[webhook,completion]
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scrapyx_core-0.2.2.tar.gz.
File metadata
- Download URL: scrapyx_core-0.2.2.tar.gz
- Upload date:
- Size: 119.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94b695efbc782c7c42768048a630c29f85f30fd67729e1c91d33de73572aafb7
|
|
| MD5 |
770812506a7fb295e8c218163a4dc2fa
|
|
| BLAKE2b-256 |
20116f7aa1429bcfd367b6ac4756d2b46c73079e872a7444f1bb550e446c4e18
|
Provenance
The following attestation bundles were made for scrapyx_core-0.2.2.tar.gz:
Publisher:
release.yml on ArmanAvanesyan/scrapyx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scrapyx_core-0.2.2.tar.gz -
Subject digest:
94b695efbc782c7c42768048a630c29f85f30fd67729e1c91d33de73572aafb7 - Sigstore transparency entry: 929810322
- Sigstore integration time:
-
Permalink:
ArmanAvanesyan/scrapyx@6128d4faa129c6e54e8b5b5a844151a1997d94e0 -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/ArmanAvanesyan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6128d4faa129c6e54e8b5b5a844151a1997d94e0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file scrapyx_core-0.2.2-py3-none-any.whl.
File metadata
- Download URL: scrapyx_core-0.2.2-py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b2edc7fd7a7d746598cc2dc3c418e9e0032bead2bc2f757c092235ba3a2409a
|
|
| MD5 |
21f69e2b7c559681fa4191cbd06fe434
|
|
| BLAKE2b-256 |
9e81a460ea2b645ca42215a5c0a029b43465f7e4c5e7fc40033ccf16211e76d5
|
Provenance
The following attestation bundles were made for scrapyx_core-0.2.2-py3-none-any.whl:
Publisher:
release.yml on ArmanAvanesyan/scrapyx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scrapyx_core-0.2.2-py3-none-any.whl -
Subject digest:
9b2edc7fd7a7d746598cc2dc3c418e9e0032bead2bc2f757c092235ba3a2409a - Sigstore transparency entry: 929810328
- Sigstore integration time:
-
Permalink:
ArmanAvanesyan/scrapyx@6128d4faa129c6e54e8b5b5a844151a1997d94e0 -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/ArmanAvanesyan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6128d4faa129c6e54e8b5b5a844151a1997d94e0 -
Trigger Event:
push
-
Statement type: