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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pica_ai-1.0.0.tar.gz.
File metadata
- Download URL: pica_ai-1.0.0.tar.gz
- Upload date:
- Size: 23.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31931394c408d53de1e874df7fac1e59fe93a6906a7ef3afd642f5ce86f702d3
|
|
| MD5 |
e2616fa4c015f1f45835efbaa30fd7f6
|
|
| BLAKE2b-256 |
c76ec800ea0c12a4bb6356e2e8af0521a1c683da57268d1f1b3289a14e2d6170
|
File details
Details for the file pica_ai-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pica_ai-1.0.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20fdc0c9467a4014964e107bbce519df8496beb1b6861e87ed2ae3049f77e650
|
|
| MD5 |
032029bb81033c5ee5a32cf2aebdb32e
|
|
| BLAKE2b-256 |
44d5b927332721cb6bdd1c4e4415382446c3164e9033bbd582a7026a3e125463
|