Metadata-Version: 2.1
Name: federated-collection-discovery
Version: 0.1.4
Summary: An application for discovering collections from multiple STAC APIs and/or CMRs
Home-page: https://github.com/developmentseed/federated-collection-discovery
License: MIT
Author: Henry Rodman
Author-email: henry@developmentseed.org
Requires-Python: >=3.9,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Provides-Extra: aws-lambda
Provides-Extra: uvicorn
Requires-Dist: black (>=24.4.2,<25.0.0)
Requires-Dist: fastapi (>=0.111.1,<0.112.0)
Requires-Dist: httpx (>=0.27.0,<0.28.0)
Requires-Dist: mangum (>=0.17.0,<0.18.0) ; extra == "aws-lambda"
Requires-Dist: pydantic-settings (>=2.3.4,<3.0.0)
Requires-Dist: pystac-client (>=0.8.2,<0.9.0)
Requires-Dist: python-cmr (>=0.11.0,<0.12.0)
Requires-Dist: stac-fastapi-types (>=3.0.0,<4.0.0)
Requires-Dist: uvicorn (>=0.30.1,<0.31.0) ; extra == "uvicorn"
Description-Content-Type: text/markdown

# Federated Collection Discovery

An application for discovering geospatial data collections from multiple
STAC APIs and/or CMRs.

## Installation

The package can be installed from pypi, optionally with `uvicorn` for
serving the application locally:

for `uvicorn`:

```shell
pip install federated-collection-discovery[uvicorn]
```

If you are going to run the application in an AWS Lambda function,
install the `aws_lambda` extras in the build context:

```shell
pip install federated-collection-discovery[aws_lambda]
```

## Usage

To run the FastAPI application, set the `FEDERATED_STAC_API_URLS` environment variable
and/or the `FEDERATED_CMR_URLS` environment variable, then launch it with `uvicorn`:

```shell
MAAP_API=https://stac.maap-project.org/
VEDA_API=https://openveda.cloud/api/stac/
ESA_API=https://catalogue.dataspace.copernicus.eu/stac
FEDERATED_STAC_API_URLS=${MAAP_API},${VEDA_API},${ESA_API} \
  uvicorn federated_collection_discovery.main:app --host 0.0.0.0 --port 8000
```

## Development

### Clone the repo

```shell
git clone git@github.com:developmentseed/federated-collection-discovery.git
cd federated-collection-discovery
```

### Install Poetry

Ensure you have Poetry installed. If not, install it:

```bash
curl -sSL https://install.python-poetry.org | python3 -
```

Add Poetry to your system's PATH:

- **For Unix/MacOS:**

  ```bash
  export PATH="$HOME/.local/bin:$PATH"
  ```
  
  Add the above line to your shell configuration file (`~/.bashrc`,
  `~/.bash_profile`, or `~/.zshrc`) to make it permanent.

- **For Windows:**

  Add the path to your `PATH` environment variable through the system environment
  variable settings.

### Install

Navigate to the `src/server` directory and install the dependencies (in a virtual
environment) using Poetry:

```bash
python3 -m venv env
source env/bin/activate
cd src/server
poetry install
```

