Skip to content

Commit

Permalink
Update the documentation of MPResterBasic.
Browse files Browse the repository at this point in the history
  • Loading branch information
Shyue Ping Ong committed Oct 2, 2023
1 parent ffba535 commit 1749cf8
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions pymatgen/ext/matproj.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,20 @@

class _MPResterBasic:
"""
A new MPRester that supports the new MP API. If you are getting your API key from the new dashboard of MP, you will
need to use this instead of the original MPRester because the new API keys do not work with the old MP API (???!).
This is a basic implementation for now and features will be added soon. The current implementation is to enable
users with simple requirements use the API without having to install additional packages.
If you are a power user who needs the full functionality, please get the mp-api package instead.
This is Pymatgen's own implement of a MPRester that supports the new MP API. If you are getting your API key from
the new dashboard of MP, you will need to use this instead of the original MPRester because the new API keys do
not work with the old MP API (???!).
The reason why this class exists is because it is the belief of the pymatgen maintainers that access to the MP API
remains a critical part of pymatgen functionality. However, the new mp-api package is written in a way that
prevents us from importing the mp-api package because of cyclic dependencies. It is also the opinion of Pymatgen
maintainers that the implementation of mp-api is too heavy duty for most users (few care about document models,
etc.). Further, this implementation serves as a simple reference for end developers who want to develop their own
interfaces to the MP API via the REST urls.
If you are a power user, feel free to install the mp-api package. All issues regarding that implementation should
be directed to the maintainers of that repository and not pymatgen. We will support only issues with regards to
our implementation only.
"""

def __init__(self, api_key: str | None = None, include_user_agent: bool = True) -> None:
Expand Down

0 comments on commit 1749cf8

Please sign in to comment.