Skip to main content

Client for interacting with the Pica API

Project description

pica-ai

A Python client for interacting with the Pica API. This package helps with getting connections, actions, and system prompts for Pica.

Installation

pip install pica-ai

Requirements

  • Python 3.7+
  • A Pica API secret key

Usage

Basic Usage

import os
from pica_ai import PicaClient, PicaClientOptions

# Initialize the client with your Pica secret
pica = PicaClient(
    secret=os.environ.get("PICA_SECRET"), 
    options=PicaClientOptions(
        connectors=["*"]
    )
)

# Get available connections
connections = pica.get_connections()
print(connections)

# Get available actions for a platform
available_actions = pica.get_available_actions("gmail")
print(available_actions)

# Generate a system prompt
system_prompt = pica.generate_system_prompt()
print(system_prompt)

Advanced Configuration

You can customize the client behavior using options:

from pica_ai import PicaClient, PicaClientOptions

options = PicaClientOptions(
    # server_url="https://custom-api.picaos.com",
    # connectors=["gmail-connection-key-1", "slack-connection-key-2"],
    # identity="user-123",
    # identity_type="user",
    # authkit=True
)

pica = PicaClient(secret="your-secret-key", options=options)

Features

  • Get available connections for your Pica account
  • Get available actions for a platform
  • Generate system prompts for LLMs

Development

Setup Development Environment

# Clone the repository
git clone https://github.com/picahq/pica-ai.git
cd pica-ai

# Install in development mode
pip install -e .

Running Examples

Get a Pica secret from the Pica dashboard.

# Set your Pica secret
export PICA_SECRET=your-secret-key

# Run the basic example
python examples/basic.py

License

This project is licensed under the GNU General Public License v3.0.

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

pica_ai-0.1.0.tar.gz (23.9 kB view details)

Uploaded Source

Built Distribution

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

pica_ai-0.1.0-py3-none-any.whl (24.5 kB view details)

Uploaded Python 3

File details

Details for the file pica_ai-0.1.0.tar.gz.

File metadata

  • Download URL: pica_ai-0.1.0.tar.gz
  • Upload date:
  • Size: 23.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pica_ai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 268d9825af4efc45b8492c9546d6ab144cb63e00915b57005c74394758c91a0b
MD5 e9147bc7f4140b3cb9397a79682ac1ba
BLAKE2b-256 882008b862cccb53b9d886e3f3ff1ed0d6398449e358f4fce9e57eb48939d48b

See more details on using hashes here.

File details

Details for the file pica_ai-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pica_ai-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 24.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pica_ai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 676c20a26e7d68f7a21336b5a1553705b826f80b5e8e76e04b4578e63b23cf21
MD5 59c651f0fb22c4731aa2ef96e99ad091
BLAKE2b-256 cc07a452b6db250f5d93e17579de11597a2697dfd89c7bcd9096256b3fc4fcfc

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