Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
28cb974
rename http.py to client.py due to causing No Module Found error for …
SgtMarmite Jan 19, 2023
9913dfd
httpx initial implementation
SgtMarmite Jan 20, 2023
1429b68
methods update, post, patch, delete
SgtMarmite Mar 7, 2023
162833d
update methods
SgtMarmite Mar 16, 2023
8d4a9ac
httpx updates
SgtMarmite Apr 21, 2023
00546a9
add raw methods
SgtMarmite Apr 21, 2023
7006391
update client reference
SgtMarmite Apr 21, 2023
c0e2bba
cleanup, readme update
SgtMarmite May 23, 2023
e98f81b
move examples to separate folder
SgtMarmite May 23, 2023
2065246
add new tests
SgtMarmite May 24, 2023
3310379
update tests
SgtMarmite May 24, 2023
7dcdd61
finalize tests
SgtMarmite May 25, 2023
35033cc
add Storage API example to docs
SgtMarmite May 25, 2023
7406d34
update backoff calculation
SgtMarmite May 25, 2023
c294a6a
remove unused imports/installs
SgtMarmite May 25, 2023
8033dc9
remove more unused imports/installs
SgtMarmite May 25, 2023
5c29ef2
add update_auth_header method + tests
SgtMarmite May 26, 2023
3c54755
Update async_storage_client.py
SgtMarmite May 31, 2023
fedba9c
add correct typehints
SgtMarmite May 31, 2023
b387e31
enable rate limiting using aiolimiter
SgtMarmite Jun 1, 2023
56bb576
add process_multiple method and example
SgtMarmite Jun 2, 2023
865a711
refactor retry strategy
SgtMarmite Jun 14, 2023
7270fa1
fix tests
SgtMarmite Sep 7, 2023
677b0f5
add workaround to disable INFO msgs coming from httpx library
SgtMarmite Oct 27, 2023
f8f4d96
add retry warning message
SgtMarmite Oct 28, 2023
1ccea91
reduce debug messages
SgtMarmite Oct 30, 2023
2acc6bc
remove debug param
SgtMarmite Oct 30, 2023
e269ddf
revert logging setup
SgtMarmite Oct 30, 2023
90edc2a
silence httpcore debug messages
SgtMarmite Oct 30, 2023
782f4d5
reenable debug
Jul 29, 2024
c663646
Update async_client.py
Jul 29, 2024
91f5233
Update async_client.py
Jul 29, 2024
4f1b061
bump httpx version
Jul 29, 2024
cfe3c9b
make max_requests per second float
Sep 12, 2024
6ec6c37
added detailed exception message
kudj Nov 7, 2024
6c59f8a
added detailed exception message
kudj Nov 7, 2024
9822f40
switch to python 3.12
kudj Nov 7, 2024
ff214ab
flake8
kudj Nov 7, 2024
219f0f8
fix message
kudj Dec 17, 2024
b987663
resolve conflicts
kudj Dec 17, 2024
84531f3
HTTPError has no attribute response
soustruh Jan 14, 2025
bb2987b
retry on httpx.HTTPError, httpx.ReadError, httpx.ConnectError, httpx.…
kudj Mar 10, 2025
e561c69
test
kudj Mar 10, 2025
3883c6a
Merge pull request #13 from keboola/feature/async-retry
kudj Sep 25, 2025
e750fe2
simplified according to our actual needs
soustruh Oct 1, 2025
801455c
minor wording changes
soustruh Oct 1, 2025
fa16877
ruff formatting in code excerpts 🐶
soustruh Oct 1, 2025
6bd3c27
filename typo ⚡️
soustruh Oct 1, 2025
5babc62
removed deprecated type annotations (from typing import …) + ruff 🐶
soustruh Oct 1, 2025
c76a3c8
fixed import (bye noqa) 👷‍♂️
soustruh Oct 1, 2025
251e64b
misleading variable name
soustruh Oct 1, 2025
5c09119
consistent headings
soustruh Oct 2, 2025
8d8e2f9
flake8.cfg consistent with cookiecutter template + minor formatting f…
soustruh Oct 2, 2025
841709f
uv 💜
soustruh Oct 2, 2025
e15824c
from __future__ import annotations for legacy Python versions
soustruh Oct 2, 2025
ca4c9b7
use the latest actions versions
soustruh Oct 2, 2025
ac4fb60
Merge branch 'main' of github.com:keboola/python-http-client into fea…
soustruh Oct 3, 2025
f9db5cf
version replacement in CI
soustruh Oct 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 34 additions & 20 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build & Upload Python Package to PYPI production
name: Build & Upload Python Package to PyPI

on:
release:
Expand All @@ -10,28 +10,42 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
- name: Checkout 🛒
uses: actions/checkout@v5

- name: Install uv 💜
uses: astral-sh/setup-uv@v6

- name: Install and run ruff 🐶
uses: astral-sh/ruff-action@v3

- name: Set up Python 🐍
uses: actions/setup-python@v6
with:
python-version: '3.7'
- name: Install dependencies
python-version: "3.13"

- name: Install dependencies 📦
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install flake8 pytest
pip install -r requirements.txt
- name: Lint with flake8
uv sync --all-groups --frozen

- name: Lint with flake8 ❄️
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 src/ --config=flake8.cfg
- name: Test with pytest
uv run flake8 --config flake8.cfg

- name: Test with pytest ✅
run: |
uv run pytest tests

- name: Version replacement based on tag ↔️
if: github.ref_type == 'tag'
run: |
pytest tests
- name: Build and publish
TAG_VERSION=${GITHUB_REF#refs/tags/}
echo "Tag version: $TAG_VERSION"
uv version $TAG_VERSION

- name: Build and publish 🚀
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
UV_PUBLISH_TOKEN: ${{ secrets.UV_PUBLISH_TOKEN_PYPI }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
uv build
uv publish
55 changes: 34 additions & 21 deletions .github/workflows/deploy_to_test.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,51 @@
name: Build & Deploy Python Package To Test PYPI
name: Build & Upload Python Package To Test PyPI

on:
create:
tags:
- 0.*a
- 1.*a


jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
- name: Checkout 🛒
uses: actions/checkout@v5

- name: Install uv 💜
uses: astral-sh/setup-uv@v6

- name: Install and run ruff 🐶
uses: astral-sh/ruff-action@v3

- name: Set up Python 🐍
uses: actions/setup-python@v6
with:
python-version: '3.7'
- name: Install dependencies
python-version: "3.13"

- name: Install dependencies 📦
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install flake8 pytest
pip install -r requirements.txt
- name: Lint with flake8
uv sync --all-groups --frozen

- name: Lint with flake8 ❄️
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 src/ --config=flake8.cfg
- name: Test with pytest
uv run flake8 --config flake8.cfg

- name: Test with pytest
run: |
pytest tests
- name: Build and publish
uv run pytest tests

- name: Version replacement based on tag ↔️
if: github.ref_type == 'tag'
run: |
TAG_VERSION=${GITHUB_REF#refs/tags/}
echo "Tag version: $TAG_VERSION"
uv version $TAG_VERSION

- name: Build and publish 🚀
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME_TEST }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD_TEST }}
UV_PUBLISH_TOKEN: ${{ secrets.UV_PUBLISH_TOKEN_TEST_PYPI }}
run: |
python setup.py sdist bdist_wheel
twine upload --repository testpypi dist/*
uv build
uv publish --index testpypi
42 changes: 28 additions & 14 deletions .github/workflows/push_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,41 @@ on: [ push ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.7 ]
python-version: [ 3.8, 3.13 ]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- name: Checkout 🛒
uses: actions/checkout@v5

- name: Install uv 💜
uses: astral-sh/setup-uv@v6

- name: Install and run ruff 🐶
uses: astral-sh/ruff-action@v3

- name: Set up Python ${{ matrix.python-version }} 🐍
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies

- name: Install dependencies 📦
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
pip install -r requirements.txt
- name: Lint with flake8
uv sync --all-groups --frozen

- name: Lint with flake8 ❄️
run: |
uv run flake8 --config flake8.cfg

- name: Test with pytest ✅
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 src/ --config=flake8.cfg
- name: Test with pytest
uv run pytest tests

- name: Version replacement based on tag ↔️
if: github.ref_type == 'tag'
run: |
pytest tests
TAG_VERSION=${GITHUB_REF#refs/tags/}
echo "Tag version: $TAG_VERSION"
uv version $TAG_VERSION
148 changes: 9 additions & 139 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,142 +1,12 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST


src/test.py


# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.DS_Store
.idea
.ruff_cache
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# VSCode
.vscode/

# IntelliJ
.idea/
.vscode
*.py[cod]
*.egg-info
venv

# MacOS files
.DS_Store
# kbc datafolder
data
Loading
Loading