Skip to main content

No project description provided

Project description

solveit_client

A Python client for programmatically interacting with SolveIt dialogs.

Installation

Authentication

Set your SOLVEIT_TOKEN environment variable before using the client. To find your token:

  1. Open Chrome DevTools (F12 or Cmd+Option+I)
  2. Go to the Application tab
  3. In the sidebar, expand Cookies and select your SolveIt domain
  4. Find the cookie named _solveit
  5. Copy its value—that’s your token
export SOLVEIT_TOKEN='your-token-here'
!pip install solveit_client

Quick Start

from solveit_client.core import *

# Initialize client (uses SOLVEIT_TOKEN env var by default)
sic = SolveItClient('https://your-instance.solve.it.com/'); sic
SolveItClient(self.url='https://your-instance.solve.it.com/')

Use the /test_route to confirm your client has connect:

sic('/test_route')
'here'

If you get an error saying No access. Please login and then retry., double check your SOLVEIT_TOKEN is correct and exported.

# Create a dialog
dlg = sic.create_dialog('my-project/experiment'); dlg

Dialog: my-project/experiment | Mode: learning

# Add and execute code
msg = dlg.add_msg('1 + 1'); msg

Message: _59a51ada | Type: code | 1 + 1 | Output:

msg.exec(); msg

Message: _59a51ada | Type: code | 1 + 1 | Output: 2

# Add a prompt for AI assistance
ai_msg = dlg.add_msg('Tell me about otters 🤓', msg_type='prompt')
ai_msg.exec(); ai_msg

Message: _e8ede692 | Type: prompt | Tell me about otters 🤓 | Output: Otters are fascinating semi-aquatic mammals! They'...

# View all messages
dlg.messages
ID Type Content Output
<a
href="https://lucid-magic-forges-szzy66.solve.it.com/dialog_?name=my-project/experiment#_1512badb"
target="_blank">_1512badb code 1 + 1 2
<a
href="https://lucid-magic-forges-szzy66.solve.it.com/dialog_?name=my-project/experiment#_4129a41c"
target="_blank">_4129a41c prompt Explain this code This code adds two numbers together: `1
<a
href="https://lucid-magic-forges-szzy66.solve.it.com/dialog_?name=my-project/experiment#_74e465c1"
target="_blank">_74e465c1 code 1 + 1 2
<a
href="https://lucid-magic-forges-szzy66.solve.it.com/dialog_?name=my-project/experiment#_4bd1fbe2"
target="_blank">_4bd1fbe2 prompt Explain this code This code performs addition: `1 + 1` res
<a
href="https://lucid-magic-forges-szzy66.solve.it.com/dialog_?name=my-project/experiment#_59a51ada"
target="_blank">_59a51ada code 1 + 1 2
<a
href="https://lucid-magic-forges-szzy66.solve.it.com/dialog_?name=my-project/experiment#_e8ede692"
target="_blank">_e8ede692 prompt Tell me about otters 🤓 Otters are fascinating semi-aquatic mamm
dlg.delete()
{'success': 'deleted "/app/data/my-project/experiment"'}

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

solveit_client-0.0.1.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

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

solveit_client-0.0.1-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file solveit_client-0.0.1.tar.gz.

File metadata

  • Download URL: solveit_client-0.0.1.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for solveit_client-0.0.1.tar.gz
Algorithm Hash digest
SHA256 1b8221b268133c92b394078f0c3735de127231037de4e5f3a8132dcecff41137
MD5 d1526de6c256afc345655cdceb79c8aa
BLAKE2b-256 2c5184ae858f380b8ccd2a966e3f343e971f969ccaa77c4f4302ce1439d83a54

See more details on using hashes here.

File details

Details for the file solveit_client-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: solveit_client-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for solveit_client-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fa0d015b301725506fe4fd384823d7cbb4360beb694aa8e7b447bf3e846f7f76
MD5 525b1098d9bd500415be5a985730ca4a
BLAKE2b-256 dd8bfb390b08a97e8979b7b5c3044e214dcb4756c39861efc03095469645a8a1

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