semvec/pypi-packages huggingface dataset:
hitchrunpy 0.11.3
Run and interact with snippets of python code.
License: MIT
Requires Python: >=3.7.0
Keywords: test,python

# HitchRunPy

[![Main branch status](https://github.com/hitchdev/hitchrunpy/actions/workflows/regression.yml/badge.svg)](https://github.com/hitchdev/hitchrunpy/actions/workflows/regression.yml)

HitchRunPy is a tool to run, test and profile snippets of python code.

HitchRunPy was developed to run executable specifications
using [HitchStory](https://hitchdev.com/hitchstory) that define
Python APIs.

As such it can be used with HitchStory to build effective replacements
for unit tests and integration tests where the 'spec' is a python API.

HitchRunPy is used to run the executable specifications for all libraries
on [HitchDev](https://hitchdev.com/).

## Example


```python
from hitchrunpy import ExamplePythonCode

ExamplePythonCode(
    '/path/to/bin/python',
    '/path/to/working_directory',
).with_code((
    'with open("examplefile", "w") as handle:'
    '     handle.write("exampletext")'
)).run()
```


## Install

```sh
$ pip install hitchstory
```

## Using HitchRunPy

- [CProfile](https://hitchdev.com/hitchrunpy/using/alpha/cprofile)
- [Run with environment variables](https://hitchdev.com/hitchrunpy/using/alpha/environment-vars)
- [Exceptions](https://hitchdev.com/hitchrunpy/using/alpha/exceptions)
- [Include files](https://hitchdev.com/hitchrunpy/using/alpha/include-files)
- [Interact with running code](https://hitchdev.com/hitchrunpy/using/alpha/interact-with-running-code)
- [Setup code](https://hitchdev.com/hitchrunpy/using/alpha/setup-code)
- [Error occurred](https://hitchdev.com/hitchrunpy/using/alpha/syntax-errors)
- [Timeout](https://hitchdev.com/hitchrunpy/using/alpha/timeout)
- [Use modules](https://hitchdev.com/hitchrunpy/using/alpha/variables)



## Why use HitchRunPy?

HitchRunPy combined with HitchStory serves as an effective replacement for unit tests
in the situation where unit tests are most effective.
achat 0.1.0
asynchronous wrapper over the chatsonic api for the python programming language
License: MIT
Requires Python: >=3.8,<4.0

# achat
achat is an asynchronous wrapper over the [chatsonic api](https://writesonic.com/chat) for the python programming language.

## Features
* asynchronous support
* message history support
* convenient customization of all query parameters

## Installation
To install the latest stable version, use 
```commandline
pip install achat
```

## Examples

### Using chat instance
```python
import asyncio

from achat import SonicChat


async def main():
    chat = SonicChat(token="your api token here")
    try:
        await chat.start()
        
        response = await chat.ask("Who is Elon Musk?")
        print(response.message)

        response = await chat.ask("When was he born?")
        print(response.message)
    finally:
        await chat.close()


asyncio.run(main())
```

### Using async context manager

```python
import asyncio

from achat import SonicChat


async def main():
    async with SonicChat(token="your api token here") as chat:
        response = await chat.ask("Who is Elon Musk?")
        print(response.message)

        response = await chat.ask("When was he born?")
        print(response.message)


asyncio.run(main())

```

## Documentation
Coming soon

## Dependencies
* [aiohttp](https://github.com/aio-libs/aiohttp)