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.2.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.2-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: chemflow_client-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 18f7fa8adbbedbb318c7147b3e18269b5bfecbc9b166925a887aff8ca3df167d
MD5 9c4ee2b7b83736963b7906f843829ff8
BLAKE2b-256 1048b2b7f4341d28ec827fb2692354d61314e2a404ec8a59ae30f6f438ce9ee0

See more details on using hashes here.

Provenance

The following attestation bundles were made for chemflow_client-0.1.2.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.2-py3-none-any.whl.

File metadata

File hashes

Hashes for chemflow_client-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bdfc09102155efa6b5b2fb9a9c81639e4df60fd254f64fae4334ce2815dcb2ac
MD5 6f349abd5717549fa3d36cfce2c1287d
BLAKE2b-256 71bc61f6bcf4c04c8ee0f86bf7f17add8902a0e210287cbbb84c396bce7781f5

See more details on using hashes here.

Provenance

The following attestation bundles were made for chemflow_client-0.1.2-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