Metadata-Version: 2.4
Name: py-socproof
Version: 0.1.2
Summary: Async Python client for Soc-proof API
Home-page: https://github.com/devakbarjon/py-socproof
Author: devakbarjon
Author-email: devakbarjon@gmail.com
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: aiohappyeyeballs==2.6.1
Requires-Dist: aiohttp==3.13.2
Requires-Dist: aiosignal==1.4.0
Requires-Dist: attrs==25.4.0
Requires-Dist: beautifulsoup4==4.14.2
Requires-Dist: frozenlist==1.8.0
Requires-Dist: idna==3.11
Requires-Dist: multidict==6.7.0
Requires-Dist: propcache==0.4.1
Requires-Dist: soupsieve==2.8
Requires-Dist: typing_extensions==4.15.0
Requires-Dist: yarl==1.22.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# py-socproof

Async Python client for the Partner API (https://soc-proof.su).  
Easily interact with services, orders, and statuses.

---

## Installation

```bash
pip install py-socproof
```

## Examples

You can find example scripts demonstrating how to use `soc-proof` in the [`examples`](examples/) folder.

## Language Support for Services
```
The API client supports fetching service details in multiple languages.

language="en" — English (default)

language="ru" — Russian 
```

## Features

*  Async requests with aiohttp

* Simple in-memory caching with TTL

* Fetch all services, get service by ID

* Create orders and check their status

* Automatically merges service descriptions

* Easy to use and extend

## Models

**Service**: Represents a service with all fields from the API (name, category, rate, min, max, dripfeed, refill, cancel, description, time, admin_cost)

**OrderStatus**: Represents an order’s current status, charge, and remaining quantity.

# Cache

* Cache stores services and descriptions in memory with optional TTL.

* You can force reload services if API data changes:

```python
services = await api.load_services(force_reload=True)
```

## Error Handling

```python
from py_partner_api import PartnerAPIAsync, HTTPRequestError, InvalidResponseError, APIError

try:
    services = await api.load_services()
except HTTPRequestError as e:
    print(f"HTTP error: {e}")
except APIError as e:
    print(f"API returned error: {e}")
except InvalidResponseError as e:
    print(f"Invalid response: {e}")
```
