Skip to main content

pyrus-api

A python 3 client for the Pyrus API.

The full documentation for API can be found here.

Installation

To get the latest version:

Usage

To start with the module:

>>>  from pyrus import client
>>>  import pyrus.models
>>>  pyrus_client = client.PyrusAPI(login='login@pyrus.com', security_key='sadf2R5Wrdkn..')

Examples

Authenticate:

>>> pyrus_client.auth()

Get all form templates:

>>> forms_response = pyrus_client.get_forms()
>>> forms = forms_response.forms

Get list of tasks created using specified form:

>>> form_register_response = pyrus_client.get_registry(forms[0].id)
>>> tasks = form_register_response.tasks

You can also filter registry by specific field value, status or current step number:

>>> request = pyrus.models.requests.FormRegisterRequest(
        include_archive=True,
        steps=[1,2],
        filters=[pyrus.models.entities.EqualsFilter(1, "hello world")])
>>> form_register_response = pyrus_client.get_registry(forms[0].id, request)

Get task with all comments:

>>> task = pyrus_client.get_task(tasks[0].id).task

Add new comment to the task:

>>> request = pyrus.models.requests.TaskCommentRequest(text="hello", action="finished")
>>> task = pyrus_client.comment_task(tasks[0].id, request).task
Upload a file:
>>> response = myclient.upload_file('C:\\path\\to\\file.txt').guid

Create a task:

>>> request = CreateTaskRequest(
        text="Task from python client",
        participants=['colleague@email.com', 10196] #you can specify person id, email, or pyrus.models.entities.Person object
        attachments = [guid])
>>> task = pyrus_client.create_task(request).task

Get all available contacts:

>>> contacts = pyrus_client.get_contacts()

Get catalog with all items:

>>> catalog_id = 1525
>>> catalog_response = pyrus_client.get_catalog(catalog_id)
>>> items = catalog_response.items

Get profile:

>>> profile_response = pyrus_client.get_profile()

Get inbox:

>>> inbox_response = pyrus_client.get_inbox(tasks_count=100)

Get calendar:

>>> calendar_response = (pyrus_client.get_calendar_tasks(req.CalendarRequest(
            datetime.datetime.utcnow() - datetime.timedelta(days=30),
            datetime.datetime.utcnow() + datetime.timedelta(days=30),
            all_accessed_tasks=True,
            item_count=55,
            filter_mask=0b0111)))

Get announcement with all comments:

>>> announcement = pyrus_client.get_task(12321321).announcement

Add new comment to the announcement:

>>> request = pyrus.models.requests.AnnouncementCommentRequest(text="hello", attachments = ['BEFCE22E-AEFF-4771-83D4-2A4B78FB05C6'])
>>> announcement = pyrus_client.comment_announcement(12321321, request).announcement

Create an announcement:

>>> request = CreateAnnouncementRequest(
        text="Announcement from python client",
        attachments = [guid])
>>> announcement = pyrus_client.create_announcement(request).announcement

Support

If you have any questions or comments please send an email to support@pyrus.com

Metadata

Release files for pyrus-api 2.9.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyrus-api 2.9.1
File Size Uploaded Provenance Actions
pyrus-api-2.9.1.tar.gz 22.8 kB Without provenance Details for pyrus-api-2.9.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyrus-api 2.9.1
File Interpreter ABI Platform Actions
pyrus_api-2.9.1-py3-none-any.whl Python 3 none any Details for pyrus_api-2.9.1-py3-none-any.whl

Total release size: 46.4 kB

Release files / pyrus-api-2.9.1.tar.gz

Download URL pyrus-api-2.9.1.tar.gz
Size 22.8 kB
Tags Source
SHA-256 checksum
How to use checksums
7e32b0d6d596ebaea4f3327ea2f8bb0713abe64213f83ac44a35d06ebc2702e2
BLAKE2b-256 checksum
How to use checksums
4e5e94fb97368b58719d8989ec78fe9f62bf74e68e7e69a80cbe04cdb01722ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.4

Release files / pyrus_api-2.9.1-py3-none-any.whl

Download URL pyrus_api-2.9.1-py3-none-any.whl
Size 23.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9948d838af09e766afc8a053dbfbabcb90d64e673246e0c581fb3a94a88a61ef
BLAKE2b-256 checksum
How to use checksums
704c6ec221781ab1d0ad1258034cbd78d530123413bcdce2a824f2b8fc55f960
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.4

Security for pyrus-api 2.9.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.9.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page