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.6.tar.gz
(11.1 kB
view hashes)
Built Distribution
Close
Hashes for mpcontribs_client-3.8.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be0e96656eae195fb9961b0abbf7a923b1ca4958a737e9c548ff93175d17e899 |
|
MD5 | b69ba1da98a67c12283f68b36b1d37e7 |
|
BLAKE2b-256 | 0696079358e177f25a54a3eb511222958329589684de70bbc0d188ff31901bfb |