Skip to main content

The official Python client library for the PinionAI platform.

Project description

PinionAI Python Library

This is the official Python client library for the PinionAI platform. It provides a convenient, asynchronous way to interact with PinionAI agents, manage sessions, and use its various features including AI interactions and gRPC messaging. AI Agent authoring is performed in PinionAI Studio.

Website and Documentation

PinionAI website

PinionAI documentation

Run PinionAI Agent from Github

Installation

From PyPI

This package is available on PyPI and can be installed with pip or uv. We recommend uv for its speed.

With uv

If you don't have uv, you can install it from astral.sh.

# On macOS and Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
#OR
brew install uv
# On Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

Once uv is installed, you can install the pinionai package from PyPI:

uv pip install pinionai

With pip

If you prefer to use pip, you can still install the package with:

pip install pinionai

From GitHub

To install the latest development version directly from the GitHub repository:

pip install git+https://github.com/pinionai/pinionai-package.git

Optional Features

The client includes optional features that require extra dependencies. You can install them as needed based on the services you intend to use.

  • gcp: Google Cloud Storage support (google-cloud-storage)
  • aws: AWS S3 support (boto3)
  • openai: Support for OpenAI models (openai)
  • anthropic: Support for Anthropic models (anthropic)
  • javascript: Support for running JavaScript snippets (mini-racer)
  • sendgrid: Support for running sendgrid delivery (twiliio service)
  • twilio: Support for sms delivery

To install one or more optional features, specify them in brackets. For example, to get support for GCP and AWS:

pip install pinionai[gcp,aws]

To install all optional features at once, use the all extra:

pip install pinionai[all]

Options include:

  • dev = [ "build", "twine", "ruff", "grpcio-tools", ]
  • gcp = ["google-cloud-storage"]
  • aws = ["boto3"]
  • openai = ["openai"]
  • anthropic = ["anthropic"]
  • javascript = ["mini-racer"]
  • sendgrid = ["sendgrid"]
  • twilio = ["twilio"]
  • all = [ "pinionai[gcp,aws,openai,anthropic,javascript,twilio,sendgrid]" ]

Adding to Requirements

To add this library to your project's requirements file, you can use the following formats.

For requirements.txt or requirements.in:

# For a specific version from PyPI
pinionai==0.2.2

# With optional features
pinionai[gcp,openai]==0.2.2

# From the main branch on GitHub
git+https://github.com/pinionai/pinionai-package.git@main

Usage

Here's a Github link to a complete, fully functional example of how to use the AsyncPinionAIClient. In the link to our complete example, you can run a Streamlit or a CLI chat. Note: you can run a specific agent or deploy it to run and accept AIA files to run various agents.

PinionAI Agent on Github

Configuration For Developers

Setting up the environment

To set up a development environment, first create and activate a virtual environment using uv:

# Create a virtual environment named .venv +uv venv
# Activate the virtual environment
# On macOS and Linux
source .venv/bin/activate
# On Windows
.venv\Scripts\activate

Then, install the package in editable mode with its development dependencies:

uv pip install -e .[dev]

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

pinionai-0.2.6.tar.gz (54.9 kB view details)

Uploaded Source

Built Distribution

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

pinionai-0.2.6-py3-none-any.whl (54.0 kB view details)

Uploaded Python 3

File details

Details for the file pinionai-0.2.6.tar.gz.

File metadata

  • Download URL: pinionai-0.2.6.tar.gz
  • Upload date:
  • Size: 54.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for pinionai-0.2.6.tar.gz
Algorithm Hash digest
SHA256 f599cd00a4dc195663702c47cc23e4131fc7baa8f499a21c31d10c3485b4625c
MD5 931da46feb3aa41f727cc0bed4c7d0f7
BLAKE2b-256 7d8f7b8306de2ac0883c617c141d91f698e78e401c7722025d0f1aee07c9d06a

See more details on using hashes here.

File details

Details for the file pinionai-0.2.6-py3-none-any.whl.

File metadata

  • Download URL: pinionai-0.2.6-py3-none-any.whl
  • Upload date:
  • Size: 54.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for pinionai-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 134985b66c97b5f226e0acad527931c9f289c39a5ca994a1a8ec07ade0a0c9eb
MD5 e01ef77b4140fe5ba0bb7d36bd8516a3
BLAKE2b-256 6f5ed71a2cc30b5e7834408f48b7ff50ad2484329ad972c52a0b5a56df0a658b

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