Example: timeouts, retries and with_options

Đang mở Phù hợp với người mới
#4 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
92/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python

Hướng nghiên cứu

Đọc apidly/client.py, apidly/errors.py và các phần “Safe retries”, “Errors” và “Options” trong README để xác nhận các tùy chọn của client và cách sử dụng exception. Thêm ví dụ chỉ đọc có thể chạy được examples/08_timeouts_and_retries.py và một dòng trong examples/README.md; công việc hoàn tất khi python -m py_compile và ruff check chạy thành công.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

documentation good first issue help wanted

Context

Client(max_retries=2, timeout=60.0) and client.with_options(timeout=, max_retries=, idempotency_key=) are described in the README (Options, Safe retries) with no runnable example.

Acceptance criteria

  • examples/08_timeouts_and_retries.py: a client with a short timeout, catching ApidlyConnectionError; with_options used for one call with another timeout; a comment explaining when an idempotency_key makes a repeat safe. Read-only calls only.
  • A row in examples/README.md; python -m py_compile and ruff check pass.

Pointers

  • apidly/client.py, apidly/errors.py, README.md sections "Safe retries", "Errors" and "Options"

Not sure where to start, or want to claim it? Comment here first, or ask in Discussions. See CONTRIBUTING.md. Tests run offline and never call the real API.

Ngôn ngữ chính
Python
Star
1
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của apidly-ltd/apidly-python

Tất cả issue của apidly-ltd/apidly-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.