Skip to main content

Python toolkit that lets your LangChain agents automate Taiga: create, search, edit & comment on user stories, tasks and issues via the official REST API.

Project description

langchain-taiga

PyPI version

This package provides Taiga tools and a toolkit for use with LangChain. It includes:

  • create_entity_tool: Creates user stories, tasks and issues in Taiga.
  • search_entities_tool: Searches for user stories, tasks and issues in Taiga.
  • get_entity_by_ref_tool: Gets a user story, task or issue by reference.
  • update_entity_by_ref_tool: Updates a user story, task or issue by reference.
  • add_comment_by_ref_tool: Adds a comment to a user story, task or issue.
  • add_attachment_by_ref_tool: Adds an attachment to a user story, task or issue.

Installation

pip install -U langchain-taiga

Environment Variable

Export your taiga logins:

export TAIGA_URL="https://taiga.xyz.org/"
export TAIGA_API_URL="https://taiga.xyz.org/"
export TAIGA_USERNAME="username"
export TAIGA_PASSWORD="pw"
export OPENAI_API_KEY="OPENAI_API_KEY"

If this environment variable is not set, the tools will raise a ValueError when instantiated.


Usage

Direct Tool Usage

from langchain_taiga.tools.taiga_tools import create_entity_tool, search_entities_tool, get_entity_by_ref_tool, update_entity_by_ref_tool, add_comment_by_ref_tool, add_attachment_by_ref_tool

response = create_entity_tool({"project_slug": "slug",
                       "entity_type": "us",
                       "subject": "subject",
                       "status": "new",
                       "description": "desc",
                       "parent_ref": 5,
                       "assign_to": "user",
                       "due_date": "2022-01-01",
                       "tags": ["tag1", "tag2"]})

response = search_entities_tool({"project_slug": "slug", "query": "query", "entity_type": "task"})

response = get_entity_by_ref_tool({"entity_type": "user_story", "project_id": 1, "ref": "1"})

response = update_entity_by_ref_tool({"project_slug": "slug", "entity_ref": 555, "entity_type": "us"})

response = add_comment_by_ref_tool({"project_slug": "slug", "entity_ref": 3, "entity_type": "us",
                "comment": "new"})

response = add_attachment_by_ref_tool({"project_slug": "slug", "entity_ref": 3, "entity_type": "us",
                "attachment_url": "url", "content_type": "png", "description": "desc"})

Using the Toolkit

You can also use TaigaToolkit to automatically gather both tools:

from langchain_taiga.toolkits import TaigaToolkit

toolkit = TaigaToolkit()
tools = toolkit.get_tools()

Tests

If you have a tests folder (e.g. tests/unit_tests/), you can run them (assuming Pytest) with:

pytest --maxfail=1 --disable-warnings -q

License

MIT License


Further 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

langchain_taiga-1.1.1.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

langchain_taiga-1.1.1-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file langchain_taiga-1.1.1.tar.gz.

File metadata

  • Download URL: langchain_taiga-1.1.1.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for langchain_taiga-1.1.1.tar.gz
Algorithm Hash digest
SHA256 748e8ea0b97fc6de938f0c2feb8adeace51cf537ad3f50ddd5c2f30d2aaf280d
MD5 80406e354a6601d3b5efcbcf82e10a10
BLAKE2b-256 f6691475399e6e305a0d33cc01a5d6089b63fdf48e4b40f3c4bde0d7d157cfe9

See more details on using hashes here.

Provenance

The following attestation bundles were made for langchain_taiga-1.1.1.tar.gz:

Publisher: ci_publish.yml on Shikenso-Analytics/langchain-taiga

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file langchain_taiga-1.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_taiga-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5b9b381ac92079c11a8d1b443c3f3cfaf9b37160884064a1999add3e2cfa9db2
MD5 19e56dc0b75bb0179dedb8c0aadcfe1f
BLAKE2b-256 ead9eae79ebdff459bcdd8ab25418e954322be315f403fb8f52c8fcadffb5ac4

See more details on using hashes here.

Provenance

The following attestation bundles were made for langchain_taiga-1.1.1-py3-none-any.whl:

Publisher: ci_publish.yml on Shikenso-Analytics/langchain-taiga

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page