https://github.com/abbas-bachari/proxa
A simple yet powerful Python library for managing and validating proxies.
https://github.com/abbas-bachari/proxa
proxy proxy-checker proxy-manager proxy-scraper proxy-telegram
Last synced: 2 months ago
JSON representation
A simple yet powerful Python library for managing and validating proxies.
- Host: GitHub
- URL: https://github.com/abbas-bachari/proxa
- Owner: abbas-bachari
- License: mit
- Created: 2025-08-13T00:17:08.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-08-29T10:20:45.000Z (6 months ago)
- Last Synced: 2025-09-29T03:27:21.586Z (5 months ago)
- Topics: proxy, proxy-checker, proxy-manager, proxy-scraper, proxy-telegram
- Language: Python
- Homepage:
- Size: 11.7 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Proxa
A simple yet powerful Python library for managing and validating proxies.
## ๐ ๏ธ Version 1.0.1
### ๐ Features
- โ
Easy proxy parsing from strings, dictionaries, or files
- ๐ Automatic proxy rotation
- ๐ Shuffle proxy list randomly
- ๐งช Built-in proxy checking with multiple IP lookup services
- ๐ฆ Ready-to-use formats for `requests`, `Telethon`, and more
- โก Lightweight and dependency-minimal
## ๐ฅ Installation
```bash
pip install proxa
```
---
## ๐ Quick Start
```python
from proxa import ProxyManager
# Initialize with a list of proxies
manager = ProxyManager([
"http://user:pass@127.0.0.1:8080",
"socks5://10.10.1.0:3128"
])
# Get the current proxy
proxy=manager.current
print(proxy.url)
# Rotate to the next proxy
proxy=manager.next()
print(proxy.url)
# Shuffle proxies to randomize order
manager.shuffle()
print("Proxies shuffled.")
# Check if proxy works and get IP info
status, ip_info, error = proxy.check()
if status:
print("Proxy is working. IP info:", ip_info)
else:
print("Proxy check failed. Error:", error)
# Check if a proxy works
working_proxy = manager.get_working_proxy()
if working_proxy:
print("Working proxy:", working_proxy.url)
```
## ๐ Usage Examples
### From a File
```python
manager = ProxyManager("proxies.txt")
```
### Add & Remove Proxies
```python
manager.add("http://new-proxy.com:8080")
manager.remove("http://user:pass@127.0.0.1:8080")
```
---
## ๐ License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
---
## ๐ Contribute
Contributions are welcome!
1. Fork the repo
2. Create your feature branch
3. Submit a pull request
---
Made with โค๏ธ by [Abbas Bachari](https://github.com/abbas-bachari)