@@ -131,37 +131,40 @@ def __init__(
131131 headers : dict | None = None ,
132132 mute_progress_bars : bool = _MAPI_SETTINGS .MUTE_PROGRESS_BARS ,
133133 ):
134- """Args:
135- api_key (str): A String API key for accessing the MaterialsProject
136- REST interface. Please obtain your API key at
137- https://next-gen.materialsproject.org/api. If this is None,
138- the code will check if there is a "MP_API_KEY" setting.
139- If so, it will use that environment variable. This makes
140- easier for heavy users to simply add this environment variable to
141- their setups and MPRester can then be called without any arguments.
142- endpoint (str): Url of endpoint to access the MaterialsProject REST
143- interface. Defaults to the standard Materials Project REST
144- address at "https://api.materialsproject.org", but
145- can be changed to other urls implementing a similar interface.
146- notify_db_version (bool): If True, the current MP database version will
147- be retrieved and logged locally in the ~/.mprester.log.yaml. If the database
148- version changes, you will be notified. The current database version is
149- also printed on instantiation. These local logs are not sent to
150- materialsproject.org and are not associated with your API key, so be
151- aware that a notification may not be presented if you run MPRester
152- from multiple computing environments.
153- include_user_agent (bool): If True, will include a user agent with the
154- HTTP request including information on pymatgen and system version
155- making the API request. This helps MP support pymatgen users, and
156- is similar to what most web browsers send with each page request.
157- Set to False to disable the user agent.
158- monty_decode: Decode the data using monty into python objects
159- use_document_model: If False, skip the creating the document model and return data
160- as a dictionary. This can be simpler to work with but bypasses data validation
161- and will not give auto-complete for available fields.
162- session (Session): Session object to use. By default (None), the client will create one.
163- headers (dict): Custom headers for localhost connections.
164- mute_progress_bars (bool): Whether to mute progress bars.
134+ """Initalise the MPRester.
135+
136+ Arguments:
137+ api_key (str): A String API key for accessing the MaterialsProject
138+ REST interface. Please obtain your API key at
139+ https://next-gen.materialsproject.org/api. If this is None,
140+ the code will check if there is a "MP_API_KEY" setting.
141+ If so, it will use that environment variable. This makes
142+ easier for heavy users to simply add this environment variable to
143+ their setups and MPRester can then be called without any arguments.
144+ endpoint (str): Url of endpoint to access the MaterialsProject REST
145+ interface. Defaults to the standard Materials Project REST
146+ address at "https://api.materialsproject.org", but
147+ can be changed to other urls implementing a similar interface.
148+ notify_db_version (bool): If True, the current MP database version will
149+ be retrieved and logged locally in the ~/.mprester.log.yaml. If the database
150+ version changes, you will be notified. The current database version is
151+ also printed on instantiation. These local logs are not sent to
152+ materialsproject.org and are not associated with your API key, so be
153+ aware that a notification may not be presented if you run MPRester
154+ from multiple computing environments.
155+ include_user_agent (bool): If True, will include a user agent with the
156+ HTTP request including information on pymatgen and system version
157+ making the API request. This helps MP support pymatgen users, and
158+ is similar to what most web browsers send with each page request.
159+ Set to False to disable the user agent.
160+ monty_decode: Decode the data using monty into python objects
161+ use_document_model: If False, skip the creating the document model and return data
162+ as a dictionary. This can be simpler to work with but bypasses data validation
163+ and will not give auto-complete for available fields.
164+ session: Session object to use. By default (None), the client will create one.
165+ headers: Custom headers for localhost connections.
166+ mute_progress_bars: Whether to mute progress bars.
167+
165168 """
166169 # SETTINGS tries to read API key from ~/.config/.pmgrc.yaml
167170 api_key = api_key or DEFAULT_API_KEY or SETTINGS .get ("PMG_MAPI_KEY" )
0 commit comments