Metadata-Version: 2.4
Name: pinionai
Version: 0.3.2
Summary: The official Python client library for the PinionAI platform.
Author-email: Alan Johnson <alan@pinionai.com>, PinionAI <info@pinionai.com>
License-Expression: MIT
Project-URL: Documentation, https://docs.pinionai.com/
Project-URL: Homepage, https://www.pinionai.com/
Project-URL: Issues, https://www.pinionai.com/contact
Project-URL: GitHub, https://github.com/pinionai/pinionai-streamlit-agent
Project-URL: FormBuilder, https://form.pinionai.com/
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: grpcio
Requires-Dist: protobuf
Requires-Dist: httpx[http2]
Requires-Dist: python-Levenshtein
Requires-Dist: Markdown
Requires-Dist: xmltodict
Requires-Dist: jsonpath-ng
Requires-Dist: websockets
Requires-Dist: cryptography
Requires-Dist: jinja2
Requires-Dist: google-auth
Requires-Dist: google-api-core
Provides-Extra: dev
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: grpcio-tools; extra == "dev"
Provides-Extra: gcp
Requires-Dist: google-cloud-storage>=3.0.0; extra == "gcp"
Provides-Extra: aws
Requires-Dist: boto3; extra == "aws"
Provides-Extra: openai
Requires-Dist: openai; extra == "openai"
Provides-Extra: anthropic
Requires-Dist: anthropic; extra == "anthropic"
Provides-Extra: javascript
Requires-Dist: mini-racer; extra == "javascript"
Provides-Extra: sendgrid
Requires-Dist: sendgrid; extra == "sendgrid"
Provides-Extra: twilio
Requires-Dist: twilio; extra == "twilio"
Provides-Extra: mcp
Requires-Dist: fastmcp; extra == "mcp"
Provides-Extra: data
Requires-Dist: pandas; extra == "data"
Provides-Extra: postgres
Requires-Dist: psycopg[binary,pool]; extra == "postgres"
Provides-Extra: google
Requires-Dist: google-genai>=1.72.0; extra == "google"
Provides-Extra: all
Requires-Dist: pinionai[anthropic,aws,data,gcp,google,javascript,mcp,openai,postgres,sendgrid,twilio]; extra == "all"
Dynamic: license-file

# 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](https://www.pinionai.com)

[PinionAI documentation](https://docs.pinionai.com)

[Run PinionAI Agent from Github](https://github.com/pinionai/pinionai-streamlit-agent)

## 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.

```bash
# On macOS and Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
#OR
brew install uv
```

```bash
# On Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
```

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

```bash
uv pip install pinionai
```

**With `pip`**

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

```bash
pip install pinionai
```

### From GitHub

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

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

## Optional Features

The base install covers the common client and session workflow. Optional integrations are grouped into extras so you can keep the install lean and only pull in the packages you need.

- 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
- twilio: Support for SMS delivery
- mcp: FastMCP tool integration (fastmcp)
- data: Tabular and CSV helpers (pandas)
- postgres: PostgreSQL connector support (psycopg)
- google: Google Gemini / Vertex AI support (google-genai)

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

```bash
pip install "pinionai[gcp,aws,google]"
```

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

```bash
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"]
- mcp = ["fastmcp"]
- data = ["pandas"]
- postgres = ["psycopg[binary,pool]"]
- google = ["google-genai>=1.72.0"]
- all = [
  "pinionai[gcp,aws,openai,anthropic,javascript,twilio,sendgrid,mcp,data,postgres,google]"
  ]

## 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`:**

```bash
# For a specific version from PyPI
pinionai==0.3.1

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

# 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](https://github.com/pinionai/pinionai-streamlit-agent)

## Configuration For Developers

### Setting up the environment

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

```bash
# 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:

```bash
uv pip install -e .[dev]
```
