Skip to main content

Python SDK for programmatic access to papert-code CLI

Project description

papert-code-sdk

A minimum experimental Python SDK for programmatic access to Papert Code.

Installation

pip install papert-code-sdk

Quick Start

import asyncio
from papert_code_sdk import query

async def main():
    q = query(prompt="What files are in the current directory?", options={"cwd": "."})
    
    async for message in q:
        if message.type == "assistant":
            print(f"Assistant: {message.message.content}")
        elif message.type == "result":
            print(f"Result: {message.result}")

if __name__ == "__main__":
    asyncio.run(main())

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

papert_code_sdk-0.1.0.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

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

papert_code_sdk-0.1.0-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: papert_code_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for papert_code_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3ccb0a7468a501d1cca2665dc355728f952c4cbaeb4d2020dbbce9ec9af5e95e
MD5 4596834d4764b69e6f3d187b9399fa7e
BLAKE2b-256 8183e9f417a237f98f6f13fc1f6562ae558ac1db9e3592959bf2b79392213a95

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for papert_code_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 525692382d4475eb5ff23c428c9b9a0a02490d1961dcf5dff42252ddca0ee16a
MD5 71f2706e13bbb2abcf7a1fdbdd48b605
BLAKE2b-256 7e30ed87f1da0249b7b540f6b75ca92da3f6605809e42655dadc97cf67b93495

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