Python Wrapper for AnySolver
Unofficial API wrapper for the AnySolver service.
Requirements
- Python 3.12
Installation
pip install anysolver-api
or
uv add anysolver-api
Usage
from anysolver_api import AnySolver
solver = AnySolver("API_KEY")
balance = solver.getBalance()
print(f"Balance: ${balance}")
result = solver.solve(
{
"type": "TaskType",
"websiteKey": "KEY",
"websiteURL": "https://someurl.com/"
}
)['token']
For extra fields, use the documentation for the specific task on the AnySolver API.
You can also provide extra settings, e.g. for routing through specific models / auto route settings:
result = solver.solve(
task = {
"type": "TaskType",
"websiteKey": "KEY",
"websiteURL": "https://someurl.com/"
},
settings = {
"routing": { "mode": "autoCheapest" }
},
timeout = 120, # how long to wait for solution
delay = 5 # time between checks
)['token']
Error handling
All API errors raise one of the following:
from anysolver_api.exceptions import AnySolverExternalError, AnySolverInternalError, AnySolverTimeoutError
try:
result = solver.solve({...})
except AnySolverExternalError as e:
# invalid input, bad task, etc.
...
except AnySolverInternalError as e:
# error on AnySolver's side
...
except AnySolverTimeoutError as e:
# task didn't finish in time
...
Metadata
Release files for anysolver-api 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| anysolver_api-0.1.3.tar.gz | 2.2 kB | With provenance | Details for anysolver_api-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| anysolver_api-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for anysolver_api-0.1.3-py3-none-any.whl |
Total release size: 5.0 kB
Release files / anysolver_api-0.1.3.tar.gz
| Download URL | anysolver_api-0.1.3.tar.gz |
|---|---|
| Size | 2.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7ecf34f3721bdf54299ae35e6bcba7e150248f6a1fbac40317c901279f5b12fa
|
|
BLAKE2b-256 checksum How to use checksums |
72482f5099211b587354724f45c6cbbcf8ceeb2d16c93bd60728a720ec13838a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 5, 2026.
Transparency logRelease files / anysolver_api-0.1.3-py3-none-any.whl
| Download URL | anysolver_api-0.1.3-py3-none-any.whl |
|---|---|
| Size | 2.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6f15c55a30664674bb4e63424e220877400f85293c3e7d2e444eeb0d0262667b
|
|
BLAKE2b-256 checksum How to use checksums |
0bf552296206b35d4d943fa09b4397d8ed49677d15541843ae1aa873f77bf820
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 5, 2026.
Transparency logSecurity for anysolver-api 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for anysolver_api-0.1.3.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 5, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.