MobileProxy.Space Python SDK
Official Python SDK for the MobileProxy.Space API — private mobile proxies on real GSM devices across 52 countries.
Features
- Full API coverage — all endpoints wrapped in typed, documented methods
- Context manager support (
with Client(...) as client:) - Typed exceptions —
ApiError,AuthenticationError,RateLimitError - IP rotation — dedicated
change_ip()with no rate limit - Python 3.8+ compatible
- Type hints throughout +
py.typedmarker (PEP 561)
Installation
pip install mobileproxy-sdk
Quick Start
from mobileproxy import Client
client = Client("YOUR_API_TOKEN")
# Check balance
balance = client.get_balance()
print(balance)
# List active proxies
proxies = client.get_my_proxy()
# Get current IP
ip = client.get_proxy_ip(12345)
# Rotate IP (no rate limit)
client.change_ip("your_proxy_key")
Context Manager
with Client("YOUR_API_TOKEN") as client:
balance = client.get_balance()
print(balance)
# session is closed automatically
API Methods
Proxy Information
| Method | Description |
|---|---|
get_proxy_ip(proxy_id, *, check_spam=) |
Get current IP address of a proxy |
get_my_proxy(proxy_id=) |
List active proxies (all or specific) |
get_ip_stats() |
IP address statistics by GEO |
Proxy Management
| Method | Description |
|---|---|
change_proxy_credentials(proxy_id, login, password) |
Change proxy login/password |
reboot_proxy(proxy_id) |
Restart the modem |
edit_proxy(proxy_id, *, reboot_time=, ip_auth=, comment=) |
Update proxy settings |
change_ip(proxy_key, *, format=, user_agent=) |
Rotate IP (no rate limit) |
Equipment & GEO
| Method | Description |
|---|---|
change_equipment(proxy_id, **kwargs) |
Switch modem/SIM/operator/city |
get_available_equipment(proxy_id, **kwargs) |
List available equipment by GEO |
get_geo_list(proxy_id, geo_id) |
Available GEOs for a proxy |
get_operators(geo_id) |
Operators for a GEO |
get_countries(only_available=) |
List of countries |
get_cities() |
List of cities |
Blacklist
| Method | Description |
|---|---|
get_black_list(proxy_id) |
Get equipment/operator blacklist |
add_operator_to_black_list(proxy_id, operator_id) |
Block an operator |
remove_operator_from_black_list(proxy_id, operator_id) |
Unblock an operator |
remove_from_black_list(proxy_id, black_list_id, eid) |
Remove equipment from blacklist |
Purchasing & Billing
| Method | Description |
|---|---|
buy_proxy(**kwargs) |
Purchase a proxy |
refund_proxy(proxy_id) |
Request a refund |
get_balance() |
Account balance |
get_prices(country_id) |
Prices for a country |
get_test_proxy(geo_id, operator) |
Get a free 2-hour trial proxy |
Utilities
| Method | Description |
|---|---|
check_equipment_availability(eid) |
Check if equipment is available |
view_url_from_different_ips(url, country_id) |
Anti-cloaking: view URL from another country |
get_task_result(task_id) |
Get async task result |
Error Handling
from mobileproxy import Client, ApiError, AuthenticationError, RateLimitError
client = Client("YOUR_API_TOKEN")
try:
client.get_balance()
except AuthenticationError as e:
# Invalid API token
print(e, e.http_code)
except RateLimitError as e:
# Too many requests — back off and retry
# Limit: 3 × (number of active proxies) requests/sec
print(e)
except ApiError as e:
print(e.http_code, e.response_body)
Configuration
client = Client(
"YOUR_API_TOKEN",
timeout=120, # request timeout in seconds
base_url="https://mobileproxy.space/api.html", # default
)
Rate Limits
API requests are limited to 3 × (number of active proxies) per second. For example, 10 proxies = 30 req/s. The change_ip() method uses a separate endpoint with no rate limit.
Requirements
- Python 3.8 or higher
requestslibrary (installed automatically)
Links
License
MIT — see LICENSE.
Metadata
Release files for mobileproxy-sdk 1.0.0
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 |
|---|---|---|---|---|
| mobileproxy_sdk-1.0.0.tar.gz | 11.3 kB | Without provenance | Details for mobileproxy_sdk-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mobileproxy_sdk-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for mobileproxy_sdk-1.0.0-py3-none-any.whl |
Total release size: 21.3 kB
Release files / mobileproxy_sdk-1.0.0.tar.gz
| Download URL | mobileproxy_sdk-1.0.0.tar.gz |
|---|---|
| Size | 11.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
691248dd08614a961d69f3835552e4d022d2f6402bc6d767c863497bc186c297
|
|
BLAKE2b-256 checksum How to use checksums |
0657f37111ce30d9c3ebb0112c78abe851cbfb7dd76b439e7ddf1b31f715a114
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.4
|
Release files / mobileproxy_sdk-1.0.0-py3-none-any.whl
| Download URL | mobileproxy_sdk-1.0.0-py3-none-any.whl |
|---|---|
| Size | 10.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
efa76e9470a0bbb5889a253a93815b70b131081012944e61116192b2a1d44c53
|
|
BLAKE2b-256 checksum How to use checksums |
edb1ae364e3189a86149068237db019e5501b148a1d8a2ba65b503cab8956034
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.4
|
Security for mobileproxy-sdk 1.0.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.