Metadata-Version: 2.1
Name: strideutils
Version: 0.3.0
Summary: 
Author: Your Name
Author-email: you@example.com
Requires-Python: >=3.9
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
Requires-Dist: bech32 (>=1.2.0)
Requires-Dist: google-api-python-client (>=2.100.0)
Requires-Dist: google-auth-httplib2 (>=0.1.1)
Requires-Dist: google-auth-oauthlib (>=1.1.0)
Requires-Dist: google-cloud-bigquery (>=3.11.4)
Requires-Dist: gspread (>=6.0.2)
Requires-Dist: pandas (>=2.1.1)
Requires-Dist: pycryptodome (>=3.20.0)
Requires-Dist: python-dateutil (>=2.8.2)
Requires-Dist: pytz (>=2023.3)
Requires-Dist: pyyaml (>=6.0.1)
Requires-Dist: redis (>=4.5.4)
Requires-Dist: slack-sdk (>=3.23.0)
Requires-Dist: tabulate (>=0.9.0)
Requires-Dist: tqdm (>=4.66.1)
Requires-Dist: twilio (>=8.10.0)
Description-Content-Type: text/markdown

## Description
Strideutils contains common patterns for cosmos api requests, monitoring, and other integrations for gsheets, slack, and twilio.

## Setup

In a virtual environment of your choice install strideutils.

```
pip install strideutils
```
with poetry
```
poetry add strideutils
```

This package is frequently updated, so keep that in mind while developing.

## Configuration
Strideutils requires three different environment variables that can be added to `~/.zshrc` or `~/.bashrc`

```
export STRIDEUTILS_CONFIG_PATH=
export STRIDEUTILS_SECRETS_PATH=
export ENV=DEV
```

Examples of these files are included under strideutils/config_examples.
Stride Labs employees can find config.yaml in launchpad and strideutils_secrets.yamls in lastpass.

Any configuration or secrets that aren't consumed don't need to be set. However if one is accessed but unset, an error will be thrown for easier debugging.

Once strideutils is installed and configured, each module you need should be imported individually. This isolates the different secrets that are expected and consumed.

Some common imports:
```
from strideutils.stride_config import config
# config.get_chain(name='osmosis')
from strideutils import stride_requests
# stride_requests.request('https://google.com')
from strideutils.stride_alerts import raise_alert
```

## Developing Strideutils
To access the strideutils repo locally rather than using the pip version (for actively making changes to strideutils and a dependency), add the path to strideutils to the beginning of PYTHONPATH

```
import sys
sys.path = ['/path/to/strideutils/'] + sys.path
```

Confirm the location of where it's being imported from by printing the module.
After making changes to strideutils, reload it before testing your application.

```
from importlib import reload
reload(strideutils)
```

