Skip to main content

Public Python client for ChemFlow 3D chat editing

Project description

chemflow-client

Public Python client for ChemFlow 3D chat editing.

Supported Python versions: 3.9+

Install

pip install chemflow-client

Notebook widget support is optional:

pip install "chemflow-client[notebook]"

For contributors who want to run the full test suite:

pip install -e ".[dev,notebook]"

Usage

Blocking Python API:

from ase.build import molecule
from chemflow_client import chat3d

atoms = molecule("H2O")
updated_atoms, text = chat3d(
    atoms,
    "change the H-O-H angle to 110 degrees",
)

generated_atoms, text = chat3d(
    atoms=None,
    prompt="generate methane",
)

JupyterLab

Async notebook widget:

from chemflow_client import Chat3DWidget

widget = Chat3DWidget()
widget
widget.get_atoms()

JupyterLab widget demo

Configure

Create an API key at https://chemflow.cloud/user-center/api-keys.

You can configure the client with environment variables:

export CHEMFLOW_API_KEY="cfsk_xxx"

You can also pass configuration as arguments to chat3d(...) or Chat3DWidget(...):

from chemflow_client import Chat3DWidget, chat3d

updated_atoms, text = chat3d(
    atoms=None,
    prompt="generate methane",
    api_key="cfsk_xxx",
)

widget = Chat3DWidget(api_key="cfsk_xxx")

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

chemflow_client-0.1.3.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

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

chemflow_client-0.1.3-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file chemflow_client-0.1.3.tar.gz.

File metadata

  • Download URL: chemflow_client-0.1.3.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for chemflow_client-0.1.3.tar.gz
Algorithm Hash digest
SHA256 21a26e472fdeaa1573d57cb2e6a5e65a9ee87c2e7981504037a4e0f2e9082bd7
MD5 a5a9281c8cc52aa03932f827e37bc40e
BLAKE2b-256 cf28dde42d047353b1d34c971afa6323e2071974771e4a09b0d3093defe81253

See more details on using hashes here.

Provenance

The following attestation bundles were made for chemflow_client-0.1.3.tar.gz:

Publisher: publish.yml on SingletC/chemflow-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file chemflow_client-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for chemflow_client-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 534d11420ff8c208992ab8d815c60a0c135ccd7c97bd54f9c3bb3b94d47b873c
MD5 f94482179c97a5dd8e735ab2ce59ba20
BLAKE2b-256 a71a00eb59716e84f514f2ce7cd48f658e22d8828c31455db359474d1d27ab75

See more details on using hashes here.

Provenance

The following attestation bundles were made for chemflow_client-0.1.3-py3-none-any.whl:

Publisher: publish.yml on SingletC/chemflow-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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