Skip to content

Commit 474f817

Browse files
authored
Merge pull request #1 from vlymar1/release/v0.1.0
Release v0.1.0 🚀
2 parents ecb8a4c + 86b2018 commit 474f817

31 files changed

Lines changed: 1992 additions & 9 deletions

.editorconfig

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

.github/workflows/ci.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

.github/workflows/coverage.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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 }}

.gitignore

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ share/python-wheels/
2424
*.egg-info/
2525
.installed.cfg
2626
*.egg
27-
MANIFEST
27+
MANIFEST.in
2828

2929
# PyInstaller
3030
# Usually these files are written by a python script from a template
@@ -85,7 +85,7 @@ ipython_config.py
8585
# pyenv
8686
# For a library or package, you might want to ignore these files since the code is
8787
# intended to run in multiple environments; otherwise, check them in:
88-
# .python-version
88+
.python-version
8989

9090
# pipenv
9191
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
@@ -105,7 +105,7 @@ ipython_config.py
105105
# This is especially recommended for binary packages to ensure reproducibility, and is more
106106
# commonly ignored for libraries.
107107
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108-
#poetry.lock
108+
poetry.lock
109109
#poetry.toml
110110

111111
# pdm
@@ -173,7 +173,7 @@ cython_debug/
173173
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
174174
# and can be added to the global gitignore or merged into this file. For a more nuclear
175175
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
176-
#.idea/
176+
.idea/
177177

178178
# Abstra
179179
# Abstra is an AI-powered process automation framework.
@@ -182,11 +182,11 @@ cython_debug/
182182
.abstra/
183183

184184
# Visual Studio Code
185-
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
185+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
186186
# 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,
187+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
188188
# you could uncomment the following to ignore the entire vscode folder
189-
# .vscode/
189+
.vscode/
190190

191191
# Ruff stuff:
192192
.ruff_cache/
@@ -205,3 +205,11 @@ cython_debug/
205205
marimo/_static/
206206
marimo/_lsp/
207207
__marimo__/
208+
209+
# MacOS
210+
.DS_Store/
211+
212+
dev/
213+
reports/
214+
215+
cookies*.pk

.pre-commit-config.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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]

CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Makefile

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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 commit comments

Comments
 (0)