Skip to main content

Official Python SDK for Picsha AI - Store, Encode, Understand.

Project description

Picsha AI Python SDK 🐍

The official Python client for Picsha AI. Designed specifically for data scientists, computational biologists, and ML engineers.

Installation

We recommend using poetry:

poetry add picsha

Or pip:

pip install picsha

Quickstart

import picsha

client = picsha.Client(api_key="sk_your_key_here")

# 1. Semantic Search
results = client.search(
    query="fluorescent cancer cell cultures", 
    mode="ai"  # Hybrid Vector Search
)

# 2. Get transformed URLs for ML pipelines
for asset in results.assets:
    url = asset.generate_url(width=512, height=512, format="webp")
    print(url)

Asynchronous Support

For high-throughput workloads, an AsyncClient is included out-of-the-box:

import picsha
import asyncio

async def main():
    async with picsha.AsyncClient(api_key="sk_your_key_here") as client:
        result = await client.search(query="cancer cells", mode="ai")
        print(f"Found {result.total_count} assets.")

asyncio.run(main())

See the notebooks/ directory for full examples integrating with Pandas, PyTorch, and SciPy.

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

picsha-0.2.1.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

picsha-0.2.1-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file picsha-0.2.1.tar.gz.

File metadata

  • Download URL: picsha-0.2.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.14.5 Darwin/25.5.0

File hashes

Hashes for picsha-0.2.1.tar.gz
Algorithm Hash digest
SHA256 57fe76b8ffb5ae745c6bdc37d5dac5cae95d1345413cb7f0ecb08fd61cdf9542
MD5 888db886e634d21211f99b3157f59588
BLAKE2b-256 8353402d4ddbe06956aa041a963cae22ec1bbe9a6c5e61fd2209b4c2f8196a43

See more details on using hashes here.

File details

Details for the file picsha-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: picsha-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.14.5 Darwin/25.5.0

File hashes

Hashes for picsha-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8406951dd4fbdbf63c6ab81e3bf2b76bb74132daefab5c09ce1d473b75c4002c
MD5 7a27d381d30a5239bdd2a935770c050b
BLAKE2b-256 33132fd70f43c6b0d9fa7af1b6a576015adfeea1a4b7aef896f893b78f590e92

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