client library for MPContribs API
Project description
Small, dynamic python client library to connect to MPContribs APIs based on Yelp's bravado.
from mpcontribs.client import Client
client = Client()
dir(client) # show available resources
By default, the client connects to https://contribs-api.materialsproject.org and uses the environment variable
MPCONTRIBS_API_KEY
to set the API key. The key can alternatively be set explicitly via the
apikey
argument to the constructor. The host
argument or the MPCONTRIBS_API_HOST
environment variable can be set to connect to other MPContribs-style APIs:
client = Client(host='ml-api.materialsproject.org')
Troubleshooting
twisted.web._newclient.ResponseNeverReceived:
[<twisted.python.failure.Failure OpenSSL.SSL.Error:
[('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')]>]
Set the environment variable SSL_CERT_FILE
to $(python -m certifi)
.
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
mpcontribs-client-3.8.5.tar.gz
(11.1 kB
view hashes)
Built Distribution
Close
Hashes for mpcontribs_client-3.8.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15abc67002c407cd4560a8d26f7fd0ad396b0b40be735a67fab20ef579e19aec |
|
MD5 | 7432db9848593bd5d6f1b7f5e6730112 |
|
BLAKE2b-256 | 02ea4e52a3bf5971cc7ea27ed02150a0e0194b69e7c1e266e22bcc4ce7955286 |