Skip to main content

Python CLI and module for lacus

Project description

Python client and module for Lacus

Use this module to interact with a Lacus instance.

Installation

pip install pylacus

Usage

Command line

You can use the pylacus command:

$ pylacus -h
usage: pylacus [-h] --url-instance URL_INSTANCE [--redis_up] {enqueue,status,result} ...

Query a Lacus instance.

positional arguments:
  {enqueue,status,result}
                        Available commands
    enqueue             Enqueue a url for capture
    status              Get status of a capture
    result              Get result of a capture.

options:
  -h, --help            show this help message and exit
  --url-instance URL_INSTANCE
                        URL of the instance.
  --redis_up            Check if redis is up.

Library

See API Reference

Example

Enqueue

from redis import Redis
from lacuscore import LacusCore

redis = Redis()
lacus = lacus = PyLacus("http://127.0.0.1:7100")
uuid = lacus.enqueue('google.fr')

Status of a capture

status = lacus.get_capture_status(uuid)

Capture result

result = lacus.get_capture(uuid)

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

pylacus-1.8.0.tar.gz (6.1 kB view hashes)

Uploaded source

Built Distribution

pylacus-1.8.0-py3-none-any.whl (6.9 kB view hashes)

Uploaded py3

Supported by

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