semvec/pypi-packages huggingface dataset:
niwa_api_client 0.1.2
Client for NIWA's APIs
Requires Python: >=3.12

## Python API Client for NIWA's APIs

This Python package provides a convenient way to interact with NIWA's APIs. It includes functionality to fetch tide data, generate tide charts, and handle various data formats.

*Disclaimer: This is not an official NIWA package. I have nothing to do with NIWA other than enjoying using their open APIs.*

### Installation

You can install the package using pip:

```bash
pip install niwa_api_client
```

### Usage

#### Tide Data

To fetch tide data, you can use the `TideAPIClient` class. Here's an example of how to use it:

```python
from niwa_api_client import TideAPIClient

client = TideAPIClient(api_key='YOUR_API_KEY')
data = client.get_data(lat=lat, long=long)
print(data)
```

### CLI

The package also includes a command-line interface (CLI) for interacting with the APIs. You can use the `niwa-tides` command to fetch tide data or generate tide charts.

#### Fetch Tide Data

To fetch tide data, use the `fetch-tide-data` command:

```bash
niwa-tides --lat -36 --long 174 
```

To fetch the tide chart as a PNG image, use the format and output options:

```bash
niwa-tides --lat -36 --long 174 --format png --output tide.png
```

#### Using an API Key in the cli

You can either pass the api key as an argument:

```bash
niwa-tides --lat -36 --long 174 --api-key YOUR_API_KEY
```

Or set the API_KEY environment variable:

```bash
export API_KEY=YOUR_API_KEY
niwa-tides --lat -36 --long 174 
```
supercontrast 0.0.2
supercontrast is a package for unifying machine learning models across providers
Requires Python: >=3.10

# supercontrast
<h4 align="center">
    <a href="https://pypi.org/project/supercontrast/" target="_blank">
        <img src="https://img.shields.io/pypi/v/supercontrast.svg" alt="PyPI Version">
    </a>
    <a href="https://www.ycombinator.com/companies/supercontrast">
        <img src="https://img.shields.io/badge/Y%20Combinator-F24-orange?style=flat-square" alt="Y Combinator F24">
    </a>
    <a href="https://discord.gg/R9TSAc23">
        <img src="https://img.shields.io/static/v1?label=Chat%20on&message=Discord&color=blue&logo=Discord&style=flat-square" alt="Discord">
    </a>
    <a href="https://docs.supercontrast.com/" target="_blank">
        <img src="https://img.shields.io/badge/docs-latest-blue.svg" alt="Documentation Status">
    </a>
</h4>

`supercontrast` is a package for easily running machine learning models from a variety of providers in a unified interface. We're adding more tasks and providers all the time, and would love help from the community to add more!


We currently support the following tasks:

- **OCR**
- **Sentiment Analysis**
- **Transcription**
- **Translation**

From some of the most popular providers:

- **AWS**
- **Azure**
- **GCP**
- **OpenAI**
- **Anthropic**
- **...and more!**


## Installation

```bash
pip install supercontrast
```

**NOTE:** `supercontrast` is supported on Python 3.12, it may be unstable on other versions. If you have conda installed, you can create an environment with the required packages using the `environment.yml` file:

```bash
conda env create -f environment.yml
```

## Usage

```python
from supercontrast import (
    Provider,
    SentimentAnalysisRequest,
    SuperContrastClient,
    Task,
)

# Sending a Sentiment Analysis Request to AWS
client = SuperContrastClient(task=Task.SENTIMENT_ANALYSIS, providers=[Provider.AWS])
input_text = "I love programming in Python!"
response, metadata = client.request(SentimentAnalysisRequest(text=input_text))
```

For more examples of how to use `supercontrast`, refer to [examples.py](examples/examples.py) in the [examples](examples/) folder.

## Contributing

We welcome contributions to the project! To contribute, please follow these steps:

### 1. Clone the repo

```bash
git clone https://github.com/supercontrast/supercontrast.git
```

### 2. Install package

```bash
pip install -e .[dev]
```

### 3. Run linting

```bash
black .
isort .
```

### 4. Run tests

```bash
pytest -k <test_name>
```

### 5. Submit a PR

Submit a PR to the main branch! We will review and merge your PR.