Skip to main content

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, has yield_empty_item()
    • initializes from a typed Service registry (from settings / optional file)
  • ServiceConfig / ServiceRegistry — Pydantic models for strict config.

  • load_registry_from_settings() — merges settings["SERVICES"] with optional JSON file pointed by SCRAPYX_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).

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

scrapyx_core-0.1.1.tar.gz (110.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scrapyx_core-0.1.1-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file scrapyx_core-0.1.1.tar.gz.

File metadata

  • Download URL: scrapyx_core-0.1.1.tar.gz
  • Upload date:
  • Size: 110.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for scrapyx_core-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2a2654a44aacb2541f39dd5ffaec7abb0f085a31c3741c6a414645064d451133
MD5 ecb35d4d246086864ce45dc7c98bd241
BLAKE2b-256 084909473e719e677cdb22c88ab1403e26eead56af107ce2c2f2d1700688a496

See more details on using hashes here.

Provenance

The following attestation bundles were made for scrapyx_core-0.1.1.tar.gz:

Publisher: release.yml on ArmanAvanesyan/scrapyx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scrapyx_core-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: scrapyx_core-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for scrapyx_core-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 be84e022dc64ddb92cded00bd6054f9fca92845564ed81384ff3b3eac253f6ad
MD5 ea66d16c33f4e2d48998c6fd59c6a42b
BLAKE2b-256 4384243743f7546b864d9613292db2c9c685b2efba04d75c2cfabc42d69a8db4

See more details on using hashes here.

Provenance

The following attestation bundles were made for scrapyx_core-0.1.1-py3-none-any.whl:

Publisher: release.yml on ArmanAvanesyan/scrapyx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page