swiftshadow 1.2.1__tar.gz → 2.0.0__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- swiftshadow-2.0.0/.github/CODEOWNERS +1 -0
- swiftshadow-2.0.0/.github/workflows/pyfix.yml +57 -0
- swiftshadow-2.0.0/.github/workflows/python-publish-manual.yml +37 -0
- swiftshadow-2.0.0/.github/workflows/python-publish.yml +40 -0
- swiftshadow-2.0.0/.gitignore +142 -0
- swiftshadow-2.0.0/.python-version +1 -0
- swiftshadow-2.0.0/PKG-INFO +95 -0
- swiftshadow-2.0.0/README.md +83 -0
- swiftshadow-2.0.0/docs/404.html +935 -0
- swiftshadow-2.0.0/docs/API Reference/Classes/proxyInterface/index.html +2423 -0
- swiftshadow-2.0.0/docs/API Reference/Classes/quickProxy/index.html +1225 -0
- swiftshadow-2.0.0/docs/API Reference/Models/cache-data/index.html +1195 -0
- swiftshadow-2.0.0/docs/API Reference/Models/provider/index.html +1214 -0
- swiftshadow-2.0.0/docs/API Reference/Models/proxy/index.html +1419 -0
- swiftshadow-2.0.0/docs/Getting Started/Using-Proxy-Class/index.html +1080 -0
- swiftshadow-2.0.0/docs/Getting Started/Using-QuickProxy/index.html +1300 -0
- swiftshadow-2.0.0/docs/Getting Started/examples/index.html +1546 -0
- swiftshadow-2.0.0/docs/Use Swiftshadow with/AWS-Lambda/index.html +1091 -0
- swiftshadow-2.0.0/docs/Use Swiftshadow with/https/index.html +1187 -0
- swiftshadow-2.0.0/docs/Use Swiftshadow with/requests/index.html +1112 -0
- swiftshadow-2.0.0/docs/assets/_mkdocstrings.css +143 -0
- swiftshadow-2.0.0/docs/assets/images/favicon.png +0 -0
- swiftshadow-2.0.0/docs/assets/javascripts/bundle.60a45f97.min.js +16 -0
- swiftshadow-2.0.0/docs/assets/javascripts/bundle.60a45f97.min.js.map +7 -0
- swiftshadow-2.0.0/docs/assets/javascripts/lunr/min/lunr.ar.min.js +1 -0
- swiftshadow-2.0.0/docs/assets/javascripts/lunr/min/lunr.da.min.js +18 -0
- swiftshadow-2.0.0/docs/assets/javascripts/lunr/min/lunr.de.min.js +18 -0
- swiftshadow-2.0.0/docs/assets/javascripts/lunr/min/lunr.du.min.js +18 -0
- swiftshadow-2.0.0/docs/assets/javascripts/lunr/min/lunr.el.min.js +1 -0
- swiftshadow-2.0.0/docs/assets/javascripts/lunr/min/lunr.es.min.js +18 -0
- swiftshadow-2.0.0/docs/assets/javascripts/lunr/min/lunr.fi.min.js +18 -0
- swiftshadow-2.0.0/docs/assets/javascripts/lunr/min/lunr.fr.min.js +18 -0
- swiftshadow-2.0.0/docs/assets/javascripts/lunr/min/lunr.he.min.js +1 -0
- swiftshadow-2.0.0/docs/assets/javascripts/lunr/min/lunr.hi.min.js +1 -0
- swiftshadow-2.0.0/docs/assets/javascripts/lunr/min/lunr.hu.min.js +18 -0
- swiftshadow-2.0.0/docs/assets/javascripts/lunr/min/lunr.hy.min.js +1 -0
- swiftshadow-2.0.0/docs/assets/javascripts/lunr/min/lunr.it.min.js +18 -0
- swiftshadow-2.0.0/docs/assets/javascripts/lunr/min/lunr.ja.min.js +1 -0
- swiftshadow-2.0.0/docs/assets/javascripts/lunr/min/lunr.jp.min.js +1 -0
- swiftshadow-2.0.0/docs/assets/javascripts/lunr/min/lunr.kn.min.js +1 -0
- swiftshadow-2.0.0/docs/assets/javascripts/lunr/min/lunr.ko.min.js +1 -0
- swiftshadow-2.0.0/docs/assets/javascripts/lunr/min/lunr.multi.min.js +1 -0
- swiftshadow-2.0.0/docs/assets/javascripts/lunr/min/lunr.nl.min.js +18 -0
- swiftshadow-2.0.0/docs/assets/javascripts/lunr/min/lunr.no.min.js +18 -0
- swiftshadow-2.0.0/docs/assets/javascripts/lunr/min/lunr.pt.min.js +18 -0
- swiftshadow-2.0.0/docs/assets/javascripts/lunr/min/lunr.ro.min.js +18 -0
- swiftshadow-2.0.0/docs/assets/javascripts/lunr/min/lunr.ru.min.js +18 -0
- swiftshadow-2.0.0/docs/assets/javascripts/lunr/min/lunr.sa.min.js +1 -0
- swiftshadow-2.0.0/docs/assets/javascripts/lunr/min/lunr.stemmer.support.min.js +1 -0
- swiftshadow-2.0.0/docs/assets/javascripts/lunr/min/lunr.sv.min.js +18 -0
- swiftshadow-2.0.0/docs/assets/javascripts/lunr/min/lunr.ta.min.js +1 -0
- swiftshadow-2.0.0/docs/assets/javascripts/lunr/min/lunr.te.min.js +1 -0
- swiftshadow-2.0.0/docs/assets/javascripts/lunr/min/lunr.th.min.js +1 -0
- swiftshadow-2.0.0/docs/assets/javascripts/lunr/min/lunr.tr.min.js +18 -0
- swiftshadow-2.0.0/docs/assets/javascripts/lunr/min/lunr.vi.min.js +1 -0
- swiftshadow-2.0.0/docs/assets/javascripts/lunr/min/lunr.zh.min.js +1 -0
- swiftshadow-2.0.0/docs/assets/javascripts/lunr/tinyseg.js +206 -0
- swiftshadow-2.0.0/docs/assets/javascripts/lunr/wordcut.js +6708 -0
- swiftshadow-2.0.0/docs/assets/javascripts/workers/search.f8cc74c7.min.js +42 -0
- swiftshadow-2.0.0/docs/assets/javascripts/workers/search.f8cc74c7.min.js.map +7 -0
- swiftshadow-2.0.0/docs/assets/logo.png +0 -0
- swiftshadow-2.0.0/docs/assets/stylesheets/main.a40c8224.min.css +1 -0
- swiftshadow-2.0.0/docs/assets/stylesheets/main.a40c8224.min.css.map +1 -0
- swiftshadow-2.0.0/docs/assets/stylesheets/palette.06af60db.min.css +1 -0
- swiftshadow-2.0.0/docs/assets/stylesheets/palette.06af60db.min.css.map +1 -0
- swiftshadow-2.0.0/docs/index.html +1200 -0
- swiftshadow-2.0.0/docs/objects.inv +0 -0
- swiftshadow-2.0.0/docs/providers/index.html +1056 -0
- swiftshadow-2.0.0/docs/search/search_index.json +1 -0
- swiftshadow-2.0.0/docs/sitemap.xml +3 -0
- swiftshadow-2.0.0/docs/sitemap.xml.gz +0 -0
- swiftshadow-2.0.0/docs-src/API Reference/Classes/proxyInterface.md +2 -0
- swiftshadow-2.0.0/docs-src/API Reference/Classes/quickProxy.md +2 -0
- swiftshadow-2.0.0/docs-src/API Reference/Models/cache-data.md +2 -0
- swiftshadow-2.0.0/docs-src/API Reference/Models/provider.md +2 -0
- swiftshadow-2.0.0/docs-src/API Reference/Models/proxy.md +2 -0
- swiftshadow-2.0.0/docs-src/Getting Started/Using-Proxy-Class.md +86 -0
- swiftshadow-2.0.0/docs-src/Getting Started/Using-QuickProxy.md +37 -0
- swiftshadow-2.0.0/docs-src/Getting Started/examples.md +149 -0
- swiftshadow-2.0.0/docs-src/Use Swiftshadow with/AWS-Lambda.md +28 -0
- swiftshadow-2.0.0/docs-src/Use Swiftshadow with/https.md +54 -0
- swiftshadow-2.0.0/docs-src/Use Swiftshadow with/requests.md +31 -0
- swiftshadow-2.0.0/docs-src/assets/logo.png +0 -0
- swiftshadow-2.0.0/docs-src/index.md +63 -0
- swiftshadow-2.0.0/docs-src/providers.md +35 -0
- swiftshadow-2.0.0/mkdocs.yml +72 -0
- swiftshadow-2.0.0/pyproject.toml +32 -0
- swiftshadow-2.0.0/swiftshadow/__init__.py +30 -0
- swiftshadow-2.0.0/swiftshadow/cache.py +33 -0
- swiftshadow-2.0.0/swiftshadow/classes.py +213 -0
- swiftshadow-2.0.0/swiftshadow/exceptions.py +4 -0
- swiftshadow-2.0.0/swiftshadow/helpers.py +37 -0
- swiftshadow-2.0.0/swiftshadow/models.py +71 -0
- swiftshadow-2.0.0/swiftshadow/providers.py +162 -0
- swiftshadow-2.0.0/swiftshadow/types.py +50 -0
- swiftshadow-2.0.0/swiftshadow/validator.py +50 -0
- swiftshadow-2.0.0/tests/test_models.py +6 -0
- swiftshadow-2.0.0/tests/test_proxy.py +38 -0
- swiftshadow-2.0.0/tests/test_quickproxy.py +7 -0
- swiftshadow-2.0.0/tox.ini +26 -0
- swiftshadow-2.0.0/uv.lock +938 -0
- swiftshadow-1.2.1/PKG-INFO +0 -54
- swiftshadow-1.2.1/README.md +0 -42
- swiftshadow-1.2.1/setup.cfg +0 -4
- swiftshadow-1.2.1/swiftshadow/__init__.py +0 -25
- swiftshadow-1.2.1/swiftshadow/cache.py +0 -16
- swiftshadow-1.2.1/swiftshadow/classes.py +0 -145
- swiftshadow-1.2.1/swiftshadow/constants.py +0 -250
- swiftshadow-1.2.1/swiftshadow/helpers.py +0 -22
- swiftshadow-1.2.1/swiftshadow/providers.py +0 -72
- swiftshadow-1.2.1/swiftshadow.egg-info/PKG-INFO +0 -54
- swiftshadow-1.2.1/swiftshadow.egg-info/SOURCES.txt +0 -14
- swiftshadow-1.2.1/swiftshadow.egg-info/dependency_links.txt +0 -1
- swiftshadow-1.2.1/swiftshadow.egg-info/requires.txt +0 -1
- swiftshadow-1.2.1/swiftshadow.egg-info/top_level.txt +0 -1
- {swiftshadow-1.2.1 → swiftshadow-2.0.0}/LICENSE +0 -0
- {swiftshadow-1.2.1 → swiftshadow-2.0.0}/setup.py +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
* @sachin-sankar
|
@@ -0,0 +1,57 @@
|
|
1
|
+
name: Lint
|
2
|
+
|
3
|
+
on:
|
4
|
+
|
5
|
+
# Trigger the workflow on push or pull request,
|
6
|
+
|
7
|
+
# but only for the main branch
|
8
|
+
|
9
|
+
push:
|
10
|
+
|
11
|
+
branches:
|
12
|
+
|
13
|
+
- main
|
14
|
+
|
15
|
+
pull_request:
|
16
|
+
|
17
|
+
branches:
|
18
|
+
|
19
|
+
- main
|
20
|
+
|
21
|
+
jobs:
|
22
|
+
|
23
|
+
run-linters:
|
24
|
+
|
25
|
+
name: Run linters
|
26
|
+
|
27
|
+
runs-on: ubuntu-latest
|
28
|
+
|
29
|
+
steps:
|
30
|
+
|
31
|
+
- name: Check out Git repository
|
32
|
+
|
33
|
+
uses: actions/checkout@v2
|
34
|
+
|
35
|
+
- name: Set up Python
|
36
|
+
|
37
|
+
uses: actions/setup-python@v1
|
38
|
+
|
39
|
+
with:
|
40
|
+
|
41
|
+
python-version: 3.8
|
42
|
+
|
43
|
+
- name: Install Python dependencies
|
44
|
+
|
45
|
+
run: pip install black flake8
|
46
|
+
|
47
|
+
- name: Run linters
|
48
|
+
|
49
|
+
uses: wearerequired/lint-action@v2
|
50
|
+
|
51
|
+
with:
|
52
|
+
|
53
|
+
auto_fix: true
|
54
|
+
|
55
|
+
black: true
|
56
|
+
|
57
|
+
black_auto_fix: true
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# This workflow will upload a Python Package using Twine when a release is created
|
2
|
+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
|
3
|
+
|
4
|
+
# This workflow uses actions that are not certified by GitHub.
|
5
|
+
# They are provided by a third-party and are governed by
|
6
|
+
# separate terms of service, privacy policy, and support
|
7
|
+
# documentation.
|
8
|
+
|
9
|
+
name: Upload Python Package
|
10
|
+
|
11
|
+
on: workflow_dispatch
|
12
|
+
|
13
|
+
permissions:
|
14
|
+
contents: read
|
15
|
+
|
16
|
+
jobs:
|
17
|
+
deploy:
|
18
|
+
|
19
|
+
runs-on: ubuntu-latest
|
20
|
+
|
21
|
+
steps:
|
22
|
+
- uses: actions/checkout@v3
|
23
|
+
- name: Set up Python
|
24
|
+
uses: actions/setup-python@v3
|
25
|
+
with:
|
26
|
+
python-version: '3.x'
|
27
|
+
- name: Install dependencies
|
28
|
+
run: |
|
29
|
+
python -m pip install --upgrade pip
|
30
|
+
pip install build
|
31
|
+
- name: Build package
|
32
|
+
run: python -m build
|
33
|
+
- name: Publish package
|
34
|
+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
|
35
|
+
with:
|
36
|
+
user: __token__
|
37
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# This workflow will upload a Python Package using Twine when a release is created
|
2
|
+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
|
3
|
+
|
4
|
+
# This workflow uses actions that are not certified by GitHub.
|
5
|
+
# They are provided by a third-party and are governed by
|
6
|
+
# separate terms of service, privacy policy, and support
|
7
|
+
# documentation.
|
8
|
+
|
9
|
+
name: Upload Python Package
|
10
|
+
|
11
|
+
on:
|
12
|
+
|
13
|
+
release:
|
14
|
+
types: [published]
|
15
|
+
|
16
|
+
permissions:
|
17
|
+
contents: read
|
18
|
+
|
19
|
+
jobs:
|
20
|
+
deploy:
|
21
|
+
|
22
|
+
runs-on: ubuntu-latest
|
23
|
+
|
24
|
+
steps:
|
25
|
+
- uses: actions/checkout@v3
|
26
|
+
- name: Set up Python
|
27
|
+
uses: actions/setup-python@v3
|
28
|
+
with:
|
29
|
+
python-version: '3.x'
|
30
|
+
- name: Install dependencies
|
31
|
+
run: |
|
32
|
+
python -m pip install --upgrade pip
|
33
|
+
pip install build
|
34
|
+
- name: Build package
|
35
|
+
run: python -m build
|
36
|
+
- name: Publish package
|
37
|
+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
|
38
|
+
with:
|
39
|
+
user: __token__
|
40
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
@@ -0,0 +1,142 @@
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
2
|
+
__pycache__/
|
3
|
+
*.py[cod]
|
4
|
+
*$py.class
|
5
|
+
|
6
|
+
# C extensions
|
7
|
+
*.so
|
8
|
+
|
9
|
+
# Distribution / packaging
|
10
|
+
.Python
|
11
|
+
build/
|
12
|
+
develop-eggs/
|
13
|
+
dist/
|
14
|
+
downloads/
|
15
|
+
eggs/
|
16
|
+
.eggs/
|
17
|
+
lib/
|
18
|
+
lib64/
|
19
|
+
parts/
|
20
|
+
sdist/
|
21
|
+
var/
|
22
|
+
wheels/
|
23
|
+
share/python-wheels/
|
24
|
+
*.egg-info/
|
25
|
+
.installed.cfg
|
26
|
+
*.egg
|
27
|
+
MANIFEST
|
28
|
+
|
29
|
+
# PyInstaller
|
30
|
+
# Usually these files are written by a python script from a template
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
32
|
+
*.manifest
|
33
|
+
*.spec
|
34
|
+
|
35
|
+
# Installer logs
|
36
|
+
pip-log.txt
|
37
|
+
pip-delete-this-directory.txt
|
38
|
+
|
39
|
+
# Unit test / coverage reports
|
40
|
+
htmlcov/
|
41
|
+
.tox/
|
42
|
+
.nox/
|
43
|
+
.coverage
|
44
|
+
.coverage.*
|
45
|
+
.cache
|
46
|
+
nosetests.xml
|
47
|
+
coverage.xml
|
48
|
+
*.cover
|
49
|
+
*.py,cover
|
50
|
+
.hypothesis/
|
51
|
+
.pytest_cache/
|
52
|
+
cover/
|
53
|
+
|
54
|
+
# Translations
|
55
|
+
*.mo
|
56
|
+
*.pot
|
57
|
+
|
58
|
+
# Django stuff:
|
59
|
+
*.log
|
60
|
+
local_settings.py
|
61
|
+
db.sqlite3
|
62
|
+
db.sqlite3-journal
|
63
|
+
|
64
|
+
# Flask stuff:
|
65
|
+
instance/
|
66
|
+
.webassets-cache
|
67
|
+
|
68
|
+
# Scrapy stuff:
|
69
|
+
.scrapy
|
70
|
+
|
71
|
+
# Sphinx documentation
|
72
|
+
docs/_build/
|
73
|
+
|
74
|
+
# PyBuilder
|
75
|
+
.pybuilder/
|
76
|
+
target/
|
77
|
+
|
78
|
+
# Jupyter Notebook
|
79
|
+
.ipynb_checkpoints
|
80
|
+
|
81
|
+
# IPython
|
82
|
+
profile_default/
|
83
|
+
ipython_config.py
|
84
|
+
|
85
|
+
# pyenv
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
88
|
+
# .python-version
|
89
|
+
|
90
|
+
# pipenv
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
94
|
+
# install all needed dependencies.
|
95
|
+
#Pipfile.lock
|
96
|
+
|
97
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
98
|
+
__pypackages__/
|
99
|
+
|
100
|
+
# Celery stuff
|
101
|
+
celerybeat-schedule
|
102
|
+
celerybeat.pid
|
103
|
+
|
104
|
+
# SageMath parsed files
|
105
|
+
*.sage.py
|
106
|
+
|
107
|
+
# Environments
|
108
|
+
.env
|
109
|
+
.venv
|
110
|
+
env/
|
111
|
+
venv/
|
112
|
+
ENV/
|
113
|
+
env.bak/
|
114
|
+
venv.bak/
|
115
|
+
|
116
|
+
# Spyder project settings
|
117
|
+
.spyderproject
|
118
|
+
.spyproject
|
119
|
+
|
120
|
+
# Rope project settings
|
121
|
+
.ropeproject
|
122
|
+
|
123
|
+
# mkdocs documentation
|
124
|
+
/site
|
125
|
+
|
126
|
+
# mypy
|
127
|
+
.mypy_cache/
|
128
|
+
.dmypy.json
|
129
|
+
dmypy.json
|
130
|
+
|
131
|
+
# Pyre type checker
|
132
|
+
.pyre/
|
133
|
+
|
134
|
+
# pytype static type analyzer
|
135
|
+
.pytype/
|
136
|
+
|
137
|
+
# Cython debug symbols
|
138
|
+
cython_debug/
|
139
|
+
|
140
|
+
# End of https://mrkandreev.name/snippets/gitignore-generator/#Python
|
141
|
+
.swiftshadow.json
|
142
|
+
poetry.lock
|
@@ -0,0 +1 @@
|
|
1
|
+
3.12
|
@@ -0,0 +1,95 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: swiftshadow
|
3
|
+
Version: 2.0.0
|
4
|
+
Summary: Free IP Proxy rotator for python
|
5
|
+
Author-email: sachin-sankar <mail.sachinsankar@gmail.com>
|
6
|
+
License-File: LICENSE
|
7
|
+
Requires-Python: >=3.12
|
8
|
+
Requires-Dist: aiohttp>=3.11.11
|
9
|
+
Requires-Dist: appdirs>=1.4.4
|
10
|
+
Requires-Dist: requests>=2.32.3
|
11
|
+
Description-Content-Type: text/markdown
|
12
|
+
|
13
|
+
# Swiftshadow
|
14
|
+
|
15
|
+
![PyPI - Downloads](https://img.shields.io/pypi/dm/swiftshadow)
|
16
|
+
![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/sachin-sankar/swiftshadow?include_prereleases&style=flat)
|
17
|
+
|
18
|
+
> [!WARNING]
|
19
|
+
> **Heads up!** If you're using **versions 1.2.1 or below**, please note that **version 2.0.0 and above** includes breaking changes. Before upgrading, read the [documentation](https://sachin-sankar.github.io/swiftshadow/) to understand the changes and ensure compatibility with your code. If you encounter issues, please review the docs before opening a GitHub issue.
|
20
|
+
|
21
|
+
## About
|
22
|
+
|
23
|
+
**Swiftshadow** is a lightweight and efficient Python library designed to simplify IP proxy rotation for web scraping, data mining, and other automated tasks. It helps you bypass common challenges like IP bans, rate limits, and detection mechanisms, ensuring smooth and uninterrupted data collection.
|
24
|
+
|
25
|
+
### Key Features
|
26
|
+
- **Speed**: Optimized for fast proxy retrieval and rotation.
|
27
|
+
- **Reliability**: Automatically switches to working proxies if one fails.
|
28
|
+
- **Customization**: Configure proxy filters, rotation frequency, and caching behavior.
|
29
|
+
- **Low Dependencies**: Only one third-party dependency (`requests`), making it easy to use and maintain.
|
30
|
+
- **Caching**: Built-in caching mechanism to reduce load times and improve performance.
|
31
|
+
|
32
|
+
Whether you're a seasoned developer or a beginner, **Swiftshadow** makes proxy management effortless.
|
33
|
+
|
34
|
+
---
|
35
|
+
|
36
|
+
## Installation
|
37
|
+
|
38
|
+
Install the library using pip:
|
39
|
+
|
40
|
+
```bash
|
41
|
+
pip install swiftshadow
|
42
|
+
```
|
43
|
+
|
44
|
+
---
|
45
|
+
|
46
|
+
## Quick Start
|
47
|
+
|
48
|
+
### Get a Proxy in 2 Lines
|
49
|
+
Fetch a random proxy with just two lines of code:
|
50
|
+
|
51
|
+
```python
|
52
|
+
from swiftshadow import QuickProxy
|
53
|
+
|
54
|
+
print(QuickProxy()) # Output: http://<ip>:<port>
|
55
|
+
```
|
56
|
+
|
57
|
+
### Advanced Usage
|
58
|
+
For more control, use the `ProxyInterface` class:
|
59
|
+
|
60
|
+
```python
|
61
|
+
from swiftshadow.classes import ProxyInterface
|
62
|
+
|
63
|
+
# Fetch HTTPS proxies from the US
|
64
|
+
swift = ProxyInterface(countries=["US"], protocol="https")
|
65
|
+
print(swift.get().as_string()) # Output: https://<ip>:<port>
|
66
|
+
```
|
67
|
+
|
68
|
+
---
|
69
|
+
|
70
|
+
## Documentation
|
71
|
+
|
72
|
+
Explore the full documentation to learn more about **Swiftshadow**'s features and advanced usage:
|
73
|
+
|
74
|
+
📚 [Documentation](https://sachin-sankar.github.io/swiftshadow/)
|
75
|
+
|
76
|
+
---
|
77
|
+
|
78
|
+
## Why Swiftshadow?
|
79
|
+
|
80
|
+
- **Lightweight**: Minimal dependencies and easy to integrate.
|
81
|
+
- **Flexible**: Supports filtering by country and protocol.
|
82
|
+
- **Scalable**: Ideal for both small scripts and large-scale scraping projects.
|
83
|
+
- **Open Source**: Free to use, modify, and contribute to under the MIT License.
|
84
|
+
|
85
|
+
---
|
86
|
+
|
87
|
+
## Contributing
|
88
|
+
|
89
|
+
Contributions are welcome! If you'd like to improve **Swiftshadow**, feel free to open an issue or submit a pull request on [GitHub](https://github.com/sachin-sankar/swiftshadow).
|
90
|
+
|
91
|
+
---
|
92
|
+
|
93
|
+
## License
|
94
|
+
|
95
|
+
**Swiftshadow** is licensed under the MIT License. See the [LICENSE](https://github.com/sachin-sankar/swiftshadow/blob/main/LICENSE) file for details.
|
@@ -0,0 +1,83 @@
|
|
1
|
+
# Swiftshadow
|
2
|
+
|
3
|
+
![PyPI - Downloads](https://img.shields.io/pypi/dm/swiftshadow)
|
4
|
+
![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/sachin-sankar/swiftshadow?include_prereleases&style=flat)
|
5
|
+
|
6
|
+
> [!WARNING]
|
7
|
+
> **Heads up!** If you're using **versions 1.2.1 or below**, please note that **version 2.0.0 and above** includes breaking changes. Before upgrading, read the [documentation](https://sachin-sankar.github.io/swiftshadow/) to understand the changes and ensure compatibility with your code. If you encounter issues, please review the docs before opening a GitHub issue.
|
8
|
+
|
9
|
+
## About
|
10
|
+
|
11
|
+
**Swiftshadow** is a lightweight and efficient Python library designed to simplify IP proxy rotation for web scraping, data mining, and other automated tasks. It helps you bypass common challenges like IP bans, rate limits, and detection mechanisms, ensuring smooth and uninterrupted data collection.
|
12
|
+
|
13
|
+
### Key Features
|
14
|
+
- **Speed**: Optimized for fast proxy retrieval and rotation.
|
15
|
+
- **Reliability**: Automatically switches to working proxies if one fails.
|
16
|
+
- **Customization**: Configure proxy filters, rotation frequency, and caching behavior.
|
17
|
+
- **Low Dependencies**: Only one third-party dependency (`requests`), making it easy to use and maintain.
|
18
|
+
- **Caching**: Built-in caching mechanism to reduce load times and improve performance.
|
19
|
+
|
20
|
+
Whether you're a seasoned developer or a beginner, **Swiftshadow** makes proxy management effortless.
|
21
|
+
|
22
|
+
---
|
23
|
+
|
24
|
+
## Installation
|
25
|
+
|
26
|
+
Install the library using pip:
|
27
|
+
|
28
|
+
```bash
|
29
|
+
pip install swiftshadow
|
30
|
+
```
|
31
|
+
|
32
|
+
---
|
33
|
+
|
34
|
+
## Quick Start
|
35
|
+
|
36
|
+
### Get a Proxy in 2 Lines
|
37
|
+
Fetch a random proxy with just two lines of code:
|
38
|
+
|
39
|
+
```python
|
40
|
+
from swiftshadow import QuickProxy
|
41
|
+
|
42
|
+
print(QuickProxy()) # Output: http://<ip>:<port>
|
43
|
+
```
|
44
|
+
|
45
|
+
### Advanced Usage
|
46
|
+
For more control, use the `ProxyInterface` class:
|
47
|
+
|
48
|
+
```python
|
49
|
+
from swiftshadow.classes import ProxyInterface
|
50
|
+
|
51
|
+
# Fetch HTTPS proxies from the US
|
52
|
+
swift = ProxyInterface(countries=["US"], protocol="https")
|
53
|
+
print(swift.get().as_string()) # Output: https://<ip>:<port>
|
54
|
+
```
|
55
|
+
|
56
|
+
---
|
57
|
+
|
58
|
+
## Documentation
|
59
|
+
|
60
|
+
Explore the full documentation to learn more about **Swiftshadow**'s features and advanced usage:
|
61
|
+
|
62
|
+
📚 [Documentation](https://sachin-sankar.github.io/swiftshadow/)
|
63
|
+
|
64
|
+
---
|
65
|
+
|
66
|
+
## Why Swiftshadow?
|
67
|
+
|
68
|
+
- **Lightweight**: Minimal dependencies and easy to integrate.
|
69
|
+
- **Flexible**: Supports filtering by country and protocol.
|
70
|
+
- **Scalable**: Ideal for both small scripts and large-scale scraping projects.
|
71
|
+
- **Open Source**: Free to use, modify, and contribute to under the MIT License.
|
72
|
+
|
73
|
+
---
|
74
|
+
|
75
|
+
## Contributing
|
76
|
+
|
77
|
+
Contributions are welcome! If you'd like to improve **Swiftshadow**, feel free to open an issue or submit a pull request on [GitHub](https://github.com/sachin-sankar/swiftshadow).
|
78
|
+
|
79
|
+
---
|
80
|
+
|
81
|
+
## License
|
82
|
+
|
83
|
+
**Swiftshadow** is licensed under the MIT License. See the [LICENSE](https://github.com/sachin-sankar/swiftshadow/blob/main/LICENSE) file for details.
|