Metadata-Version: 2.4
Name: toxiproxpy
Version: 0.1.2
Summary: Add your description here
Author: warmagedon007
Author-email: warmagedon007 <warmagedon007@gmail.com>
License-File: LICENSE
Requires-Dist: pydantic>=2.13.4
Requires-Dist: requests>=2.34.2
Requires-Python: >=3.0
Project-URL: Repository, https://github.com/warmagedon007/toxiproxpy.git
Description-Content-Type: text/markdown

# Toxiproxpy - An opinionated library

This library is a replacement for the official `toxiproxy-python` library and has (in my opinion) a more friendly interface.

## the basics

```python
from toxiproxpy import ToxiProxy, Proxy
client = ToxiProxy("http://localhost:8474")

proxy = Proxy(name="test", listen="127.0.0.1:80", upstream="127.0.0.1:8474")
res: Proxy = client.add_proxy(proxy)

```

All methods happen through the client.

## context managing
Additional context managing was added. that initialize and destroy the toxin or proxy

```python
from toxiproxpy import ToxiProxy, Proxy
client = ToxiProxy("http://localhost:8474")

proxy = Proxy(name="test", listen="127.0.0.1:80", upstream="127.0.0.1:8474")
with client.proxy(proxy):
    ...
    
```