<commit_before><h1 align="center">
  <img src="https://raw.githubusercontent.com/ManrajGrover/halo/master/art/halo.png" height="50px"/>
  <br>
  halo
</h1>

[![Build Status](https://travis-ci.org/ManrajGrover/halo.svg?branch=master)](https://travis-ci.org/ManrajGrover/halo) [![Build status](https://ci.appveyor.com/api/projects/status/wa6t414gltr403ff?svg=true)](https://ci.appveyor.com/project/ManrajGrover/halo)
 [![PyPI](https://img.shields.io/pypi/v/halo.svg)](https://github.com/ManrajGrover/halo) ![awesome](https://img.shields.io/badge/awesome-yes-green.svg)
> Beautiful terminal spinners in Python

![halo](https://raw.githubusercontent.com/ManrajGrover/halo/master/art/doge_spin.gif)

## Install

```shell
$ pip install halo
```

## Usage

```py
from halo import Halo

spinner = Halo(text='Loading', spinner='dots')
spinner.start()

# Run time consuming work here
# You can also change properties for spinner as and when you want

spinner.stop()
```

Alternatively, you can use halo with Python's `with` statement:

```py
from halo import Halo

with Halo({'text': 'Loading', 'spinner': 'dots'}):
    # Run time consuming work here
```

## API

### `Halo([text|spinner|color|interval|stream|enabled])`

##### `text`
*Type*: `str`

Text shown along with spinner.

##### `spinner`
*Type*: `str|dict`<commit_msg>README: Fix documentation for context manager<commit_after><h1 align="center">
  <img src="https://raw.githubusercontent.com/ManrajGrover/halo/master/art/halo.png" height="50px"/>
  <br>
  halo
</h1>

[![Build Status](https://travis-ci.org/ManrajGrover/halo.svg?branch=master)](https://travis-ci.org/ManrajGrover/halo) [![Build status](https://ci.appveyor.com/api/projects/status/wa6t414gltr403ff?svg=true)](https://ci.appveyor.com/project/ManrajGrover/halo)
 [![PyPI](https://img.shields.io/pypi/v/halo.svg)](https://github.com/ManrajGrover/halo) ![awesome](https://img.shields.io/badge/awesome-yes-green.svg)
> Beautiful terminal spinners in Python

![halo](https://raw.githubusercontent.com/ManrajGrover/halo/master/art/doge_spin.gif)

## Install

```shell
$ pip install halo
```

## Usage

```py
from halo import Halo

spinner = Halo(text='Loading', spinner='dots')
spinner.start()

# Run time consuming work here
# You can also change properties for spinner as and when you want

spinner.stop()
```

Alternatively, you can use halo with Python's `with` statement:

```py
from halo import Halo

with Halo(text='Loading', spinner='dots'):
    # Run time consuming work here
```

## API

### `Halo([text|spinner|color|interval|stream|enabled])`

##### `text`
*Type*: `str`

Text shown along with spinner.

##### `spinner`
*Type*: `str|dict`
{'fraction_non_alphanumeric': 0.18458646616541352, 'fraction_numerical': 0.008270676691729323, 'mean_word_length': 5.366028708133971, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 18, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '580647', 'n_tokens_mistral': 1029, 'n_tokens_neox': 952, 'n_words': 182}