# proxy-servant
proxy-servant is your best friend that will give you a working proxy every time you request it
## Why and For What?
Proxy-servant developed for a community from a part of that community
My main goal was to develop a package that would accept a set of proxy data,
send thousands http requests throught those proxies, and know which ones were alive
## Which proxies are supported?
* SOCKS5
* SOCKS4
* HTTP
## How to use?
### Load dataset
```
http://127.0.0.1
http://127.0.0.2
http://127.0.0.3
http://127.0.0.4
```
*dataset.txt*
```py
import proxy_servant
data = proxy_servant.FileDataSource("./proxies.csv")
```
### Instantiate checker
```py
pc = proxy_servant.BasicProxyChecker(data, "https://google.com", timeout=aiohttp.ClientTimeout(connect=8))
```
### Send requests
If you in async function
```py
check_result = await pc.check()
```
or
```
import asyncio
check_result = asyncio.run(pc.check())
```
Now you have list with result of proxy-checking
### Iterate over working proxy
```py
pp = proxy_servant.BasicProxyProvider(check_result) # filtering and saves only working proxies
pp.get_all()
# or
next(pp)
# or
for proxy in pp:
pass
```
To manage an infinite or finite loop, use the `remove_proxy_after_use` parameter in `BasicProxyProvider`
# Change log
## [1.0.0] - 2022-12-03
### Added
- Improved README
## [0.0.1] - 2022-11-04
### Added
- Initial version
Raw data
{
"_id": null,
"home_page": "https://github.com/FizzyShow/proxy_servant",
"name": "proxy-servant",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "Proxy,Proxy Checker,Proxy Servant,Servant,Python 3",
"author": "Dmitriy Popov",
"author_email": "dpopov@fizdm.ru",
"download_url": "https://files.pythonhosted.org/packages/21/60/1ce69ad4c0698a15b60ab881da5b4c889c29ad0dbd79482a7a7d1973c7a1/proxy-servant-1.0.0.tar.gz",
"platform": null,
"description": "# proxy-servant\nproxy-servant is your best friend that will give you a working proxy every time you request it\n\n## Why and For What?\nProxy-servant developed for a community from a part of that community\nMy main goal was to develop a package that would accept a set of proxy data, \nsend thousands http requests throught those proxies, and know which ones were alive\n\n## Which proxies are supported?\n* SOCKS5\n* SOCKS4\n* HTTP\n\n## How to use?\n### Load dataset\n\n```\nhttp://127.0.0.1\nhttp://127.0.0.2\nhttp://127.0.0.3\nhttp://127.0.0.4\n```\n*dataset.txt*\n\n```py\nimport proxy_servant\n\ndata = proxy_servant.FileDataSource(\"./proxies.csv\")\n```\n\n### Instantiate checker\n```py\npc = proxy_servant.BasicProxyChecker(data, \"https://google.com\", timeout=aiohttp.ClientTimeout(connect=8))\n```\n\n### Send requests\nIf you in async function\n```py\ncheck_result = await pc.check()\n```\nor\n```\nimport asyncio\ncheck_result = asyncio.run(pc.check())\n```\nNow you have list with result of proxy-checking\n\n### Iterate over working proxy\n```py\npp = proxy_servant.BasicProxyProvider(check_result) # filtering and saves only working proxies\npp.get_all()\n\n# or\n\nnext(pp)\n\n# or\n\nfor proxy in pp:\n pass\n```\n\nTo manage an infinite or finite loop, use the `remove_proxy_after_use` parameter in `BasicProxyProvider`\n\n\n# Change log\n\n\n## [1.0.0] - 2022-12-03\n\n### Added\n- Improved README\n\n\n## [0.0.1] - 2022-11-04\n\n### Added\n- Initial version\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "proxy-servant is your best friend that will give you a working proxy every time you request it",
"version": "1.0.0",
"split_keywords": [
"proxy",
"proxy checker",
"proxy servant",
"servant",
"python 3"
],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "887fc364339dc0e63a9a70486cca48a9",
"sha256": "57af3da707fed5ac303ab07e7006e37ada133463b4868e8c04b0e6199564f222"
},
"downloads": -1,
"filename": "proxy_servant-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "887fc364339dc0e63a9a70486cca48a9",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 9505,
"upload_time": "2022-12-03T17:08:50",
"upload_time_iso_8601": "2022-12-03T17:08:50.433190Z",
"url": "https://files.pythonhosted.org/packages/be/d1/1acc07c5849a6abe57c303293f439e2a844236ebac937323f766a215a6ce/proxy_servant-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "5c4bb55d7d51878093def72b8e84037a",
"sha256": "f4c41d09797eb55b44bdf69665949b5a80338fd225333fc3652c5a2fbb7448a7"
},
"downloads": -1,
"filename": "proxy-servant-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "5c4bb55d7d51878093def72b8e84037a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6566,
"upload_time": "2022-12-03T17:08:51",
"upload_time_iso_8601": "2022-12-03T17:08:51.990269Z",
"url": "https://files.pythonhosted.org/packages/21/60/1ce69ad4c0698a15b60ab881da5b4c889c29ad0dbd79482a7a7d1973c7a1/proxy-servant-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-12-03 17:08:51",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "FizzyShow",
"github_project": "proxy_servant",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "setuptools",
"specs": []
},
{
"name": "wheel",
"specs": []
},
{
"name": "aiohttp",
"specs": []
},
{
"name": "aiosocksy",
"specs": []
},
{
"name": "twine",
"specs": []
}
],
"lcname": "proxy-servant"
}