proxy-db
Manage free and private proxies on local db for Python Projects. Each proxy has a score according to how it works. Add a positive vote if the proxy works correctly and a negative vote if it does not work.
import requests
from requests.exceptions import Timeout, ConnectionError, ProxyError
from proxy_db.proxies import ProxiesList
proxy = next(ProxiesList())
try:
requests.get('http://site.com/', proxies=proxy)
except (Timeout, ConnectionError, ProxyError):
proxy.negative()
else:
proxy.positive()
Proxy-db will return the best proxies first (more positive votes). You can also filter by country:
from proxy_db.proxies import ProxiesList
spain_proxy = next(ProxiesList('es'))
# ...
You can also filter by provider:
from proxy_db.proxies import ProxiesList
proxy_nova_proxy = next(ProxiesList(provider='Proxy Nova'))
# ...
Free proxies providers included:
Proxy Nova
Nord VPN (requires PROXYDB_NORDVPN_USERNAME & PROXYDB_NORDVPN_PASSWORD env. variables).
For more information see the docs.
Install
If you have Pip installed on your system, you can use it to install the latest ProxyDB stable version:
$ pip3 install proxy-db
Python 2.7 & 3.4-3.7 are supported but Python 3.x is recommended. Use pip2 on install for Python2. More info in the documentation
Some providers do not have the correct country for proxies. To determine the correct country proxy-db can use geoip. To use this install the optional dependencies:
$ pip3 install proxy-db[geoip]
You also need a maxmind Geolite2 license (it’s free). To obtain the license, follow these steps:
In the menu on the left, navigate to Services > My License Key.
Click Generate new license key.
Sets the environment variable MAXMIND_LICENSE_KEY. To set it from Python:
import os os.environ['MAXMIND_LICENSE_KEY'] = '28xjifHSTxVq93xZ'
HTTPS & SOCKS5 proxies
To use socks5 proxies with requests you need to install socks support:
$ pip3 install proxy-db[socks]
To use HTTPS proxies with requests/urllib3 you need to install the latests urllib3 version from sources:
$ pip install https://github.com/urllib3/urllib3/archive/master.zip
Metadata
Release files for proxy-db 0.3.1
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 | |
|---|---|---|---|---|
| proxy-db-0.3.1.tar.gz | 314.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| proxy_db-0.3.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 336.0 kB
Release files / proxy-db-0.3.1.tar.gz
| Download URL | proxy-db-0.3.1.tar.gz |
|---|---|
| Size | 314.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
29c89fbcd0ac35930d62511a461d6380aa0f060a88f114ea07ecb783424daa98
|
|
BLAKE2b-256 checksum How to use checksums |
d8eff9d6bbd7f66651bbc5ca9d11a664385f2fef3b928745a531e72f9e50ef0c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.9
|
Release files / proxy_db-0.3.1-py2.py3-none-any.whl
| Download URL | proxy_db-0.3.1-py2.py3-none-any.whl |
|---|---|
| Size | 21.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
4e575c3353b744b8e02c6fe05dcee07e3cb58de1e2afad2292e9753256cd5634
|
|
BLAKE2b-256 checksum How to use checksums |
9707da27704fc82980b95ac0d489d75e2d2bb9020eb71c64f8ac981a858f6ae1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.9
|
Security for proxy-db 0.3.1
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.