Skip to main content

Official client for The Agent Service eXchange (TASX)

Project description

TASX Client SDK

Installation

pip install tasx

Getting Started

Import the TASX library and initialize the client:

import tasx

client = tasx.get_client(
    api_base="tasx.tiptreesystems.com/api/v1",
    api_key="your_api_key_here"
)

Note: The API base and key can also be set via environment variables.

Task Management

Creating a new task

task = client.create_task(
    title="My New Task",
    description="This is a test task",
    status="pending"
)

Retrieving a task

task = client.get_task(task_id)

Updating a task

updated_task = client.update_task(
    task_id,
    status="in_progress"
)

Deleting a task

client.delete_task(task_id)

Search Functionality

import tasx.enums

import tasx.interface_models

search_results = client.search_tasks(
    query="test",
    limit=10,
    sort_by=tasx.SortBy.CREATED_AT,
    sort_order=tasx.enums.SortOrder.DESC
)

for task in search_results.items:
    print(f"Task: {task.name}, Status: {task.status}")

Error Handling

from tasx.exceptions import TasxAPIError, TaskNotFoundError

try:
    task = client.get_task(task_id)
except TaskNotFoundError:
    print(f"Task {task_id} not found")
except TasxAPIError as e:
    print(f"API error occurred: {e}")

Asynchronous Support

TASX also supports asynchronous operations:

import asyncio
import tasx


async def main():
    async_client = await tasx.get_async_client(
        api_base="tasx.tiptreesystems.com/api/v1",
        api_key="your_api_key_here"
    )

    task = await async_client.create_task(
        title="Async Task",
        description="This is an asynchronous task"
    )

    search_results = await async_client.search_tasks(query="async")
    for task in search_results.items:
        print(f"Found task: {task.name}")


if __name__ == "__main__":
    asyncio.run(main())

For more detailed documentation, please refer to the TASX API Documentation.

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

tasx-0.0.1.tar.gz (19.5 kB view details)

Uploaded Source

Built Distribution

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

tasx-0.0.1-py3-none-any.whl (24.7 kB view details)

Uploaded Python 3

File details

Details for the file tasx-0.0.1.tar.gz.

File metadata

  • Download URL: tasx-0.0.1.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for tasx-0.0.1.tar.gz
Algorithm Hash digest
SHA256 f62249ad27e09f1cc43c47aa449669a0605e9b6202fc1aaa428b011189bc4566
MD5 6fea267fb1437ea8afcc4b7a6d16eeef
BLAKE2b-256 0ec36905ab39aa85346b12e9ff881f86b68c26dc1dd096a97a0f40ec8c7234a3

See more details on using hashes here.

File details

Details for the file tasx-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: tasx-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 24.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for tasx-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 34abb6b7adeda217a6d6bd58ecb395ab04198fa45a1c370b8ad6f0f1f531fa30
MD5 3504e4840551bd154c05d5b2c1f119b0
BLAKE2b-256 279aa9f031d38ed83c9c10d640d04c6ce65c2b006d44ee7d9b84f528814e1bfb

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