PDFData Python client
Standalone client for https://pdfdata.org/api/v1. Requires Python 3.9+ and
requests; Flask, MongoDB and scientific packages are not client dependencies.
Version 0.2.0 source and build configuration are in this repository. A public
PyPI release has not been made as part of this change.
Install from a local checkout (repository root):
python -m pip install ./src/pdfdb_backend
Or install the built wheel supplied with a release:
python -m pip install /path/to/pdfdata_api-0.2.0-py3-none-any.whl
Generate a key on the website's API page after signing in. Set it in an environment variable and query:
import os
from pdfdata_api import PDFData_API
with PDFData_API(api_key=os.environ["PDFDATA_API_KEY"]) as client:
page = client.get_materials(elements="Si,O", per_page=20)
material = client.get_material("mp-10009-X")
curve = client.get_pdf_data("mp-10009-X")
all_matches = client.get_all_materials(elements="Si,O")
get_materials() and search() return one page by default. Page size is 1–100.
get_all_materials() and search_all() collect successive pages. Legacy client
calls with per_page=0 also collect successive pages; direct HTTP requests must
use page sizes 1–100. Collection is not a database snapshot while data changes.
Advanced search:
result = client.search({
"elements": {"all": ["Si"], "none": ["Au"]},
"qmax": "[10,30]",
"page": 1,
"per_page": 20,
})
For applications already holding a website access JWT, PDFData_API() can
call generate_api_key(jwt_token), get_api_keys(jwt_token) and
delete_api_key(jwt_token, "Key 1"). The generated key is set on the client.
Key management requires the login JWT; material queries require the API key.
generate_api_key creates a new key on each call and is not automatically retried.
MaterialsAPI remains an alias of PDFData_API. The old import
from PDFData_API import PDFData_API remains supported. Backend source imports
from app.api.client import MaterialsAPI forward to the same implementation.
The default timeout is 30 seconds and can be set with timeout=60. HTTP errors
raise requests.HTTPError; inspect exc.response.status_code and JSON code.
Build from this directory:
python -m build
Only pdfdata_api and the legacy PDFData_API module are included in the
distribution. Production environment files and backend code are excluded.
Metadata
Release files for pdfdata-api 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pdfdata_api-0.2.0.tar.gz | 5.7 kB | Without provenance | Details for pdfdata_api-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pdfdata_api-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for pdfdata_api-0.2.0-py3-none-any.whl |
Total release size: 11.9 kB
Release files / pdfdata_api-0.2.0.tar.gz
| Download URL | pdfdata_api-0.2.0.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7f7da0860f73513209bdd8c77122f9234a9f95a7cbc0cffbeeb8fea38f2b2ecc
|
|
BLAKE2b-256 checksum How to use checksums |
e1ed938ae41a53ccc000c9cd6f906182c5f032ce0f138c6cb03650499f41e8aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.9
|
Release files / pdfdata_api-0.2.0-py3-none-any.whl
| Download URL | pdfdata_api-0.2.0-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
587dc2b5d40761181c8e8653124cc31b6dfd9d65e4f978c35dc940a1b8aeaad9
|
|
BLAKE2b-256 checksum How to use checksums |
94f2660a115891192d793d3475a37c61e49197b9fc4c6d4c92527c0f1014f232
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.9
|
Security for pdfdata-api 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.