Skip to main content

client library for MPContribs API

Project description

PyPI Libraries.io dependency status for latest release

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).

OverflowError: timeout value is too large

Install the bravado fork (PR) manually via

pip install "bravado[fido] @ git+https://github.com/tschaume/bravado@9ce06f2df7118e16af4a3d3fdc21ccfeedc5cd50#egg=bravado-11.0.3"

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-5.10.4.tar.gz (29.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mpcontribs_client-5.10.4-py3-none-any.whl (25.4 kB view details)

Uploaded Python 3

File details

Details for the file mpcontribs_client-5.10.4.tar.gz.

File metadata

  • Download URL: mpcontribs_client-5.10.4.tar.gz
  • Upload date:
  • Size: 29.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.1

File hashes

Hashes for mpcontribs_client-5.10.4.tar.gz
Algorithm Hash digest
SHA256 0fa190e837d80f3ce46d3657ca5b5d400f239995650a3564caae04bac5302445
MD5 caec797129b5a859edf03a6d5df8605c
BLAKE2b-256 55e1ca5f41c0784483b4ab1839aeeca194ed08e999c3deac84fc6c9d597b90a4

See more details on using hashes here.

File details

Details for the file mpcontribs_client-5.10.4-py3-none-any.whl.

File metadata

File hashes

Hashes for mpcontribs_client-5.10.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2c4fbc0a3ce58b7544024783ce0521ee78acba30f5bab7036084d8b6f8832488
MD5 ae3b4ef5f49a7b13a6815166c11a18f5
BLAKE2b-256 2999b07c3e18d4560ffe0d611372d7ad5d2ab686c95bb8a36e4a5f1628042387

See more details on using hashes here.

Supported by

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