![PyPI](https://img.shields.io/pypi/v/mpcontribs-client?style=flat-square)
![Libraries.io dependency status for latest release](https://img.shields.io/librariesio/release/pypi/mpcontribs-client?style=flat-square)
Small, dynamic python client library to connect to [MPContribs](https://docs.mpcontribs.org)
APIs based on Yelp's [bravado](https://bravado.readthedocs.io).
```python
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:
```python
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](https://github.com/Yelp/bravado/pull/472)) manually via
```
pip install "bravado[fido] @ git+https://github.com/tschaume/bravado@9ce06f2df7118e16af4a3d3fdc21ccfeedc5cd50#egg=bravado-11.0.3"
```
Raw data
{
"_id": null,
"home_page": "https://github.com/materialsproject/MPContribs/tree/master/mpcontribs-client",
"name": "mpcontribs-client",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "",
"author": "Patrick Huck",
"author_email": "phuck@lbl.gov",
"download_url": "https://files.pythonhosted.org/packages/45/b6/b5636c5784d6e00f1cad9fd2d323bf22444da2c4064b94796825b0c93483/mpcontribs-client-5.7.0.tar.gz",
"platform": null,
"description": "![PyPI](https://img.shields.io/pypi/v/mpcontribs-client?style=flat-square)\n![Libraries.io dependency status for latest release](https://img.shields.io/librariesio/release/pypi/mpcontribs-client?style=flat-square)\n\nSmall, dynamic python client library to connect to [MPContribs](https://docs.mpcontribs.org)\nAPIs based on Yelp's [bravado](https://bravado.readthedocs.io).\n\n```python\nfrom mpcontribs.client import Client\nclient = Client()\ndir(client) # show available resources\n```\n\nBy default, the client connects to https://contribs-api.materialsproject.org and uses the environment variable\n`MPCONTRIBS_API_KEY` to set the API key. The key can alternatively be set explicitly via the\n`apikey` argument to the constructor. The `host` argument or the `MPCONTRIBS_API_HOST`\nenvironment variable can be set to connect to other MPContribs-style APIs:\n\n```python\nclient = Client(host='ml-api.materialsproject.org')\n```\n\n**Troubleshooting**\n\n```\ntwisted.web._newclient.ResponseNeverReceived:\n[<twisted.python.failure.Failure OpenSSL.SSL.Error:\n[('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')]>]\n```\n\nSet the environment variable `SSL_CERT_FILE` to `$(python -m certifi)`.\n\n```\nOverflowError: timeout value is too large\n```\n\nInstall the bravado fork ([PR](https://github.com/Yelp/bravado/pull/472)) manually via \n```\npip install \"bravado[fido] @ git+https://github.com/tschaume/bravado@9ce06f2df7118e16af4a3d3fdc21ccfeedc5cd50#egg=bravado-11.0.3\"\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "client library for MPContribs API",
"version": "5.7.0",
"project_urls": {
"Homepage": "https://github.com/materialsproject/MPContribs/tree/master/mpcontribs-client"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "552d83a5c79191aa072cdc313862f2f07476a0b91518f86e5e5990d6e181489c",
"md5": "50c4b0acab9b9da73a2dd3a9c2651943",
"sha256": "4a1bc41423c588da8649f9eedafb0d82aa39c49537c1a7b9c7f66cc62b935e6e"
},
"downloads": -1,
"filename": "mpcontribs_client-5.7.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "50c4b0acab9b9da73a2dd3a9c2651943",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 24612,
"upload_time": "2024-02-02T21:26:53",
"upload_time_iso_8601": "2024-02-02T21:26:53.139096Z",
"url": "https://files.pythonhosted.org/packages/55/2d/83a5c79191aa072cdc313862f2f07476a0b91518f86e5e5990d6e181489c/mpcontribs_client-5.7.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "45b6b5636c5784d6e00f1cad9fd2d323bf22444da2c4064b94796825b0c93483",
"md5": "11d882646f847c889d7b509bb1421a88",
"sha256": "d9d2539481b8ad94866694f5987fc2e60d6642e46cd369d6df226d9914fc200a"
},
"downloads": -1,
"filename": "mpcontribs-client-5.7.0.tar.gz",
"has_sig": false,
"md5_digest": "11d882646f847c889d7b509bb1421a88",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 29505,
"upload_time": "2024-02-02T21:26:59",
"upload_time_iso_8601": "2024-02-02T21:26:59.769472Z",
"url": "https://files.pythonhosted.org/packages/45/b6/b5636c5784d6e00f1cad9fd2d323bf22444da2c4064b94796825b0c93483/mpcontribs-client-5.7.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-02 21:26:59",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "materialsproject",
"github_project": "MPContribs",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "mpcontribs-client"
}