API Reference - API Client
pyepisuite.api_client
EpiSuiteAPIClient
Source code in src/pyepisuite/api_client.py
309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 | |
search(query_term, time_out=10)
Search the EPISuite API with a query term (SMILES, CAS, or chemical name).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query_term
|
str
|
The term to search for. |
required |
time_out
|
int
|
The time out for the request. |
10
|
Returns:
| Type | Description |
|---|---|
|
List[Chemical]: A list of Chemical instances. |
Source code in src/pyepisuite/api_client.py
stop_local_runtime()
staticmethod
submit(cas='', smiles='')
Submit a CAS number or SMILES string to the EPISuite API.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cas
|
str
|
The CAS number of the chemical. |
''
|
smiles
|
str
|
The SMILES string of the chemical. |
''
|
Returns:
| Name | Type | Description |
|---|---|---|
dict |
The JSON response from the API. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If neither 'cas' nor 'smiles' is provided. |
Source code in src/pyepisuite/api_client.py
LocalEpiSuiteAPIClient
Bases: EpiSuiteAPIClient
Explicit local client that always targets the local EpiSuite runtime.
Source code in src/pyepisuite/api_client.py
jar_is_supported(jar_path)
Whether this jar is new enough to serve the HTTP API this client speaks.
read_jar_version(jar_path)
Read Implementation-Version from a jar's manifest.
Cheap by design: it reads the zip entry rather than starting a JVM. Returns None for a jar that declares no version, which is how the legacy EpiSuiteCLI builds present themselves.