|
1 | 1 | Metadata-Version: 2.2 |
2 | 2 | Name: bypasstools |
3 | | -Version: 1.0.0 |
| 3 | +Version: 1.0.1 |
4 | 4 | Summary: Official Python SDK for the BypassTools API |
| 5 | +Author-email: BypassTools <support@bypass.tools> |
5 | 6 | License: MIT |
6 | 7 | Project-URL: Homepage, https://bypass.tools |
7 | 8 | Project-URL: Repository, https://github.com/XxEASTRxX/bypasstools-sdks-python.git |
8 | 9 | Keywords: bypasstools,bypass,linkvertise,api |
| 10 | +Classifier: Programming Language :: Python :: 3 |
| 11 | +Classifier: License :: OSI Approved :: MIT License |
| 12 | +Classifier: Operating System :: OS Independent |
9 | 13 | Requires-Python: >=3.8 |
10 | 14 | Description-Content-Type: text/markdown |
| 15 | + |
| 16 | +# bypasstools |
| 17 | + |
| 18 | +Official Python SDK for the [BypassTools](https://bypass.tools) API. |
| 19 | + |
| 20 | +## Installation |
| 21 | + |
| 22 | +```bash |
| 23 | +pip install bypasstools |
| 24 | +``` |
| 25 | + |
| 26 | +## Quick Start |
| 27 | + |
| 28 | +```python |
| 29 | +from bypasstools import BypassTools |
| 30 | + |
| 31 | +client = BypassTools(api_key="bt_your_key_here") |
| 32 | + |
| 33 | +# Direct (synchronous) bypass |
| 34 | +result = client.bypass("https://linkvertise.com/example") |
| 35 | +print(result.result_url) |
| 36 | + |
| 37 | +# Async task — create and poll until done |
| 38 | +result = client.bypass_async("https://loot.link/example") |
| 39 | +print(result.result_url) |
| 40 | +``` |
| 41 | + |
| 42 | +## Authentication |
| 43 | + |
| 44 | +Get your API key from your [dashboard](https://bypass.tools/dashboard/keys). |
| 45 | + |
| 46 | +## Methods |
| 47 | + |
| 48 | +### `bypass(url, *, refresh=False) -> BypassResult` |
| 49 | +Calls the direct bypass endpoint and blocks until a result is returned. |
| 50 | + |
| 51 | +### `create_task(url) -> str` |
| 52 | +Creates an async task and returns the `taskId`. |
| 53 | + |
| 54 | +### `get_task_result(task_id) -> TaskResult` |
| 55 | +Polls a single task for its current status. |
| 56 | + |
| 57 | +### `bypass_async(url, *, poll_interval=1.5, timeout=90) -> BypassResult` |
| 58 | +Creates a task and polls until it completes or times out. |
| 59 | + |
| 60 | +## Async Usage |
| 61 | + |
| 62 | +Requires `aiohttp`: |
| 63 | + |
| 64 | +```bash |
| 65 | +pip install bypasstools aiohttp |
| 66 | +``` |
| 67 | + |
| 68 | +```python |
| 69 | +import asyncio |
| 70 | +from bypasstools import AsyncBypassTools |
| 71 | + |
| 72 | +async def main(): |
| 73 | + client = AsyncBypassTools(api_key="bt_your_key_here") |
| 74 | + result = await client.bypass("https://linkvertise.com/example") |
| 75 | + print(result.result_url) |
| 76 | + |
| 77 | +asyncio.run(main()) |
| 78 | +``` |
| 79 | + |
| 80 | +## Error Handling |
| 81 | + |
| 82 | +```python |
| 83 | +from bypasstools import BypassTools, BypassToolsError |
| 84 | + |
| 85 | +client = BypassTools(api_key="bt_your_key_here") |
| 86 | + |
| 87 | +try: |
| 88 | + result = client.bypass("https://linkvertise.com/example") |
| 89 | +except BypassToolsError as e: |
| 90 | + print(e.code) # e.g. "QUOTA_EXCEEDED" |
| 91 | + print(e.status) # HTTP status code |
| 92 | + print(str(e)) # error message |
| 93 | +``` |
| 94 | + |
| 95 | +## License |
| 96 | + |
| 97 | +MIT |
0 commit comments