# **solana-proxy**
[](https://t.me/bots_forge)
**A library for using *HTTP* and *SOCKS5* proxies with [`solana`](https://pypi.org/project/solana/) clients**
The library provides `Client` and `AsyncClient` classes, which override the initialization of the original classes. Apart from these two classes, the library does not offer any additional features, and in all other cases, the original `solana` library, included as part of the installation package, should be used.
```bash
pip install solana-proxy
```
**Depencies**: `solana, httpx, httpx-socks, proxystr`
## Simple usage
```python
from solana_proxy import Client
RPC_URL = 'https://api.mainnet-beta.solana.com'
client = Client(RPC_URL, proxy='login:password@ip:port') # or 'socks5://login:password@ip:port'
client.is_connected()
...
client.close()
```
`Client` and `AsyncClient` take proxy in any popular format because they use [`proxystr`](https://pypi.org/project/proxystr/) lib. Also they take a `Proxy` obj from that lib.
## Context manager
```python
import asyncio
from solana_proxy import Client, AsyncClient
RPC_URL = 'https://api.mainnet-beta.solana.com'
PROXY = 'login:password@ip:port' # or 'socks5://login:password@ip:port'
with Client(RPC_URL, proxy=PROXY) as client:
client.is_connected()
async def is_connected():
async with AsyncClient(RPC_URL, proxy=PROXY) as client:
return await client.is_connected()
```
## Support
Developed by `MrSmith06`: [telegram](https://t.me/Mr_Smith06) | [gtihub](https://github.com/MrSmith06)
If you find this project helpful, feel free to leave a tip!
- EVM address (metamask): `0x6201d7364F01772F8FbDce67A9900d505950aB99`
Raw data
{
"_id": null,
"home_page": "https://github.com/BotsForge/solana-proxy",
"name": "solana-proxy",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.8",
"maintainer_email": null,
"keywords": null,
"author": "MrSmith06",
"author_email": "sletars@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/67/1f/bfada8d0db3b108f7171e56eae19d9127da2cd0b7ffe2036544e9e624ee1/solana_proxy-0.1.1.tar.gz",
"platform": null,
"description": "# **solana-proxy**\n[](https://t.me/bots_forge)\n\n**A library for using *HTTP* and *SOCKS5* proxies with [`solana`](https://pypi.org/project/solana/) clients**\nThe library provides `Client` and `AsyncClient` classes, which override the initialization of the original classes. Apart from these two classes, the library does not offer any additional features, and in all other cases, the original `solana` library, included as part of the installation package, should be used.\n\n```bash\npip install solana-proxy\n```\n**Depencies**: `solana, httpx, httpx-socks, proxystr`\n\n## Simple usage\n```python\nfrom solana_proxy import Client\n\nRPC_URL = 'https://api.mainnet-beta.solana.com'\nclient = Client(RPC_URL, proxy='login:password@ip:port') # or 'socks5://login:password@ip:port'\nclient.is_connected()\n...\nclient.close()\n```\n`Client` and `AsyncClient` take proxy in any popular format because they use [`proxystr`](https://pypi.org/project/proxystr/) lib. Also they take a `Proxy` obj from that lib.\n## Context manager\n```python\nimport asyncio\nfrom solana_proxy import Client, AsyncClient\n\nRPC_URL = 'https://api.mainnet-beta.solana.com'\nPROXY = 'login:password@ip:port' # or 'socks5://login:password@ip:port'\n\nwith Client(RPC_URL, proxy=PROXY) as client:\n client.is_connected()\n\nasync def is_connected():\n async with AsyncClient(RPC_URL, proxy=PROXY) as client:\n return await client.is_connected()\n```\n\n## Support\nDeveloped by `MrSmith06`: [telegram](https://t.me/Mr_Smith06) | [gtihub](https://github.com/MrSmith06)\nIf you find this project helpful, feel free to leave a tip!\n- EVM address (metamask): `0x6201d7364F01772F8FbDce67A9900d505950aB99`",
"bugtrack_url": null,
"license": "MIT",
"summary": "A library for using HTTP and SOCKS5 proxies with solana clients",
"version": "0.1.1",
"project_urls": {
"Homepage": "https://github.com/BotsForge/solana-proxy",
"Repository": "https://github.com/BotsForge/solana-proxy"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d2868f7b76625246d6e13ac9c6d1d35da1b6707137fa51d765a69d2b2cd6c1d1",
"md5": "1b67bbff344098373a2deba4deabcc9b",
"sha256": "7617b9f5846136005fae9f92348cde91c6fd7744b9fad0f7e577c0703eec7971"
},
"downloads": -1,
"filename": "solana_proxy-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1b67bbff344098373a2deba4deabcc9b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8",
"size": 6934,
"upload_time": "2024-08-10T14:15:12",
"upload_time_iso_8601": "2024-08-10T14:15:12.663841Z",
"url": "https://files.pythonhosted.org/packages/d2/86/8f7b76625246d6e13ac9c6d1d35da1b6707137fa51d765a69d2b2cd6c1d1/solana_proxy-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "671fbfada8d0db3b108f7171e56eae19d9127da2cd0b7ffe2036544e9e624ee1",
"md5": "0c88123ab08fc6e78d79f7a889662385",
"sha256": "cf60e6a272faf6cb63ab41762f9811531731b3b4ec515d47fdbd736fab2fa669"
},
"downloads": -1,
"filename": "solana_proxy-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "0c88123ab08fc6e78d79f7a889662385",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8",
"size": 4361,
"upload_time": "2024-08-10T14:15:14",
"upload_time_iso_8601": "2024-08-10T14:15:14.059944Z",
"url": "https://files.pythonhosted.org/packages/67/1f/bfada8d0db3b108f7171e56eae19d9127da2cd0b7ffe2036544e9e624ee1/solana_proxy-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-10 14:15:14",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "BotsForge",
"github_project": "solana-proxy",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "solana-proxy"
}