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()

If you install notebook extras into an already running Jupyter session, restart the kernel before creating the widget.

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"
export CHEMFLOW_BASE_URL="http://localhost:8000"  # optional

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.0.tar.gz (16.9 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.0-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: chemflow_client-0.1.0.tar.gz
  • Upload date:
  • Size: 16.9 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.0.tar.gz
Algorithm Hash digest
SHA256 a58cca706ff53e24322adcd480da599d734601e3dd92327fdd2ee432cda3d9fd
MD5 20a8aa3f72bec3772c31989bd7377797
BLAKE2b-256 8b9b5578c1593b3f5bf9bc7ecfd9bd5c57f405e0820ebbeaf348bc347a049118

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for chemflow_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ecc98fb2bb6a6cd6a2d2e34c34c0804a253a0555a84b6e6feb4f9609e13c7f21
MD5 de95eb5579e065184ba696f812feb428
BLAKE2b-256 e0b484071937b21f1c01c48aa130b3259310b7dda5d1980b081096c6569fba68

See more details on using hashes here.

Provenance

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