Skip to main content

Just RPA Common Library

Project description

JUSTRPA LIBRARY

Installation

pip install justrpa

Get started

How to use this library

Define your Browser class

You can inherit from TaskBrowser to create your own browser object for browser tasks.

from justrpa.browser import TaskBrowser

class TestBrowser(TaskBrowser):
    def before_task_run(self, task_context:dict):
        print("real before task implementation.")
        return task_context

    def do_test_task(self, task_params:dict):
        print("Do real task")
        print(task_params)
        return task_params

Run Task Executer

from justrpa.task import TaskExecuter 

env = {"account":"TestAccount", "taskname":"test_task", "new_browser":1, "headless":1}
task_params = {"United States": [{"test":"test"}]}
t = TaskExecuter("test_task", "tests.executer_test.TestBrowser", "do_test_task", env, task_params)
task_context = t.run()

Run Task Handler

import argparse
from justrpa.task import TaskHandler

def run_task(taskname:str):
    handler = TaskHandler()
    handler.run(taskname)

def main():
    ap = argparse.ArgumentParser()
    ap.add_argument("task",default="", nargs="?", help="task name to run")
    args = ap.parse_args()
    task_name = args.task
    run_task(task_name)

Robot Example

justrpa example repository

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

justrpa-0.1.3.tar.gz (23.1 kB view details)

Uploaded Source

Built Distribution

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

justrpa-0.1.3-py3-none-any.whl (26.3 kB view details)

Uploaded Python 3

File details

Details for the file justrpa-0.1.3.tar.gz.

File metadata

  • Download URL: justrpa-0.1.3.tar.gz
  • Upload date:
  • Size: 23.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.4

File hashes

Hashes for justrpa-0.1.3.tar.gz
Algorithm Hash digest
SHA256 0a3c0893ef39d486b26e0b85f4e36586aebcd8c022fa973954d83cb939954704
MD5 d10b7f2d46455702a9f35988518e525c
BLAKE2b-256 c6f5ed0ec31a69a5f7948aa1c113d38b6eda10883e7b608b46f0c43aaac92259

See more details on using hashes here.

File details

Details for the file justrpa-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: justrpa-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 26.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.4

File hashes

Hashes for justrpa-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3aa49d787fafa3dfe91aaf4f1ff5db1fe0fd5a330f24dd040496f1961e9d16aa
MD5 949819fabeb82ed264174c3649f46753
BLAKE2b-256 3b29fd7e4e5fd6d5d42e2c16f0f2cea82e2de7f334897b490fc17c44a34824d4

See more details on using hashes here.

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