Skip to main content

Proxy6 API wrapper

Unofficial API wrapper for proxy6.net using pydantic

Installation

pip install proxy6net-api

Basic usage

Get your API token here

Create API wrapper instance

from proxy6net_api import Proxy6API

api = Proxy6API(auth_token='your_token')

Get balance

balance = api.get_balance()
f'{balance.balance=}, {balance.currency=}'

# balance.balance = 518.20, balance.currency='RUB'

Buy proxies

purchase = api.buy_proxies(count=3, days=5, country_code='ru', ipv='IPV6', protocol='http')
len(purchase.proxies)

# 3

Use proxy

import requests

proxy = api.get_proxies(state='active')[0]
response = requests.get('https://api64.ipify.org?format=json', proxies={'http': str(proxy), 'https': proxy.url})

assert response.json()['ip'] == proxy.ip

Other methods

help(Proxy6API)

Error handling

from proxy6net_api import Proxy6Exception

try:
    proxies = Proxy6API(auth_token='invalid token').get_proxies()
except Proxy6Exception as err:
    print(f'Error description: {err.description}. Error code: {err.code}')
    
    # Error description: Authorization error, wrong key. Error code: 100

Metadata

Release files for proxy6net-api 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for proxy6net-api 1.0.0
File Size Uploaded
proxy6net-api-1.0.0.tar.gz 9.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for proxy6net-api 1.0.0
File Interpreter ABI Platform
proxy6net_api-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.6 kB

Release files / proxy6net-api-1.0.0.tar.gz

Download URL proxy6net-api-1.0.0.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
fcb396ec77cf33b8bf58e943aaf16612eb0421e9e0bc7a242c08fb81ee04c7e6
BLAKE2b-256 checksum
How to use checksums
000a75a0527bc8d6f249d13af555c4b54136ae89b6f3bfcce42549e09f03f654
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.2

Release files / proxy6net_api-1.0.0-py3-none-any.whl

Download URL proxy6net_api-1.0.0-py3-none-any.whl
Size 8.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9318de3b6ad416753b43cde8cf73b0568e7ba72f9d09b3fa0e7c9b8d38b38b1a
BLAKE2b-256 checksum
How to use checksums
eeaaf64bf65f8bef823280a5109a0d1406fce4fd5785f13302a68914d55c1f07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.2

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page