Core of Lacus, usable as a module
Project description
Modulable Lacus
Lacus, but as a simple module.
Installation
pip install lacuscore
Design
LacusCore
is the part taking care of enqueuing and capturing URLs or web enabled documents.
It can be used as a module in your own project, see below for the usage
Lacus is the webservice that uses LacusCore
,
and you can use Pylacus to query it.
The enqueue
, get_capture_status
, and get_capture
methods if LacusCore
and PyLacus
have
the same parameters which means you can easily use them interchangeably in your project.
Usage
The recommended way to use this module is as follows:
- Enqueue what you want to capture with
enqueue
(it returns a UUID) - Trigger the capture itself. For that, you have two options
-
The
capture
method directly, if you pass it the UUID you got fromenqueue
. This is what you want to use to do the capture in the same process as the one enqueuing the capture -
If you rather want to enqueue the captures in one part of your code and trigger the captures in an other one, use
consume_queue
which will pick a capture from the queue and trigger the capture. I this case, you should useget_capture_status
to check if the capture is over before the last step.
- Get the capture result with
get_capture
with the UUID from you got fromenqueue
.
Project details
Release history Release notifications | RSS feed
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
Hashes for lacuscore-0.4.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a576b8d94bf091603df5d4ba75f0c4a35f5e9fc554d951949c609638f45ba4de |
|
MD5 | ffec6d3665f235c4061539d78c0bee4b |
|
BLAKE2b-256 | b2bd4675702affeeb91c5b65adc77c9a64ea186895f76aab9851cc0339e02133 |