vinted-api-kit 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- vinted_api_kit-0.1.0/.editorconfig +22 -0
- vinted_api_kit-0.1.0/.github/workflows/ci.yaml +37 -0
- vinted_api_kit-0.1.0/.github/workflows/coverage.yaml +33 -0
- vinted_api_kit-0.1.0/.gitignore +215 -0
- vinted_api_kit-0.1.0/.pre-commit-config.yaml +21 -0
- vinted_api_kit-0.1.0/CHANGELOG.md +32 -0
- vinted_api_kit-0.1.0/LICENSE +21 -0
- vinted_api_kit-0.1.0/Makefile +47 -0
- vinted_api_kit-0.1.0/PKG-INFO +207 -0
- vinted_api_kit-0.1.0/README.md +175 -0
- vinted_api_kit-0.1.0/assets/logo.png +0 -0
- vinted_api_kit-0.1.0/pyproject.toml +116 -0
- vinted_api_kit-0.1.0/requiremensts-dev.txt +82 -0
- vinted_api_kit-0.1.0/tests/__init__.py +0 -0
- vinted_api_kit-0.1.0/tests/conftest.py +79 -0
- vinted_api_kit-0.1.0/tests/models/__init__.py +0 -0
- vinted_api_kit-0.1.0/tests/models/test_catalog_item.py +63 -0
- vinted_api_kit-0.1.0/tests/models/test_detailed_item.py +42 -0
- vinted_api_kit-0.1.0/tests/test_item_service.py +76 -0
- vinted_api_kit-0.1.0/tests/test_user_agents.py +12 -0
- vinted_api_kit-0.1.0/tests/test_vinted_api.py +43 -0
- vinted_api_kit-0.1.0/tests/test_vinted_http_client.py +166 -0
- vinted_api_kit-0.1.0/tox.ini +11 -0
- vinted_api_kit-0.1.0/vinted_api_kit/__init__.py +6 -0
- vinted_api_kit-0.1.0/vinted_api_kit/client/__init__.py +0 -0
- vinted_api_kit-0.1.0/vinted_api_kit/client/user_agents.py +25 -0
- vinted_api_kit-0.1.0/vinted_api_kit/client/vinted_http_client.py +353 -0
- vinted_api_kit-0.1.0/vinted_api_kit/models/__init__.py +4 -0
- vinted_api_kit-0.1.0/vinted_api_kit/models/catalog_item.py +102 -0
- vinted_api_kit-0.1.0/vinted_api_kit/models/detailed_item.py +140 -0
- vinted_api_kit-0.1.0/vinted_api_kit/services/__init__.py +0 -0
- vinted_api_kit-0.1.0/vinted_api_kit/services/item_service.py +230 -0
- vinted_api_kit-0.1.0/vinted_api_kit/utils.py +22 -0
- vinted_api_kit-0.1.0/vinted_api_kit/vinted_api.py +120 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
root = true
|
|
2
|
+
|
|
3
|
+
[**]
|
|
4
|
+
charset = utf-8
|
|
5
|
+
end_of_line = lf
|
|
6
|
+
indent_size = 4
|
|
7
|
+
indent_style = space
|
|
8
|
+
insert_final_newline = true
|
|
9
|
+
trim_trailing_whitespace = true
|
|
10
|
+
max_line_length = 99
|
|
11
|
+
|
|
12
|
+
[**.{yml,yaml,json,conf}]
|
|
13
|
+
indent_size = 2
|
|
14
|
+
|
|
15
|
+
[**.{md,txt,rst}]
|
|
16
|
+
trim_trailing_whitespace = false
|
|
17
|
+
|
|
18
|
+
[**.rst]
|
|
19
|
+
indent_size = 2
|
|
20
|
+
|
|
21
|
+
[Makefile]
|
|
22
|
+
indent_style = tab
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
lint-and-test:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
strategy:
|
|
11
|
+
matrix:
|
|
12
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
13
|
+
name: Lint, Type Check & Test (Python ${{ matrix.python-version }})
|
|
14
|
+
steps:
|
|
15
|
+
- name: Checkout code
|
|
16
|
+
uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- name: Set up Python
|
|
19
|
+
uses: actions/setup-python@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: ${{ matrix.python-version }}
|
|
22
|
+
|
|
23
|
+
- name: Install dependencies
|
|
24
|
+
run: |
|
|
25
|
+
python -m pip install --upgrade pip
|
|
26
|
+
pip install poetry
|
|
27
|
+
poetry config virtualenvs.create false
|
|
28
|
+
poetry install --no-interaction --no-ansi --no-root
|
|
29
|
+
|
|
30
|
+
- name: Run linting
|
|
31
|
+
run: poetry run ruff check . --output-format=github
|
|
32
|
+
|
|
33
|
+
- name: Run type check
|
|
34
|
+
run: poetry run mypy vinted_api_kit/
|
|
35
|
+
|
|
36
|
+
- name: Run tests (no coverage)
|
|
37
|
+
run: poetry run pytest -v --tb=short
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: Coverage
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
coverage:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- name: Checkout code
|
|
13
|
+
uses: actions/checkout@v4
|
|
14
|
+
|
|
15
|
+
- name: Set up Python
|
|
16
|
+
uses: actions/setup-python@v5
|
|
17
|
+
with:
|
|
18
|
+
python-version: "3.12"
|
|
19
|
+
|
|
20
|
+
- name: Install dependencies
|
|
21
|
+
run: |
|
|
22
|
+
python -m pip install --upgrade pip
|
|
23
|
+
pip install poetry
|
|
24
|
+
poetry config virtualenvs.create false
|
|
25
|
+
poetry install --no-interaction --no-ansi --no-root
|
|
26
|
+
|
|
27
|
+
- name: Run tests with coverage
|
|
28
|
+
run: poetry run pytest --cov=vinted_api_kit --cov-branch --cov-report=xml
|
|
29
|
+
|
|
30
|
+
- name: Upload results to Codecov
|
|
31
|
+
uses: codecov/codecov-action@v5
|
|
32
|
+
with:
|
|
33
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
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.in
|
|
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
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
#uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
poetry.lock
|
|
109
|
+
#poetry.toml
|
|
110
|
+
|
|
111
|
+
# pdm
|
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
113
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
114
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
115
|
+
#pdm.lock
|
|
116
|
+
#pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# pixi
|
|
121
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
122
|
+
#pixi.lock
|
|
123
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
124
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
125
|
+
.pixi
|
|
126
|
+
|
|
127
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
128
|
+
__pypackages__/
|
|
129
|
+
|
|
130
|
+
# Celery stuff
|
|
131
|
+
celerybeat-schedule
|
|
132
|
+
celerybeat.pid
|
|
133
|
+
|
|
134
|
+
# SageMath parsed files
|
|
135
|
+
*.sage.py
|
|
136
|
+
|
|
137
|
+
# Environments
|
|
138
|
+
.env
|
|
139
|
+
.envrc
|
|
140
|
+
.venv
|
|
141
|
+
env/
|
|
142
|
+
venv/
|
|
143
|
+
ENV/
|
|
144
|
+
env.bak/
|
|
145
|
+
venv.bak/
|
|
146
|
+
|
|
147
|
+
# Spyder project settings
|
|
148
|
+
.spyderproject
|
|
149
|
+
.spyproject
|
|
150
|
+
|
|
151
|
+
# Rope project settings
|
|
152
|
+
.ropeproject
|
|
153
|
+
|
|
154
|
+
# mkdocs documentation
|
|
155
|
+
/site
|
|
156
|
+
|
|
157
|
+
# mypy
|
|
158
|
+
.mypy_cache/
|
|
159
|
+
.dmypy.json
|
|
160
|
+
dmypy.json
|
|
161
|
+
|
|
162
|
+
# Pyre type checker
|
|
163
|
+
.pyre/
|
|
164
|
+
|
|
165
|
+
# pytype static type analyzer
|
|
166
|
+
.pytype/
|
|
167
|
+
|
|
168
|
+
# Cython debug symbols
|
|
169
|
+
cython_debug/
|
|
170
|
+
|
|
171
|
+
# PyCharm
|
|
172
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
173
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
174
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
175
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
176
|
+
.idea/
|
|
177
|
+
|
|
178
|
+
# Abstra
|
|
179
|
+
# Abstra is an AI-powered process automation framework.
|
|
180
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
181
|
+
# Learn more at https://abstra.io/docs
|
|
182
|
+
.abstra/
|
|
183
|
+
|
|
184
|
+
# Visual Studio Code
|
|
185
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
186
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
187
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
188
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
189
|
+
.vscode/
|
|
190
|
+
|
|
191
|
+
# Ruff stuff:
|
|
192
|
+
.ruff_cache/
|
|
193
|
+
|
|
194
|
+
# PyPI configuration file
|
|
195
|
+
.pypirc
|
|
196
|
+
|
|
197
|
+
# Cursor
|
|
198
|
+
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
|
|
199
|
+
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
|
|
200
|
+
# refer to https://docs.cursor.com/context/ignore-files
|
|
201
|
+
.cursorignore
|
|
202
|
+
.cursorindexingignore
|
|
203
|
+
|
|
204
|
+
# Marimo
|
|
205
|
+
marimo/_static/
|
|
206
|
+
marimo/_lsp/
|
|
207
|
+
__marimo__/
|
|
208
|
+
|
|
209
|
+
# MacOS
|
|
210
|
+
.DS_Store/
|
|
211
|
+
|
|
212
|
+
dev/
|
|
213
|
+
reports/
|
|
214
|
+
|
|
215
|
+
cookies*.pk
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
+
rev: v5.0.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: trailing-whitespace
|
|
6
|
+
- id: end-of-file-fixer
|
|
7
|
+
- id: check-yaml
|
|
8
|
+
- id: check-toml
|
|
9
|
+
- id: check-case-conflict
|
|
10
|
+
- id: detect-private-key
|
|
11
|
+
- id: check-added-large-files
|
|
12
|
+
args: [--maxkb=500]
|
|
13
|
+
|
|
14
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
15
|
+
rev: v0.12.5
|
|
16
|
+
hooks:
|
|
17
|
+
- id: ruff
|
|
18
|
+
args:
|
|
19
|
+
- --fix
|
|
20
|
+
- id: ruff-format
|
|
21
|
+
types: [python]
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- User profile retrieval functionality
|
|
12
|
+
- Support for fetching user's own items
|
|
13
|
+
- Enhanced error handling for network timeouts
|
|
14
|
+
|
|
15
|
+
## [0.1.0] - 2025-01-30
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
- Asynchronous HTTP client for Vinted API with cookie management
|
|
19
|
+
- `VintedApi.search_items()` method for item searching with filters
|
|
20
|
+
- `VintedApi.item_details()` method for detailed item information
|
|
21
|
+
- Support for multiple Vinted domains (fr, de, sk, pl, it, etc.)
|
|
22
|
+
- Proxy support for web scraping
|
|
23
|
+
- Automatic authentication and session handling
|
|
24
|
+
- Cookie persistence between requests
|
|
25
|
+
- JWT token expiration detection and refresh
|
|
26
|
+
- Comprehensive error handling with retry logic
|
|
27
|
+
- Full typing support and async/await patterns
|
|
28
|
+
- CI/CD pipeline with GitHub Actions
|
|
29
|
+
- 80%+ test coverage
|
|
30
|
+
|
|
31
|
+
[Unreleased]: https://github.com/vlymar-dev/vinted-api-kit/compare/v0.1.0...HEAD
|
|
32
|
+
[0.1.0]: https://github.com/vlymar-dev/vinted-api-kit/releases/tag/v0.1.0
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Volodymyr Lymar
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
package_dir := vinted_api_kit
|
|
2
|
+
tests_dir := tests
|
|
3
|
+
reports_dir := reports
|
|
4
|
+
|
|
5
|
+
# ===========
|
|
6
|
+
# Environment
|
|
7
|
+
# ===========
|
|
8
|
+
|
|
9
|
+
.PHONY: clean
|
|
10
|
+
clean:
|
|
11
|
+
rm -rf `find . -name __pycache__`
|
|
12
|
+
rm -f `find . -type f -name '*.py[co]' `
|
|
13
|
+
rm -f `find . -type f -name '*~' `
|
|
14
|
+
rm -f `find . -type f -name '.*~' `
|
|
15
|
+
rm -rf `find . -name .pytest_cache`
|
|
16
|
+
rm -rf *.egg-info
|
|
17
|
+
rm -f report.html
|
|
18
|
+
rm -f .coverage
|
|
19
|
+
rm -rf {build,dist,.cache,.mypy_cache,.ruff_cache,reports,.tox}
|
|
20
|
+
|
|
21
|
+
# ============
|
|
22
|
+
# Code quality
|
|
23
|
+
# ============
|
|
24
|
+
|
|
25
|
+
.PHONY: lint-check
|
|
26
|
+
lint-check:
|
|
27
|
+
ruff check $(package_dir)
|
|
28
|
+
mypy $(package_dir)
|
|
29
|
+
|
|
30
|
+
.PHONY: lint-reformat
|
|
31
|
+
lint-reformat:
|
|
32
|
+
ruff check --fix $(package_dir)
|
|
33
|
+
ruff format $(package_dir)
|
|
34
|
+
|
|
35
|
+
# ======
|
|
36
|
+
# Tests
|
|
37
|
+
# ======
|
|
38
|
+
.PHONY: test-coverage
|
|
39
|
+
test-coverage:
|
|
40
|
+
mkdir -p $(reports_dir)/tests/
|
|
41
|
+
pytest --cov=vinted_api_kit --cov-config .coveragerc --html=$(reports_dir)/tests/index.html tests/
|
|
42
|
+
coverage html -d $(reports_dir)/coverage
|
|
43
|
+
|
|
44
|
+
.PHONY: test-coverage-view
|
|
45
|
+
test-coverage-view:
|
|
46
|
+
coverage html -d $(reports_dir)/coverage
|
|
47
|
+
python -c "import webbrowser; webbrowser.open('file://$(shell pwd)/reports/coverage/index.html')"
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: vinted-api-kit
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Lightweight asynchronous Python client library for accessing Vinted API and scraping item data.
|
|
5
|
+
Project-URL: Homepage, https://github.com/vlymar-dev/vinted-api-kit
|
|
6
|
+
Project-URL: Documentation, https://github.com/vlymar-dev/vinted-api-kit
|
|
7
|
+
Project-URL: Repository, https://github.com/vlymar-dev/vinted-api-kit
|
|
8
|
+
Author-email: Lymar Volodymyr <volodymyr.lymar1@gmail.com>
|
|
9
|
+
Maintainer-email: Lymar Volodymyr <volodymyr.lymar1@gmail.com>
|
|
10
|
+
License: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: api,async,ecommerce,python,vinted,vinted-api,web-scraping
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Framework :: AsyncIO
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Intended Audience :: Information Technology
|
|
17
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
18
|
+
Classifier: Operating System :: OS Independent
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
24
|
+
Classifier: Topic :: Communications
|
|
25
|
+
Classifier: Topic :: Internet :: WWW/HTTP
|
|
26
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
27
|
+
Classifier: Topic :: Utilities
|
|
28
|
+
Classifier: Typing :: Typed
|
|
29
|
+
Requires-Python: >=3.10
|
|
30
|
+
Requires-Dist: curl-cffi<0.13.0,>=0.12.0
|
|
31
|
+
Description-Content-Type: text/markdown
|
|
32
|
+
|
|
33
|
+
<div align="center">
|
|
34
|
+
|
|
35
|
+

|
|
36
|
+
|
|
37
|
+
***Lightweight asynchronous Python client library for accessing Vinted API and scraping item data.***
|
|
38
|
+
|
|
39
|
+
[](LICENSE)
|
|
40
|
+
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
## ✨ Features
|
|
45
|
+
|
|
46
|
+
- 🚀 **Asynchronous** - Built with asyncio for high performance
|
|
47
|
+
- 🌍 **Multi-locale** - Supports multiple Vinted domains (FR, DE, US, etc.)
|
|
48
|
+
- 🔍 **Item Search** - Search catalog with filters and pagination
|
|
49
|
+
- 📦 **Item Details** - Get complete item information
|
|
50
|
+
- 🍪 **Cookie Persistence** - Automatic session management
|
|
51
|
+
- 🔐 **Proxy Support** - Built-in proxy configuration
|
|
52
|
+
- 📊 **Type Hints** - Full typing support for better IDE experience
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
## 📚 Table of Contents
|
|
56
|
+
|
|
57
|
+
- [Installation](#installation)
|
|
58
|
+
- [Quick Start](#quick-start)
|
|
59
|
+
- [Configuration](#configuration)
|
|
60
|
+
- [Development](#development)
|
|
61
|
+
- [Changelog](#changelog)
|
|
62
|
+
- [License](#license)
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
## Installation
|
|
66
|
+
|
|
67
|
+
Install via pip:
|
|
68
|
+
```bash
|
|
69
|
+
pip install vinted-api-kit
|
|
70
|
+
```
|
|
71
|
+
Or using poetry:
|
|
72
|
+
```bash
|
|
73
|
+
poetry add vinted-api-kit
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
## Quick Start
|
|
78
|
+
|
|
79
|
+
```python
|
|
80
|
+
import asyncio
|
|
81
|
+
from vinted_api_kit import VintedApi, CatalogItem, DetailedItem
|
|
82
|
+
|
|
83
|
+
async def main():
|
|
84
|
+
async with VintedApi(locale="fr") as vinted:
|
|
85
|
+
# Get detailed item information
|
|
86
|
+
item_detail: DetailedItem = await vinted.item_details(
|
|
87
|
+
url="https://www.vinted.fr/items/922704975-adidas-x-15"
|
|
88
|
+
)
|
|
89
|
+
print(f"📦 {item_detail.title}")
|
|
90
|
+
print(f"💰 {item_detail.price}\n")
|
|
91
|
+
|
|
92
|
+
# Search for items
|
|
93
|
+
items: list[CatalogItem] = await vinted.search_items(
|
|
94
|
+
url="https://www.vinted.fr/catalog?search_text=adidas",
|
|
95
|
+
per_page=5
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
print("🔍 Search results:")
|
|
99
|
+
for item in items:
|
|
100
|
+
print(f" • {item.title} - {item.price} {item.currency}")
|
|
101
|
+
|
|
102
|
+
if __name__ == "__main__":
|
|
103
|
+
asyncio.run(main())
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
## Configuration
|
|
108
|
+
|
|
109
|
+
### Basic usage
|
|
110
|
+
```python
|
|
111
|
+
from vinted_api_kit import VintedApi
|
|
112
|
+
|
|
113
|
+
async with VintedApi(locale="fr") as vinted:
|
|
114
|
+
pass
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Advanced configuration
|
|
118
|
+
```python
|
|
119
|
+
from vinted_api_kit import VintedApi
|
|
120
|
+
|
|
121
|
+
async with VintedApi(
|
|
122
|
+
locale="de",
|
|
123
|
+
proxies={"http": "http://proxy:8080"},
|
|
124
|
+
client_ip="192.168.1.1",
|
|
125
|
+
cookies_dir="./cookies",
|
|
126
|
+
persist_cookies=True
|
|
127
|
+
) as vinted:
|
|
128
|
+
pass
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
**Parameters:**
|
|
132
|
+
- `locale` - Vinted domain locale (`'fr'`, `'de'`, `'us'`, etc.)
|
|
133
|
+
- `proxies` - Proxy configuration (requests format)
|
|
134
|
+
- `client_ip` - Override client IP header
|
|
135
|
+
- `cookies_dir` - Directory for cookie storage
|
|
136
|
+
- `persist_cookies` - Enable/disable cookie persistence
|
|
137
|
+
|
|
138
|
+
These can be set when creating an instance of the `VintedApi` class.
|
|
139
|
+
|
|
140
|
+
No additional environment variables are required by default.
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
## 🛠️ Development
|
|
144
|
+
|
|
145
|
+
### Setup
|
|
146
|
+
```shell
|
|
147
|
+
git clone https://github.com/vlymar1/vinted-api-kit.git
|
|
148
|
+
cd vinted-api-kit
|
|
149
|
+
```
|
|
150
|
+
*Install dependencies (you'll need to set up your dev environment)*
|
|
151
|
+
### Testing
|
|
152
|
+
|
|
153
|
+
```shell
|
|
154
|
+
make test-coverage # run tests with coverage
|
|
155
|
+
make test-coverage-view # view coverage report in browser
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Code Quality
|
|
159
|
+
|
|
160
|
+
```shell
|
|
161
|
+
make lint-check # check code with ruff and mypy
|
|
162
|
+
make lint-reformat # format and fix code with ruff
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Cleanup
|
|
166
|
+
|
|
167
|
+
```shell
|
|
168
|
+
make clean # remove cache files and build artifacts
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
**Development Guidelines:**
|
|
172
|
+
- Follow PEP8 style guidelines
|
|
173
|
+
- Configure ruff in `pyproject.toml` for your preferred rules
|
|
174
|
+
- Set up pre-commit hooks for automatic linting
|
|
175
|
+
- Contributions welcome! Please open issues or pull requests
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
## Changelog
|
|
179
|
+
|
|
180
|
+
See [`CHANGELOG.md`](CHANGELOG.md) for the list of notable changes per version.
|
|
181
|
+
|
|
182
|
+
### How to create and maintain changelog?
|
|
183
|
+
|
|
184
|
+
- Start a `CHANGELOG.md` file at the root of your repo.
|
|
185
|
+
- Follow [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) format for consistent structure.
|
|
186
|
+
- For each release version, record:
|
|
187
|
+
- Added — new features
|
|
188
|
+
- Changed — updates/improvements
|
|
189
|
+
- Fixed — bug fixes
|
|
190
|
+
- Removed — deprecated or removed features
|
|
191
|
+
- Update changelog **before** tagging a new release (e.g., `v1.0.0`).
|
|
192
|
+
- Automate changelog generation optionally by tools such as:
|
|
193
|
+
- [github-changelog-generator](https://github.com/github-changelog-generator/github-changelog-generator)
|
|
194
|
+
- [auto-changelog](https://github.com/CookPete/auto-changelog)
|
|
195
|
+
- Conventional commits combined with [semantic-release](https://semantic-release.gitbook.io/semantic-release/)
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
## License
|
|
199
|
+
|
|
200
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
## Maintainers / Contacts
|
|
204
|
+
|
|
205
|
+
- GitHub: [https://github.com/vlymar1](https://github.com/vlymar1)
|
|
206
|
+
|
|
207
|
+
Feel free to open issues or contact for support and collaborations.
|