Async Python client for Soc-proof API
Project description
py-socproof
Async Python client for the Partner API (https://soc-proof.su).
Easily interact with services, orders, and statuses.
Installation
pip install py-socproof
Examples
You can find example scripts demonstrating how to use soc-proof in the 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:
services = await api.load_services(force_reload=True)
Error Handling
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}")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py_socproof-1.0.1.tar.gz.
File metadata
- Download URL: py_socproof-1.0.1.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4be74279fd364cb546c4d5215e6b5c729b4c3fb0cc4e848635c73588cd8c9207
|
|
| MD5 |
2ada5244d1a59d720b9562ac13b693fb
|
|
| BLAKE2b-256 |
d0eeda568a7a82d029ebef689a1dd16a0ac3f7dc6bbce631956dc69ce6f1a9bd
|
File details
Details for the file py_socproof-1.0.1-py3-none-any.whl.
File metadata
- Download URL: py_socproof-1.0.1-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d30cc1c78cb932bbf13a28eb8153eadba726c309360ea74c53841f02276286b
|
|
| MD5 |
7b826a1ea091b480bb4995c45f14fdf6
|
|
| BLAKE2b-256 |
26dcacc20a22000502acc1d6a9f4c0ebd14044267be9eb798c53e7559cf28154
|