Usage
=====

.. _installation:

Installation
------------

To use geodisasters, first install it using pip:

.. code-block:: console

   (.venv) $ pip install geodisasters

Creating clients
----------------
To authorize against the endpoints being hosted on Rapid API you need to use your own Rapid API key.
This geopedestrian module uses client instances from the georapid module.

The ``host`` parameter must target the specific host like ``"geodisasters.p.rapidapi.com"``.
Furthermore, the factory directly access ``os.environ['x_rapidapi_key']`` and uses the specified API key as a header parameter.
Otherwise, :py:func:`georapid.factory.EnvironmentClientFactory.create_client_with_host` will raise a :exc:`ValueError`.

For example:

>>> from georapid.client import GeoRapidClient
>>> from georapid.factory import EnvironmentClientFactory
>>> host = 'geodisasters.p.rapidapi.com'
>>> client: GeoRapidClient = EnvironmentClientFactory.create_client_with_host(host)

For more details take a closer look at `Creating clients <https://georapid.readthedocs.io/en/latest/usage.html#creating-clients>`__.

Terms of use
------------
We designed the geospatial intelligence API services for research and analysis of geospatial knowledge worldwide. 
The geospatial datasets and any result being generated by these API services are available for unrestricted use for academic, commercial, or governmental use of any kind.

Redistribution
--------------
You may redistribute, republish, and mirror the geospatial datasets in any form. 
However, any use or redistribution of the geospatial datasets and results must include a citation to GEOINT API services and a link to our website `Geospatial AI <https://geospatial-ai.de>`__.
