Skip to main content

Tools for implementing and consuming OPTiMaDe APIs.

Project description

OPTiMaDe Python tools

Latest release Build status Activity
PyPI Version
PyPI - Python Version
OPTiMaDe
Build Status
codecov
Heroku
Commit 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

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

optimade-0.3.3.tar.gz (55.9 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page