Actory Python SDK
Official Python client for the Actory Agent Commerce Protocol (ACP) API.
Installation
pip install actory
Quick Start
from actory import Actory
# Initialize with your API key
client = Actory(api_key="act_sk_your_key_here")
# Search for products
results = client.search("red shoes", max_price=100, in_stock=True)
print(f"Found {results.total} products")
for product in results.products:
print(f" {product.title}: {product.currency} {product.price:.2f}")
Features
Search Products
# Basic search
results = client.search("shoes")
# With filters
results = client.search(
"shoes",
in_stock=True,
min_price=20,
max_price=100,
vendor="Nike",
category="footwear",
limit=50,
page=1
)
Natural Language Search
# Parse natural language queries
results = client.nl_search("red shoes under $50 in stock")
# Automatically extracts: color=red, maxPrice=50, inStock=true
Get Product Details
product = client.get_product("product_id_here")
print(f"{product.title}: {product.currency} {product.price:.2f}")
print(f"In Stock: {product.in_stock}")
List Merchants
merchants = client.list_merchants() # or client.get_merchants()
for m in merchants:
print(f"{m.name} ({m.domain}): {m.product_count} products")
List Categories & Vendors
categories = client.list_categories()
vendors = client.list_vendors()
Error Handling
from actory import Actory, AuthenticationError, RateLimitError, ActoryError
try:
client = Actory(api_key="invalid_key")
results = client.search("test")
except AuthenticationError:
print("Invalid API key")
except RateLimitError:
print("Too many requests, slow down")
except ActoryError as e:
print(f"API error: {e}")
Configuration
# Custom base URL (for local development)
client = Actory(
api_key="act_sk_...",
base_url="http://localhost:3000"
)
Get an API Key
- Visit app.actory.ai
- Navigate to API Keys
- Create a new API key and use in your application
License
MIT
Metadata
Release files for actory 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| actory-0.1.5.tar.gz | 5.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| actory-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.3 kB
Release files / actory-0.1.5.tar.gz
| Download URL | actory-0.1.5.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
000338d29108b7261d55cae7b7a57ca0d1e5f818a0dd11a4abd69faf97fa8978
|
|
BLAKE2b-256 checksum How to use checksums |
76f93d29143af57972534f4db3576bb56719680be1ba0aa43cd849c34777354d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Release files / actory-0.1.5-py3-none-any.whl
| Download URL | actory-0.1.5-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7b5841c1efc3ecb7d338e598115c2f6a2a32a08c4b8c0486685cca6432c22db9
|
|
BLAKE2b-256 checksum How to use checksums |
1e87e1674cac40a37d0fe372dd1445d2f61c7aad95220298676311f02332c32e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Security for actory 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.