A Toloka provider for Apache Airflow
Project description
Airflow Toloka Provider
This library allows you to run crowdsourcing Toloka processes in Apache Airflow - a widely used workflow management system
Here you can find a collection of ready-made Airflow tasks for the most frequently used actions in Toloka-Kit.
Getting started
$ pip install airflow-provider-toloka
A good way to start is to follow the example in this repo.
TolokaHook
TolokaHook
is used for getting toloka OAuth token and creating TolokaClient
with it.
You can get TolokaClient
from TolokaHook
by calling get_conn()
method.
To make an appropriate Airflow Connection you need to create it in the Airflow Connections UI with following parameters:
Conn ID
:toloka_default
Conn Type
:Toloka
Token
: enter your OAuth token for Toloka. You can learn more about how to get it here.Environment
: enterproduction
orsandbox
Tasks use the toloka_default
connection id by default, but
if needed, you can create additional Airflow Connections and reference them
as the function toloka_conn_id
argument.
Tasks and Sensors
There are several tasks and sensors that give you easy way to interact with Toloka from Airflow DAGs.
Creating a project and a pool, adding tasks and getting assignments are among them.
You can easily create your own task using TolokaHook
if it is beyond the scope of implemented ones.
And it would be nice to have your pull request with updates.
Check out our example to see tasks and sensors in the battlefield.
Useful Links
Questions and bug reports
- For reporting bugs please use the Toloka/bugreport page.
- Join our English-speaking slack community for both tech and abstract questions.
License
© YANDEX LLC, 2022. Licensed under the Apache License, Version 2.0. See LICENSE file for more details.
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
File details
Details for the file airflow-provider-toloka-0.0.7.tar.gz
.
File metadata
- Download URL: airflow-provider-toloka-0.0.7.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 616b4709871e310b4fc8e1fe7f0a779b49868b95faa6b4e4b1a6826db1a951a5 |
|
MD5 | e1b24e54b446e03a651592a83f174132 |
|
BLAKE2b-256 | ae0b1305a8372520f9d8f1c3eb532625c6575a634e0f82d500346612564cdc5e |
File details
Details for the file airflow_provider_toloka-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: airflow_provider_toloka-0.0.7-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c6cc78308a46f4d52963a5abd13c51649e4297a22680155ba70fb3f176b1002 |
|
MD5 | 8fe2237bdaf78f0c1b683dd1f366c733 |
|
BLAKE2b-256 | 17f026761de8ec2539bbeb9b31cf5cc791d0fa02d8aa40b00c89c3fa1333426e |