Tools for implementing and consuming OPTiMaDe APIs.
Project description
OPTiMaDe Python tools
Latest release | Build status | Activity |
---|---|---|
The aim of OPTiMaDe is to develop a common API, compliant with the JSON API 1.0 specification. This is to enable interoperability among databases that contain calculated properties of existing and hypothetical materials.
This repository contains a library of tools for implementing and consuming OPTiMaDe APIs using Python.
Status
Both the OPTiMaDe specification and this repository are under development.
Installation (Index Meta-Database)
This package may be used to setup and run an OPTiMaDe index meta-database.
Install the package via pip install optimade[server]
and change the file server.cfg
found in the root of the package.
The server.cfg
file serves paths to a server runtime configuration file (either an ini
or json
file, see the config.ini
file for an example) and an index /links
-endpoint data file.
The paths must be relative from your current working directory, where your server.cfg
is located, or they must be absolute paths.
The index meta-database is set up to populate a mongomock
in-memory database with resources from a static json
file containing the child
resources you, as a database provider, want to serve under this index meta-database.
Running the index meta-database is then as simple as writing ./run.sh index
in a terminal from the root of this package.
You can find it at the base URL: http://localhost:5001/index/optimade/
.
Note: server.cfg
is loaded from the current working directory, from where you run run.sh
.
E.g., if you have installed optimade
on a Linux machine at /home/USERNAME/optimade/optimade-python-tools
and you run the following:
:~$ ./optimade/optimade-python-tools/run.sh index
Then you need server.cfg
to be located in your home folder containing either relative paths from its current location or absolute paths.
Development installation & Contributing
Full installation instructions and contribution guidelines can be found in CONTRIBUTING.
Links
- OPTiMaDe Specification, the human-readable specification that this library is based on.
- OpenAPI, the machine-readable format used to specify the OPTiMaDe API in
openapi.json
. - Interactive documentation generated from
openapi.json
(see also interactive JSON editor). - pydantic, the library used for generating the OpenAPI schema from Python models.
- FastAPI, the framework used for generating the reference implementation from the
openapi.json
specification. - lark, the library used to parse the filter language in OPTiMaDe queries.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file optimade-0.3.1.tar.gz
.
File metadata
- Download URL: optimade-0.3.1.tar.gz
- Upload date:
- Size: 53.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55916aea995efea011130664decb6fcfffda938a1c12065704df319942218801 |
|
MD5 | 99f0266530549251446629747a8151a9 |
|
BLAKE2b-256 | 6c7e3f4a2703f92a90f52c5419fd214df30ba4b33d0eb47d1a53c0e2592da38a |