Metadata-Version: 2.1
Name: pexpect-executor
Version: 0.0.1
Summary: Automate interactive CLI tools actions
Home-page: https://gitlab.com/AdrianDC/pexpect-executor
Author: Adrian DC
Author-email: radian.dc@gmail.com
License: Apache License 2.0
Project-URL: Bug Reports, https://gitlab.com/AdrianDC/pexpect-executor/-/issues
Project-URL: Changelog, https://gitlab.com/AdrianDC/pexpect-executor/blob/master/CHANGELOG.md
Project-URL: Documentation, https://gitlab.com/AdrianDC/pexpect-executor#pexpect-executor
Project-URL: Source, https://gitlab.com/AdrianDC/pexpect-executor
Project-URL: Statistics, https://pypistats.org/packages/pexpect-executor
Keywords: pexpect pexpect-executor
Platform: UNKNOWN
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Software Development
Classifier: Topic :: Utilities
Requires-Python: >=3, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*
Description-Content-Type: text/markdown
Requires-Dist: pexpect (>=4.2.1)
Requires-Dist: setuptools (>=45.1.0)

# pexpect-executor

[![Build](https://gitlab.com/AdrianDC/pexpect-executor/badges/master/pipeline.svg)](https://gitlab.com/AdrianDC/pexpect-executor/-/commits/master/)
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=AdrianDC_pexpect-executor&metric=bugs)](https://sonarcloud.io/dashboard?id=AdrianDC_pexpect-executor)
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=AdrianDC_pexpect-executor&metric=code_smells)](https://sonarcloud.io/dashboard?id=AdrianDC_pexpect-executor)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=AdrianDC_pexpect-executor&metric=coverage)](https://sonarcloud.io/dashboard?id=AdrianDC_pexpect-executor)
[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=AdrianDC_pexpect-executor&metric=ncloc)](https://sonarcloud.io/dashboard?id=AdrianDC_pexpect-executor)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=AdrianDC_pexpect-executor&metric=alert_status)](https://sonarcloud.io/dashboard?id=AdrianDC_pexpect-executor)

Automate interactive CLI tools actions to create previews or tests in Python.

---

## Examples

```python
#!/usr/bin/env python3

# Modules libraries
from pexpect_executor import Executor

# Configure
Executor.configure(host='previews', tool='pexpect-executor')

# List
Executor('ls -la', workdir='/').\
    read().\
    finish()

# More
Executor('ls -la | more -5', workdir='/').\
    read().\
    wait(0.5).\
    press('s').\
    read().\
    wait(0.5).\
    press('s').\
    read().\
    wait(0.5).\
    press('b').\
    read().\
    wait(0.2).\
    press('b').\
    read().\
    wait(0.2).\
    press(' ').\
    read().\
    wait(1).\
    press(Executor.KEY_ENTER).\
    read().\
    wait(1).\
    press('q').\
    finish()

# Prompt
Executor('').\
    finish()
```

---

## Dependencies

- [pexpect](https://pypi.org/project/pexpect/): Interactive console applications controller

---

## References

- [gitlabci-local](https://pypi.org/project/gitlabci-local/): Launch .gitlab-ci.yml jobs locally
- [peek](https://github.com/phw/peek): Simple GIF screen recorder
- [PyPI](https://pypi.org/): The Python Package Index
- [twine](https://pypi.org/project/twine/): Utility for publishing on PyPI


