SDK Libraries
Official ProxyHat SDK libraries let you integrate residential proxy management into your applications with just a few lines of code. Each SDK wraps the ProxyHat REST API in a convenient, idiomatic interface for your language of choice.
Available SDKs
We provide official SDKs for three languages. The Go SDK is published to its module registry; the Python and Node.js SDKs are currently pre-release and install directly from GitHub while we finish publishing them to PyPI and npm.
Python SDK
Manage proxies with a simple, Pythonic API. Supports Python 3.8+. Pre-release — installs from GitHub.
Node.js SDK
Full async/await support with TypeScript definitions. Supports Node.js 18+. Pre-release — installs from GitHub.
Go SDK
Idiomatic Go with context support and strong typing. Supports Go 1.21+.
Installation
Install the SDK for your language. The Go SDK resolves from the Go module registry; the Python and Node.js SDKs install straight from their GitHub repositories while they remain pre-release.
pip install proxyhat and npm install proxyhat will not work. Install from GitHub using the commands below — the import/require name is still proxyhat once installed. The Go SDK is fully published.
# Pre-release: install from GitHub
pip install "git+https://github.com/ProxyHatCom/python-sdk"
# Pre-release: install from GitHub
npm install ProxyHatCom/node-sdk
go get github.com/ProxyHatCom/go-sdk
Common Features
All SDKs share the same core feature set:
- Authentication — Simple API key setup
- Sub-User Management — Create, update, delete, and list proxy sub-users
- Group Management — Organize sub-users into groups
- Location Browsing — List available countries, regions, cities, and ISPs
- Proxy Presets — Save and reuse proxy configurations
- Analytics — Retrieve traffic usage and request statistics
- Error Handling — Typed exceptions/errors with clear messages
Source Code
All SDKs are open source and hosted on GitHub:
- ProxyHatCom/python-sdk — Python SDK (pre-release)
- ProxyHatCom/node-sdk — Node.js SDK (pre-release)
- ProxyHatCom/go-sdk — Go SDK
Authentication
All SDKs authenticate using your ProxyHat API key. You can create an API key from the dashboard or via the Authentication API.
from proxyhat import ProxyHat
client = ProxyHat(api_key="YOUR_API_KEY")
const { ProxyHat } = require("proxyhat");
const client = new ProxyHat({ apiKey: "YOUR_API_KEY" });
import "github.com/ProxyHatCom/go-sdk/proxyhat"
client := proxyhat.New("YOUR_API_KEY")
Quick Example
Here's a quick example showing how to list your sub-users using each SDK:
from proxyhat import ProxyHat
client = ProxyHat(api_key="YOUR_API_KEY")
# List all sub-users
sub_users = client.sub_users.list()
for user in sub_users:
print(f"{user.username}: {user.used_traffic} bytes used")
const { ProxyHat } = require("proxyhat");
const client = new ProxyHat({ apiKey: "YOUR_API_KEY" });
// List all sub-users
const subUsers = await client.subUsers.list();
for (const user of subUsers) {
console.log(`${user.username}: ${user.usedTraffic} bytes used`);
}
client := proxyhat.New("YOUR_API_KEY")
// List all sub-users
subUsers, err := client.SubUsers.List(context.Background())
if err != nil {
log.Fatal(err)
}
for _, user := range subUsers {
fmt.Printf("%s: %d bytes used\n", user.Username, user.UsedTraffic)
}