Package: optimade
OPTIMADE Python toolsLatest releaseBuild statusActivityThe aim ofOPTIMADEis to develop a common API, compliant with theJSON:API 1.0specification.
This is to enable interoperability among databases that serve crystal structures and calculated properties of existing and hypothetical materials.This repository contains a library of tools for implementing and consumingOPTIMADE APIsusing Python:pydanticdata models for allOPTIMADE entry typesand endpoint responses, and aLarkEBNF grammarimplementation for the OPTIMADE filter language.Adapters to map OPTIMADE data to and from many commonly used atomistic Python frameworks (e.g.,pymatgen,ASE) and crystallographic file types (e.g.,CIF), using theoptimade.adaptersmodule.A configurable reference server implementation that can make use of either MongoDB or Elasticsearch database backends out-of-the-box, and is readily extensible to other backends. Try it out on thedemo site! The OpenAPI schemas of the server are used to construct theOPTIMADE schemassite.AnOPTIMADE client(optimade-get) that can query multipleOPTIMADE providersconcurrently with a given filter, at the command-line or from Python code.A fuzzy API validator tool, which may be called from the shell (optimade-validator) or used as a GitHub Action fromoptimade-validator-action; this validator is used to construct theproviders dashboard.DocumentationThis document, guides, and the full module API documentation can be found online athttps://optimade.org/optimade-python-tools.
In particular, documentation of the OPTIMADE API response data models (implemented here withpydantic) can be found online underOPTIMADE Data Models.The release history and changelog can be found inthe changelog.InstallationDetailed installation instructions for different use cases (e.g., using the library or running a server) can be found inthe installation documentation.The latest stable version of this package can be obtained fromPyPI:pipinstalloptimadeThe latest development version of this package can be obtained from the master branch of this repository:gitclonehttps://github.com/Materials-Consortia/optimade-python-toolsSupported OPTIMADE versionsEach release of theoptimadepackage from this repository only targets one version of the OPTIMADE specification, summarised in the table below.OPTIMADE API versionoptimaderequirementsv1.0.0optimade<=0.12.9v1.1.0optimade~=0.16Contributing and Getting HelpAll development of this package (bug reports, suggestions, feedback and pull requests) occurs in theoptimade-python-tools GitHub repository.
Contribution guidelines and tips for getting help can be found in thecontributing notes.How to citeIf you use this package to access or serve OPTIMADE data, we kindly request that you consider citing the following:Andersenet al., OPTIMADE, an API for exchanging materials data,Sci. Data8, 217 (2021)10.1038/s41597-021-00974-zEvanset al., optimade-python-tools: a Python library for serving and consuming materials data via OPTIMADE APIs.Journal of Open Source Software,6(65), 3458 (2021)10.21105/joss.03458LinksOPTIMADE Specification, the human-readable specification that this library is based on.optimade-validator-action, a GitHub action that can be used to validate implementations from a URL (using the validator from this repo).OpenAPI, the machine-readable format used to specify the OPTIMADE API inopenapi.jsonandindex_openapi.json.Interactive documentationgenerated fromopenapi.json(see alsointeractive JSON editor).pydantic, the library used for generating the OpenAPI schema fromPython models.FastAPI, the framework used for generating the reference implementation expressed by theopenapi.jsonspecification.Lark, the library used to parse the filter language in OPTIMADE queries.