prisma-api 0.4.3__tar.gz → 0.4.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {prisma_api-0.4.3 → prisma_api-0.4.4}/PKG-INFO +24 -3
- {prisma_api-0.4.3 → prisma_api-0.4.4}/README.md +23 -2
- {prisma_api-0.4.3 → prisma_api-0.4.4}/prisma_api/__init__.py +2 -0
- {prisma_api-0.4.3 → prisma_api-0.4.4}/prisma_api/prisma_api_v2.py +474 -33
- {prisma_api-0.4.3 → prisma_api-0.4.4}/prisma_api.egg-info/PKG-INFO +24 -3
- {prisma_api-0.4.3 → prisma_api-0.4.4}/pyproject.toml +1 -1
- {prisma_api-0.4.3 → prisma_api-0.4.4}/tests/test_prisma_api_v2.py +325 -2
- {prisma_api-0.4.3 → prisma_api-0.4.4}/LICENSE +0 -0
- {prisma_api-0.4.3 → prisma_api-0.4.4}/prisma_api/config.py +0 -0
- {prisma_api-0.4.3 → prisma_api-0.4.4}/prisma_api/prisma_api.py +0 -0
- {prisma_api-0.4.3 → prisma_api-0.4.4}/prisma_api.egg-info/SOURCES.txt +0 -0
- {prisma_api-0.4.3 → prisma_api-0.4.4}/prisma_api.egg-info/dependency_links.txt +0 -0
- {prisma_api-0.4.3 → prisma_api-0.4.4}/prisma_api.egg-info/requires.txt +0 -0
- {prisma_api-0.4.3 → prisma_api-0.4.4}/prisma_api.egg-info/top_level.txt +0 -0
- {prisma_api-0.4.3 → prisma_api-0.4.4}/setup.cfg +0 -0
- {prisma_api-0.4.3 → prisma_api-0.4.4}/tests/test_prisma_api.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: prisma_api
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.4
|
|
4
4
|
Summary: A package for interacting with PrISMa Platform APIs. PrISMa is a holistic system for numerical synthesis and assessment of Metal-Organic Frameworks and their applications, for Direct Air Capture of CO2. For more information, see: https://prisma.hw.ac.uk.
|
|
5
5
|
Author-email: RCCS-CaptureTeam <team@prisma-platform.org>
|
|
6
6
|
License: GNUv3
|
|
@@ -181,6 +181,7 @@ Module-level helpers exported from the package:
|
|
|
181
181
|
- `prisma_api.update_dev_mode`
|
|
182
182
|
- `prisma_api.update_dev_host_port`
|
|
183
183
|
- `prisma_api.locate_config`
|
|
184
|
+
- `prisma_api.PrismaUpsertError`, `prisma_api.PrismaRowErrorWarning`, `prisma_api.PrismaUnknownFieldsWarning`, `prisma_api.PrismaNewStructureWarning`
|
|
184
185
|
|
|
185
186
|
## v2 wrapper list
|
|
186
187
|
|
|
@@ -266,6 +267,24 @@ All methods below are available on `api.v2`.
|
|
|
266
267
|
- `get_carbon_zeopp_experimental(mof=None, limit=500, offset=0)`
|
|
267
268
|
- `get_carbon_zeopp_experimental_item(item_id)`
|
|
268
269
|
|
|
270
|
+
### AutoPrism tables
|
|
271
|
+
|
|
272
|
+
- `get_computation_runs(workflow_id=None, step=None, status=None, limit=500, offset=0)` / `get_computation_run(run_id)`
|
|
273
|
+
- `upsert_computation_runs(payload, timeout=None, raise_on_error=False)`
|
|
274
|
+
- `get_adsorption_singlepoint(...)` / `get_adsorption_singlepoint_item(row_id)` / `upsert_adsorption_singlepoint(payload, meta_provenance=None, repo_dir=None, timeout=None, raise_on_error=False, check_ids=True)`
|
|
275
|
+
- `get_heat_capacity(...)` / `get_heat_capacity_item(row_id)` / `upsert_heat_capacity(payload, meta_provenance=None, repo_dir=None, timeout=None, raise_on_error=False, check_ids=True)`
|
|
276
|
+
- `get_isotherm_h2(...)` / `get_isotherm_h2_item(row_id)` / `upsert_isotherm_h2(payload, meta_provenance=None, repo_dir=None, timeout=None, raise_on_error=False, check_ids=True)` — H2 only
|
|
277
|
+
- `get_adsorption_isotherm(structure=None, isotherm_id=None, component=None, temperature_K=None, pressure_bar=None, limit=500, offset=0, md5=None)` / `get_adsorption_isotherm_item(row_id)` / `upsert_adsorption_isotherm(payload, meta_provenance=None, repo_dir=None, timeout=None, raise_on_error=False, check_ids=True)` — every gas except H2; needs prisma_cloud **>= 0.6.16** (older servers return 404)
|
|
278
|
+
- `get_mofchecker(...)` / `get_mofchecker_item(row_id)` / `upsert_mofchecker(payload, meta_provenance=None, repo_dir=None, timeout=None, raise_on_error=False, check_ids=True)`
|
|
279
|
+
- `get_zeopp_metrics(...)` / `get_zeopp_metrics_item(row_id)` / `upsert_zeopp_metrics(payload, meta_provenance=None, repo_dir=None, timeout=None, raise_on_error=False, check_ids=True)`
|
|
280
|
+
- `get_autoprism_collection(...)` / `upsert_autoprism_collection(payload, meta_provenance=None, repo_dir=None, timeout=None, raise_on_error=False, check_ids=True)`
|
|
281
|
+
|
|
282
|
+
Rejected rows (HTTP 207, or 400 when nothing is stored) raise
|
|
283
|
+
`PrismaUpsertError` with `raise_on_error=True`, else emit
|
|
284
|
+
`PrismaRowErrorWarning`. Ignored payload fields and newly created MOF records
|
|
285
|
+
emit `PrismaUnknownFieldsWarning` / `PrismaNewStructureWarning`. See
|
|
286
|
+
[API_REFERENCE_V2.md](API_REFERENCE_V2.md#autoprism-tables).
|
|
287
|
+
|
|
269
288
|
### TEA, LCA, cases, and scenarios
|
|
270
289
|
|
|
271
290
|
- `get_output_kpis(scenario_id=None, mof=None, good_structure=None, limit=500, offset=0)`
|
|
@@ -373,7 +392,8 @@ pytest tests/ -v --cov=prisma_api --cov-report=term-missing
|
|
|
373
392
|
|
|
374
393
|
## Additional documentation
|
|
375
394
|
|
|
376
|
-
- [
|
|
395
|
+
- [API_REFERENCE_V1.md](API_REFERENCE_V1.md)
|
|
396
|
+
- [API_REFERENCE_V2.md](API_REFERENCE_V2.md)
|
|
377
397
|
- [DEVELOPMENT_SUMMARY.md](DEVELOPMENT_SUMMARY.md)
|
|
378
398
|
- [User Guide.md](User%20Guide.md)
|
|
379
399
|
|
|
@@ -381,4 +401,5 @@ pytest tests/ -v --cov=prisma_api --cov-report=term-missing
|
|
|
381
401
|
|
|
382
402
|
- Production v2 base URL: `https://prisma-platform.org/api/v2`
|
|
383
403
|
- Authentication header: `X-API-Key`
|
|
384
|
-
- Local development routing is
|
|
404
|
+
- Local development routing is selected with `prisma_api.init(local_dev=True)`; the default targets production
|
|
405
|
+
- 0.4.4: the `adsorption-isotherm` endpoints and the 400/notice handling need prisma_cloud >= 0.6.16
|
|
@@ -161,6 +161,7 @@ Module-level helpers exported from the package:
|
|
|
161
161
|
- `prisma_api.update_dev_mode`
|
|
162
162
|
- `prisma_api.update_dev_host_port`
|
|
163
163
|
- `prisma_api.locate_config`
|
|
164
|
+
- `prisma_api.PrismaUpsertError`, `prisma_api.PrismaRowErrorWarning`, `prisma_api.PrismaUnknownFieldsWarning`, `prisma_api.PrismaNewStructureWarning`
|
|
164
165
|
|
|
165
166
|
## v2 wrapper list
|
|
166
167
|
|
|
@@ -246,6 +247,24 @@ All methods below are available on `api.v2`.
|
|
|
246
247
|
- `get_carbon_zeopp_experimental(mof=None, limit=500, offset=0)`
|
|
247
248
|
- `get_carbon_zeopp_experimental_item(item_id)`
|
|
248
249
|
|
|
250
|
+
### AutoPrism tables
|
|
251
|
+
|
|
252
|
+
- `get_computation_runs(workflow_id=None, step=None, status=None, limit=500, offset=0)` / `get_computation_run(run_id)`
|
|
253
|
+
- `upsert_computation_runs(payload, timeout=None, raise_on_error=False)`
|
|
254
|
+
- `get_adsorption_singlepoint(...)` / `get_adsorption_singlepoint_item(row_id)` / `upsert_adsorption_singlepoint(payload, meta_provenance=None, repo_dir=None, timeout=None, raise_on_error=False, check_ids=True)`
|
|
255
|
+
- `get_heat_capacity(...)` / `get_heat_capacity_item(row_id)` / `upsert_heat_capacity(payload, meta_provenance=None, repo_dir=None, timeout=None, raise_on_error=False, check_ids=True)`
|
|
256
|
+
- `get_isotherm_h2(...)` / `get_isotherm_h2_item(row_id)` / `upsert_isotherm_h2(payload, meta_provenance=None, repo_dir=None, timeout=None, raise_on_error=False, check_ids=True)` — H2 only
|
|
257
|
+
- `get_adsorption_isotherm(structure=None, isotherm_id=None, component=None, temperature_K=None, pressure_bar=None, limit=500, offset=0, md5=None)` / `get_adsorption_isotherm_item(row_id)` / `upsert_adsorption_isotherm(payload, meta_provenance=None, repo_dir=None, timeout=None, raise_on_error=False, check_ids=True)` — every gas except H2; needs prisma_cloud **>= 0.6.16** (older servers return 404)
|
|
258
|
+
- `get_mofchecker(...)` / `get_mofchecker_item(row_id)` / `upsert_mofchecker(payload, meta_provenance=None, repo_dir=None, timeout=None, raise_on_error=False, check_ids=True)`
|
|
259
|
+
- `get_zeopp_metrics(...)` / `get_zeopp_metrics_item(row_id)` / `upsert_zeopp_metrics(payload, meta_provenance=None, repo_dir=None, timeout=None, raise_on_error=False, check_ids=True)`
|
|
260
|
+
- `get_autoprism_collection(...)` / `upsert_autoprism_collection(payload, meta_provenance=None, repo_dir=None, timeout=None, raise_on_error=False, check_ids=True)`
|
|
261
|
+
|
|
262
|
+
Rejected rows (HTTP 207, or 400 when nothing is stored) raise
|
|
263
|
+
`PrismaUpsertError` with `raise_on_error=True`, else emit
|
|
264
|
+
`PrismaRowErrorWarning`. Ignored payload fields and newly created MOF records
|
|
265
|
+
emit `PrismaUnknownFieldsWarning` / `PrismaNewStructureWarning`. See
|
|
266
|
+
[API_REFERENCE_V2.md](API_REFERENCE_V2.md#autoprism-tables).
|
|
267
|
+
|
|
249
268
|
### TEA, LCA, cases, and scenarios
|
|
250
269
|
|
|
251
270
|
- `get_output_kpis(scenario_id=None, mof=None, good_structure=None, limit=500, offset=0)`
|
|
@@ -353,7 +372,8 @@ pytest tests/ -v --cov=prisma_api --cov-report=term-missing
|
|
|
353
372
|
|
|
354
373
|
## Additional documentation
|
|
355
374
|
|
|
356
|
-
- [
|
|
375
|
+
- [API_REFERENCE_V1.md](API_REFERENCE_V1.md)
|
|
376
|
+
- [API_REFERENCE_V2.md](API_REFERENCE_V2.md)
|
|
357
377
|
- [DEVELOPMENT_SUMMARY.md](DEVELOPMENT_SUMMARY.md)
|
|
358
378
|
- [User Guide.md](User%20Guide.md)
|
|
359
379
|
|
|
@@ -361,4 +381,5 @@ pytest tests/ -v --cov=prisma_api --cov-report=term-missing
|
|
|
361
381
|
|
|
362
382
|
- Production v2 base URL: `https://prisma-platform.org/api/v2`
|
|
363
383
|
- Authentication header: `X-API-Key`
|
|
364
|
-
- Local development routing is
|
|
384
|
+
- Local development routing is selected with `prisma_api.init(local_dev=True)`; the default targets production
|
|
385
|
+
- 0.4.4: the `adsorption-isotherm` endpoints and the 400/notice handling need prisma_cloud >= 0.6.16
|
|
@@ -8,4 +8,6 @@ except PackageNotFoundError: # running from a source tree without installing
|
|
|
8
8
|
|
|
9
9
|
from prisma_api.prisma_api import prisma_api as init # Main prisma_api class for initialisation
|
|
10
10
|
from prisma_api.prisma_api_v2 import PrismaAPIv2 # v2 API client (also accessible as api.v2)
|
|
11
|
+
from prisma_api.prisma_api_v2 import (PrismaUpsertError, PrismaRowErrorWarning, # upsert failure signals
|
|
12
|
+
PrismaUnknownFieldsWarning, PrismaNewStructureWarning)
|
|
11
13
|
from prisma_api.config import update_dev_mode, update_dev_host_port, locate_config # Config utility functions
|