semvec/pypi-packages huggingface dataset:
myco-ai 0.1.0
Myco AI is a mycology assistant.
License: MIT
Requires Python: >=3.8,<4.0
Keywords: app,cli,mycology,ai

# myco-ai

[![Validation Workflow](https://github.com/mbeacom/myco-ai/actions/workflows/validate.yaml/badge.svg?branch=main&event=push)](https://github.com/mbeacom/myco-ai/actions/workflows/validate.yaml)
[![Pre-Commit Checks Workflow](https://github.com/mbeacom/myco-ai/actions/workflows/pre-commit.yaml/badge.svg?branch=main&event=push)](https://github.com/mbeacom/myco-ai/actions/workflows/pre-commit.yaml)
[![Coverage Status](https://codecov.io/github/mbeacom/myco-ai/coverage.svg?branch=main)](https://codecov.io/github/mbeacom/myco-ai?branch=main)
[![PyPi](https://img.shields.io/pypi/v/myco-ai-x)](https://pypi.org/project/myco-ai-x/)

This project is meant to be an assistant for mycologists.

## Usage

This project uses:

- [poetry](https://python-poetry.org/) for dependency management and packaging.
- [poethepoet](https://poethepoet.natn.io/) for task running.
- [pytest](https://docs.pytest.org/en/stable/) for testing.
- [black](https://black.readthedocs.io/en/stable/) for auto-formatting.
- [mypy](https://mypy.readthedocs.io/en/stable/) for static type checking.
- [pre-commit](https://pre-commit.com/) for git hooks.
- [ruff](https://beta.ruff.rs/docs/) for linting.
- [mkdocs](https://www.mkdocs.org/) for documentation.

Ensure you have installed the relevant dependencies before continuing.

### Install dependencies

```bash
poetry install
```

### Run tests

```bash
poetry poe test
# or: poetry run poe test
```
ask-lib 2.0.1
Utility function to ask for user's confirmation in a CLI
License: MIT
Requires Python: >=3.8,<4.0

<p align="center">
    <img src="./img/ask_lib_logo.png">
</p>

![](https://img.shields.io/pypi/l/ask_lib) 
![](https://img.shields.io/pypi/v/ask_lib) 
![](https://img.shields.io/pypi/pyversions/ask_lib)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Documentation Status](https://readthedocs.org/projects/ask-lib/badge/?version=latest)](https://ask-lib.readthedocs.io/en/latest/?badge=latest)
[![CallMePixelMan's Workflow](https://github.com/CallMePixelMan/ask_lib/actions/workflows/callmepixelman-workflow.yaml/badge.svg)](https://github.com/CallMePixelMan/ask_lib/actions/workflows/callmepixelman-workflow.yaml)


# ask_lib
ask_lib is a small Python package available on PyPi that lets you ask user's confirmation from a [CLI](https://en.wikipedia.org/wiki/Command-line_interface).


## Documentation
You can take a look to [the documentation](https://ask-lib.readthedocs.io/en/latest/index.html), hosted by ReadTheDocs.


## Features
- [x] Simple API.
- [x] No dependencies.
- [x] Well tested.
- [x] Featuring CI.

## Install
```sh
pip install ask_lib

# Or, if you are using poetry
poetry add ask_lib
```

## Examples
```py
from ask_lib import ask, AskResult


to_remove = "file.txt"

if ask("Are you sure to delete this file ?", AskResult.NO):
    os.remove(to_remove)
```
```py
import os
import sys

from ask_lib import ask, AskResult


yes_to_all = AskFlag.YES_TO_ALL if "-force" in sys.argv else None
to_remove = "file.txt"

if ask("Are you sure to delete this file ?", flag=yes_to_all):
    os.remove(to_remove)
```