Metadata-Version: 2.1
Name: blue_objects
Version: 5.60.1
Summary: 🌀 data objects for Bash.
Home-page: https://github.com/kamangir/blue-objects
Author: Arash Abadpour (Kamangir)
Author-email: arash@kamangir.net
License: Public Domain
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Unix Shell
Classifier: License :: Public Domain
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: blueness
Requires-Dist: abcli
Requires-Dist: boto3
Requires-Dist: dill
Requires-Dist: geojson
Requires-Dist: geopandas
Requires-Dist: matplotlib
Requires-Dist: numpy
Requires-Dist: opencv-python
Requires-Dist: pandas
Requires-Dist: pymysql
Requires-Dist: pyyaml
Requires-Dist: pylint
Requires-Dist: pytest
Requires-Dist: python-dotenv[cli]
Requires-Dist: tqdm
Requires-Dist: urllib3

# 🌀 blue-objects

🌀 `blue-objects` is an abstraction for cloud objects that are accessible in Python and Bash. For example, the Sentinel-2 [datacube](https://github.com/kamangir/blue-geo/tree/main/blue_geo/datacube) `datacube-EarthSearch-sentinel_2_l1c-S2A_10UDC_20240731_0_L1C` and 🌐 [`@geo watch`  outputs](https://github.com/kamangir/blue-geo/tree/main/blue_geo/watch) are objects.

## installation

```bash
pip install blue-objects
```

## use in Bash

```bash
@select
@catalog query copernicus sentinel_2 - . \
  --count 10 \
  --datetime 2024-07-30/2024-08-09 \
  --lat  51.83 \
  --lon -122.78

@select $(@catalog query read - . --count 1 --offset 3)
@datacube ingest scope=metadata+quick .

@publish tar .
```

from [`blue_geo/catalog/copernicus`](https://github.com/kamangir/blue-geo/tree/main/blue_geo/catalog/copernicus).

## use in Python

```python
def map_function(
    datacube_id: str,
    object_name: str,
) -> bool:
    success, target, list_of_files = load_watch(object_name)
    if not success or not list_of_files:
        return success
    filename = list_of_files[0]

    logger.info(
        "{}.map: {} @ {} -> {}".format(
            NAME,
            target,
            datacube_id,
            object_name,
        )
    )

    logger.info("🪄")

```

from [`blue_geo/watch/workflow/map.py`](https://github.com/kamangir/blue-geo/blob/main/blue_geo/watch/workflow/map.py).

---

to use on [AWS SageMaker](https://aws.amazon.com/sagemaker/) replace `<plugin-name>` with "blue_objects" and follow [these instructions](https://github.com/kamangir/notebooks-and-scripts/blob/main/SageMaker.md).

[![pylint](https://github.com/kamangir/blue-objects/actions/workflows/pylint.yml/badge.svg)](https://github.com/kamangir/blue-objects/actions/workflows/pylint.yml) [![pytest](https://github.com/kamangir/blue-objects/actions/workflows/pytest.yml/badge.svg)](https://github.com/kamangir/blue-objects/actions/workflows/pytest.yml) [![bashtest](https://github.com/kamangir/blue-objects/actions/workflows/bashtest.yml/badge.svg)](https://github.com/kamangir/blue-objects/actions/workflows/bashtest.yml) [![PyPI version](https://img.shields.io/pypi/v/blue-objects.svg)](https://pypi.org/project/blue-objects/)

built by 🌀 [`blue_options-4.73.1-abcli-metadata-2024-09-15-09097`](https://github.com/kamangir/awesome-bash-cli), based on 🌀 [`blue_objects-5.60.1`](https://github.com/kamangir/blue-objects).

