Skip to content

bitmakerla/estela-entrypoint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

c539942 ยท Jan 31, 2024

History

46 Commits
Nov 4, 2022
Jan 31, 2024
Apr 1, 2023
May 27, 2021
Nov 14, 2022
Nov 4, 2022
Apr 1, 2023
Apr 1, 2023
Jul 11, 2023
Jul 11, 2023
May 18, 2021
Oct 30, 2023

Repository files navigation

estela Entrypoint

Code style: black version python-version

The package implements a wrapper layer to extract job data from environment, prepare the job properly, and execute it using Scrapy.

Entrypoints

  • estela-crawl: Process job args and settings to run the job with Scrapy.
  • estela-describe-project: Print JSON-encoded project information and image metadata.

Installation

$ python setup.py install 

Requirements

$ pip install -r requirements.txt

Environment variables

Job specifications are passed through env variables:

  • JOB_INFO: Dictionary with this fields:
    • [Required] key: Job key (job ID, spider ID and project ID).
    • [Required] spider: String spider name.
    • [Required] auth_token: User token authentication.
    • [Required] api_host: API host URL.
    • [Optional] args: Dictionary with job arguments.
    • [Required] collection: String with name of collection where items will be stored.
    • [Optional] unique: String, "True" if the data will be stored in a unique collection, "False" otherwise. Required only for cronjobs.
  • QUEUE_PLATFORM: The queue platform used by estela, review the list of the current supported platforms.
  • QUEUE_PLATFORM_{PARAMETERS}: Please, refer to the estela-queue-adapter documentation to declare the needed variables.

Testing

$ pytest

Formatting

$ black .

Releases

No releases published

Packages

No packages published

Languages