HTTP proxy library for Python using CroxyProxy infrastructure
Project description
proxly
HTTP proxy library for Python using CroxyProxy infrastructure.
Installation
pip install proxly
Usage
import proxly
# Simple usage
response = proxly.get("https://example.com")
print(response.text)
# Session-based
proxy = proxly.proxly()
response = proxy.get("https://example.com/api")
proxy.close()
# Context manager
with proxly.proxly() as proxy:
response = proxy.get("https://example.com")
# Get available servers
servers = proxly.get_server_list()
print(f"Available servers: {len(servers)}")
API
proxly Class
proxly(timeout=30, max_retries=3)
Methods:
get(url, **kwargs)post(url, **kwargs)put(url, **kwargs)delete(url, **kwargs)head(url, **kwargs)patch(url, **kwargs)get_session_info()close()
Convenience Functions
proxly.get(url, **kwargs)
proxly.post(url, **kwargs)
proxly.put(url, **kwargs)
proxly.delete(url, **kwargs)
proxly.head(url, **kwargs)
proxly.patch(url, **kwargs)
Server Management
proxly.get_server_list() # Get list of available proxy servers
proxly.clear_server_cache() # Clear cached server list
Error Handling
try:
response = proxly.get("https://example.com")
except proxly.ProxyError as e:
print(f"Proxy error: {e}")
Requirements
- Python 3.9+
- curl-cffi
License
GNU General Public License v3.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
proxly-0.1.4.tar.gz
(16.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
proxly-0.1.4-py3-none-any.whl
(16.3 kB
view details)
File details
Details for the file proxly-0.1.4.tar.gz.
File metadata
- Download URL: proxly-0.1.4.tar.gz
- Upload date:
- Size: 16.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d12c1f5ceaf455e745b3d6752f1381dd68177c3b9e439184ffd5e2f29575838
|
|
| MD5 |
6cab9ad8129e3b4c07fb35958c7a5e86
|
|
| BLAKE2b-256 |
25097441035eb7fef7520703eec96fbc306834f8b291c76f5e5feb77e0c116fa
|
File details
Details for the file proxly-0.1.4-py3-none-any.whl.
File metadata
- Download URL: proxly-0.1.4-py3-none-any.whl
- Upload date:
- Size: 16.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba6b2421aa37ac3779c4e582f5fd146e55aba8f9c59316a0e80a7c5aebd6d150
|
|
| MD5 |
b70e49246670e84fb3b7084010faefe7
|
|
| BLAKE2b-256 |
b40e7332e48a97128482b5afe3056e256acd0c50ecbdc6ad439a80dba9336102
|