Request Forge

Getting Started

  • Installation
    • Requirements
    • Basic Installation
    • Optional Dependencies
      • Django Support
    • Development Installation
    • From Source
    • Verifying Installation
    • Upgrading
    • Uninstalling
  • Quick Start
    • Simple GET Request
    • POST Request with JSON
    • With Authentication
    • With Retry Logic
    • Using Context Manager
    • Error Handling
    • Next Steps
  • Configuration
    • Basic Configuration
    • Configuration Options
      • Base URL
      • Timeout
      • Headers
      • SSL Verification
      • Redirects
      • Connection Pooling
      • Retry Strategy
      • Authentication
        • Bearer Token
        • API Key
        • Token Manager
      • Logging
    • Complete Example
    • Immutability
    • Validation

User Guide

  • Basic Usage
    • Making Requests
      • GET Requests
      • POST Requests
      • PUT Requests
      • PATCH Requests
      • DELETE Requests
    • Working with Responses
      • Response Object
      • Status Checks
      • Parsing JSON
    • Request Configuration
      • Per-Request Configuration
      • Base URL Handling
    • Using HttpRequest Objects
    • Resource Management
      • Using Context Managers
      • Session Lifecycle
    • Best Practices
    • Common Patterns
      • Pagination
      • Batch Operations
      • Download Files
    • Next Steps
  • Authentication
    • Authentication Methods
      • Bearer Token
      • API Key Authentication
      • Basic Authentication
    • Token Manager
      • Overview
      • Basic Setup
    • Token Providers
      • Client Credentials Flow
      • Password Grant Flow
      • Custom Token Provider
    • Token Storage
      • In-Memory Storage
      • Django Cache Storage
      • Custom Storage
    • Multi-Step Authentication
      • Overview
      • Basic Pipeline
      • Advanced Pipeline
    • Authentication Retry
      • Simple Retry
      • Exponential Backoff
      • Custom Retry Logic
    • Path Exclusion
    • Complete Examples
      • OAuth2 with Django
      • Multi-Service Authentication
    • Best Practices
    • Next Steps
  • Retry Strategies
    • Overview
    • Available Strategies
    • No Retry Strategy
      • When to Use
    • Simple Retry Strategy
      • Timeline Example
      • Custom Retryable Exceptions
    • Exponential Backoff Strategy
      • Delay Calculation
      • Timeline Example
      • Retryable Status Codes
      • Retryable Exceptions
      • Why Use Jitter?
      • Configuration Examples
    • Circuit Breaker Strategy
      • States
      • Configuration
      • How It Works
      • When to Use
      • Checking Circuit State
    • Custom Retry Strategy
    • Combining Strategies
      • Request-Level vs. Auth-Level Retries
      • Retry Flow
    • Best Practices
    • Monitoring Retries
    • Testing Retry Logic
    • Common Patterns
      • Retry with Rate Limiting
      • Conditional Retry
    • Next Steps
  • Hooks
    • Overview
    • Hook Types
    • Execution Order
    • Built-in Hooks
      • Request Hooks
        • LoggingRequestHook
        • CorrelationIdHook
        • AuthorizationHook
      • Response Hooks
        • LoggingResponseHook
        • RateLimitResponseHook
      • Error Hooks
        • LoggingErrorHook
      • Built-in Logging Configuration
    • Custom Request Hooks
      • Basic Request Hook
      • Dynamic Headers Hook
      • Request Signing Hook
    • Custom Response Hooks
      • Metrics Hook
      • Response Caching Hook
      • Data Transformation Hook
    • Custom Error Hooks
      • Alerting Hook
      • Sentry Integration
      • Error Recovery Hook
    • Authentication Hooks
      • TokenAuthHook
      • ApiKeyAuthHook
      • BasicAuthHook
    • Hook Context
      • Accessing Request Context
      • Sharing Data Between Hooks
    • Hook Chaining
      • Multiple Hooks in Sequence
      • Conditional Hook Execution
    • Advanced Examples
      • Circuit Breaker Hook
      • Request/Response Timing
      • Request Deduplication
    • Best Practices
    • Next Steps
  • Error Handling
    • Exception Hierarchy
    • Base Exception
      • HttpClientException
    • Network Errors
      • TimeoutException
      • ConnectionException
      • SSLException
    • HTTP Status Errors
      • HttpStatusException
      • BadRequestException (400)
      • UnauthorizedException (401)
      • ForbiddenException (403)
      • NotFoundException (404)
      • ServerErrorException (5xx)
    • Retry Errors
      • MaxRetryException
    • Authentication Errors
      • AuthenticationException
      • TokenRefreshException
    • Parsing Errors
      • ResponseParseException
    • Error Handling Patterns
      • Specific to General
      • Retry Pattern
      • Fallback Pattern
      • Circuit Breaker Pattern
      • Context Managers
    • Logging Errors
      • Basic Logging
      • Structured Logging
      • Error Hooks
    • Error Monitoring
      • Sentry Integration
      • Datadog Integration
    • Best Practices
    • Testing Error Handling
      • Mock Exceptions
      • Mock HTTP Responses
    • Common Scenarios
      • API Rate Limiting
      • Partial Failures
      • Graceful Degradation
    • Next Steps
  • Concurrent Requests
    • Overview
    • Basic Usage
      • Simple Concurrent Requests
      • Fail-Fast Mode
    • Configuration
      • Worker Threads
      • Request Order
      • Sorting Results
    • Common Patterns
      • Batch API Calls
      • Parallel POST Requests
      • Mixed Request Types
      • Pagination with Concurrency
    • Error Handling
      • Collecting Errors
      • Partial Retry
      • Error Statistics
    • Performance Optimization
      • Connection Pooling
      • Batching Requests
      • Rate Limiting
    • Progress Tracking
      • Progress Bar
      • Custom Progress
    • Advanced Patterns
      • Request Prioritization
      • Request Deduplication
      • Dynamic Worker Adjustment
    • Testing
      • Mock Concurrent Requests
      • Test Error Scenarios
    • Best Practices
    • Next Steps
  • Advanced Usage
    • Custom Session Configuration
      • Using Shared Session
      • Session Cookies
    • Custom Request Adapters
      • Implementing Custom Transport
    • SSL/TLS Configuration
      • Custom SSL Context
      • Client Certificates
      • Custom CA Bundle
    • Proxy Configuration
      • HTTP/HTTPS Proxies
      • SOCKS Proxy
      • Proxy with Authentication
    • Request/Response Transformation
      • Custom Request Transformer
      • Custom Response Parser
    • Dynamic Configuration
      • Environment-Based Configuration
      • Feature Flags
    • Request Signing
      • HMAC Signing
      • AWS Signature V4
    • Response Caching
      • In-Memory Cache
      • Redis Cache
    • Request Batching
      • Batch Multiple Requests
    • GraphQL Support
      • GraphQL Client Wrapper
    • Streaming Responses
      • Download Large Files
      • Stream JSON Lines
    • Performance Monitoring
      • Request Timing Hook
      • Memory Usage Tracking
    • Distributed Tracing
      • OpenTelemetry Integration
      • Jaeger Integration
    • Next Steps

API Reference

  • Client API Reference
    • HttpClient
      • HttpClient
      • Properties
        • HttpClient.adapter
        • HttpClient.session
        • HttpClient.auth_hook
      • HTTP Methods
        • HttpClient.get()
        • HttpClient.post()
        • HttpClient.put()
        • HttpClient.patch()
        • HttpClient.delete()
      • Core Request Method
        • HttpClient.request()
      • Concurrent Requests
        • HttpClient.request_many()
      • Resource Management
        • HttpClient.close()
        • HttpClient.__enter__()
        • HttpClient.__exit__()
    • Factory Functions
      • create_client
        • create_client()
      • requestforge (Context Manager)
        • http_client()
    • Complete Example
    • See Also
  • Configuration API Reference
    • TokenData
      • TokenData
      • Attributes
        • TokenData.access_token
        • TokenData.token_type
        • TokenData.expires_at
        • TokenData.refresh_token
        • TokenData.scope
        • TokenData.extra
      • Properties
        • TokenData.is_expired
        • TokenData.authorization_header
      • Class Methods
        • TokenData.from_response()
    • HttpClientConfig
      • HttpClientConfig
      • Attributes
        • HttpClientConfig.base_url
        • HttpClientConfig.default_timeout
        • HttpClientConfig.default_headers
        • HttpClientConfig.verify_ssl
        • HttpClientConfig.allow_redirects
        • HttpClientConfig.max_redirects
        • HttpClientConfig.retry_strategy
        • HttpClientConfig.auth_hook
        • HttpClientConfig.request_hooks
        • HttpClientConfig.response_hooks
        • HttpClientConfig.error_hooks
        • HttpClientConfig.pool_connection
        • HttpClientConfig.pool_maxsize
      • Validation
    • HttpClientConfigBuilder
      • HttpClientConfigBuilder
      • Basic Configuration
        • with_base_url()
        • with_timeout()
        • with_verify_ssl()
        • with_redirects()
      • Headers Configuration
        • with_headers()
        • with_header()
        • with_bearer_token()
        • with_api_key()
      • Retry Configuration
        • with_retry_strategy()
        • with_retry()
      • Connection Pool Configuration
        • with_pool_connection()
        • with_pool_maxsize()
      • Authentication Configuration
        • with_auth_hook()
        • with_token_auth()
        • with_api_key_auth()
        • with_basic_auth()
      • Hooks Configuration
        • with_request_hook()
        • with_response_hook()
        • with_error_hook()
        • with_logging()
      • Building Configuration
        • build()
    • Complete Examples
      • Basic Configuration
      • Production Configuration
      • With Authentication
      • Custom Hooks
      • Environment-Specific Configuration
    • See Also
  • Models API Reference
    • HttpMethod
      • HttpMethod
        • HttpMethod.GET
        • HttpMethod.POST
        • HttpMethod.PUT
        • HttpMethod.PATCH
        • HttpMethod.DELETE
        • HttpMethod.HEAD
        • HttpMethod.OPTIONS
    • HttpRequest
      • HttpRequest
      • Attributes
        • HttpRequest.method
        • HttpRequest.url
        • HttpRequest.headers
        • HttpRequest.params
        • HttpRequest.data
        • HttpRequest.json_data
        • HttpRequest.files
        • HttpRequest.timeout
        • HttpRequest.auth
      • Methods
        • HttpRequest.with_headers()
        • HttpRequest.to_dict()
        • HttpRequest.to_curl()
      • Examples
    • HttpResponse
      • HttpResponse
      • Attributes
        • HttpResponse.status_code
        • HttpResponse.headers
        • HttpResponse.content
        • HttpResponse.elapsed_ms
        • HttpResponse.url
        • HttpResponse.request
        • HttpResponse.encoding
      • Properties
        • HttpResponse.text
        • HttpResponse.is_success
        • HttpResponse.is_client_error
        • HttpResponse.is_server_error
      • Methods
        • HttpResponse.json()
        • HttpResponse.json_or_none()
      • Examples
    • RequestContext
      • RequestContext
      • Attributes
        • RequestContext.request
        • RequestContext.attempt
        • RequestContext.max_retries
        • RequestContext.metadata
      • Properties
        • RequestContext.is_retry
      • Methods
        • RequestContext.increment_attempt()
      • Examples
    • FetchContext
      • FetchContext
      • Attributes
        • FetchContext.tokens
        • FetchContext.metadata
      • Methods
        • FetchContext.get_token()
        • FetchContext.get_token_value()
        • FetchContext.add_token()
        • FetchContext.has_token()
        • FetchContext.has_valid_token()
      • Examples
    • Complete Example
    • See Also
  • Retry Strategies API Reference
    • RetryStrategyInterface
      • RetryStrategyInterface
      • Methods
        • RetryStrategyInterface.should_retry()
        • RetryStrategyInterface.get_delay()
      • Properties
        • max_retries
    • NoRetryStrategy
      • NoRetryStrategy
    • SimpleRetryStrategy
      • SimpleRetryStrategy
      • Attributes
        • SimpleRetryStrategy.max_retries
      • Methods
        • SimpleRetryStrategy.should_retry()
        • SimpleRetryStrategy.get_delay()
      • Examples
    • ExponentialBackoffRetryStrategy
      • ExponentialBackoffRetryStrategy
      • Attributes
        • ExponentialBackoffRetryStrategy.max_retries
      • Methods
        • ExponentialBackoffRetryStrategy.should_retry()
        • ExponentialBackoffRetryStrategy.get_delay()
        • is_retryable_status()
        • is_max_retry()
      • Examples
    • CircuitBreakerRetryStrategy
      • CircuitBreakerRetryStrategy
      • States
      • Attributes
        • CircuitBreakerRetryStrategy.max_retries
        • CircuitBreakerRetryStrategy.state
      • Methods
        • CircuitBreakerRetryStrategy.should_retry()
        • CircuitBreakerRetryStrategy.get_delay()
        • record_success()
        • reset()
      • Examples
    • Auth Retry Strategies
      • NoAuthRetryStrategy
        • NoAuthRetryStrategy
      • SimpleAuthRetryStrategy
        • SimpleAuthRetryStrategy
      • ExponentialAuthRetryStrategy
        • ExponentialAuthRetryStrategy
      • ConditionalAuthRetryStrategy
        • ConditionalAuthRetryStrategy
    • Custom Retry Strategy
    • See Also
  • Hooks API Reference
    • Hook Interfaces
      • RequestHookInterface
        • RequestHookInterface
      • ResponseHookInterface
        • ResponseHookInterface
      • ErrorHookInterface
        • ErrorHookInterface
      • AuthHookInterface
        • AuthHookInterface
    • Built-in Request Hooks
      • LoggingRequestHook
        • LoggingRequestHook
      • CorrelationIdHook
        • CorrelationIdHook
      • AuthorizationHook
        • AuthorizationHook
    • Built-in Response Hooks
      • LoggingResponseHook
        • LoggingResponseHook
      • RateLimitResponseHook
        • RateLimitResponseHook
    • Built-in Error Hooks
      • LoggingErrorHook
        • LoggingErrorHook
    • Built-in Auth Hooks
      • TokenAuthHook
        • TokenAuthHook
      • ApiKeyAuthHook
        • ApiKeyAuthHook
      • BasicAuthHook
        • BasicAuthHook
      • CompositeAuthHook
        • CompositeAuthHook
    • Custom Hook Examples
      • Custom Request Hook
      • Custom Response Hook
      • Custom Error Hook
      • Custom Auth Hook
    • Hook Execution Order
    • Example: Combining Multiple Hooks
    • See Also
  • Token Manager API Reference
    • Token Manager
      • TokenManager
        • TokenManager
        • Methods
    • Token Storage
      • TokenStorageInterface
        • TokenStorageInterface
      • InMemoryTokenStorage
        • InMemoryTokenStorage
      • DjangoCacheTokenStorage
        • DjangoCacheTokenStorage
      • Custom Storage Example
    • Token Providers
      • TokenProviderInterface
        • TokenProviderInterface
      • BaseOAuth2TokenProvider
        • BaseOAuth2TokenProvider
      • ClientCredentialsTokenProvider
        • ClientCredentialsTokenProvider
      • PasswordGrantTokenProvider
        • PasswordGrantTokenProvider
      • Custom Provider Example
    • Complete Examples
      • Basic Token Management
      • With HTTP Client
      • Django Integration
      • Multi-Service Tokens
    • Token Refresh Exception
      • TokenRefreshException
    • See Also
  • Pipelines API Reference
    • TokenFetchPipeline
      • TokenFetchPipeline
      • Methods
        • TokenFetchPipeline.execute()
        • TokenFetchPipeline.invalidate_step()
        • TokenFetchPipeline.invalidate_all()
        • TokenFetchPipeline.get_step()
      • Properties
        • TokenFetchPipeline.step_names
    • PipelineTokenProvider
      • PipelineTokenProvider
      • Properties
        • PipelineTokenProvider.service_name
        • PipelineTokenProvider.pipeline
      • Methods
        • PipelineTokenProvider.fetch_token()
        • PipelineTokenProvider.refresh_token()
    • Complete Examples
      • Two-Step Authentication
      • Three-Step Authentication
      • Selective Cache Invalidation
      • With Django Cache
      • Error Handling
      • Dependency Validation
    • Pipeline Execution Flow
    • Best Practices
    • See Also
  • Token Fetcher API Reference
    • TokenFetcherInterface
      • TokenFetcherInterface
      • Properties
        • name
        • depends_on
        • ttl
      • Methods
        • TokenFetcherInterface.fetch()
        • on_fetch_error()
    • HttpTokenFetcher
      • HttpTokenFetcher
      • Methods
        • close()
    • HeaderTokenFetcher
      • HeaderTokenFetcher
      • Properties
        • HeaderTokenFetcher.name
        • HeaderTokenFetcher.depends_on
        • HeaderTokenFetcher.ttl
      • Methods
        • HeaderTokenFetcher.fetch()
      • Custom Headers Example
    • BodyTokenFetcher
      • BodyTokenFetcher
      • Properties
        • BodyTokenFetcher.name
        • BodyTokenFetcher.depends_on
        • BodyTokenFetcher.ttl
      • Methods
        • BodyTokenFetcher.fetch()
      • Content Types
      • Custom Field Names
      • Custom Data Building
    • Complete Examples
      • Simple OAuth2 Flow
      • Two-Step Flow
      • Header-Based Authentication
      • Mixed Header and Body Tokens
      • Custom Token Fetcher
    • Error Handling
    • Dependency Injection
    • Testing Fetchers
    • Best Practices
    • See Also
  • Exceptions API Reference
    • Exception Hierarchy
    • Base Exception
      • HttpClientException
        • HttpClientException
    • Network Exceptions
      • TimeoutException
        • TimeoutException
      • ConnectionException
        • ConnectionException
      • SSLException
        • SSLException
    • Retry Exceptions
      • MaxRetryException
        • MaxRetryException
    • Parsing Exceptions
      • ResponseParseException
        • ResponseParseException
    • Request Exceptions
      • RequestBuildException
        • RequestBuildException
    • HTTP Status Exceptions
      • HttpStatusException
        • HttpStatusException
      • BadRequestException (400)
        • BadRequestException
      • UnauthorizedException (401)
        • UnauthorizedException
      • ForbiddenException (403)
        • ForbiddenException
      • NotFoundException (404)
        • NotFoundException
      • ServerErrorException (5xx)
        • ServerErrorException
    • Authentication Exceptions
      • AuthenticationException
        • AuthenticationException
      • TokenRefreshException
        • TokenRefreshException
    • Error Handling Patterns
      • Specific to General
      • By Error Category
      • With Retry
      • Context Access
    • Logging Errors
    • Custom Exception Mapping
    • Testing with Exceptions
    • Exception Attributes Summary
    • See Also
  • Utilities API Reference
    • to_curl
      • to_curl()
      • GET Request
      • POST with JSON
      • POST with Form Data
      • With Authentication
      • File Upload
      • With Timeout
      • Complex Example
    • Usage in Debugging
      • Logging Requests
      • Custom Hook
      • Error Reporting
      • Testing Support
      • Sharing Requests
    • HttpRequest Extension
    • Implementation Notes
    • Limitations
    • See Also

Examples

  • Basic Requests Examples
    • Simple GET Request
    • GET with Query Parameters
    • POST Request with JSON
    • POST with Form Data
    • PUT Request (Update Resource)
    • PATCH Request (Partial Update)
    • DELETE Request
    • Custom Headers
    • Per-Request Headers
    • Request Timeout
    • Handling Different Status Codes
    • File Upload
    • Multiple File Upload
    • Basic Authentication
    • API Key Authentication
    • Bearer Token Authentication
    • Response Parsing
      • JSON Response
      • Safe JSON Parsing
      • Text Response
      • Binary Response
    • Using Context Manager
    • Request Metadata
    • Converting to cURL
    • Error Handling
      • Comprehensive Error Handling
    • Batch Requests
      • Sequential Requests
      • Pagination
    • Rate Limiting Handling
    • Complete Example: REST API Client
    • See Also
  • OAuth2 Flow Examples
    • Client Credentials Flow
      • Basic Client Credentials
      • With Django Cache
      • With Header Authentication
      • With Extra Parameters
    • Password Grant Flow
      • User Authentication
    • Token Refresh
      • Automatic Refresh
      • Manual Refresh
    • Auth Retry on 401
      • Automatic Token Refresh on 401
      • Exponential Auth Retry
    • Custom OAuth2 Provider
      • Custom Token Endpoint
    • Multiple Services
      • Different Tokens for Different Services
    • Path Exclusion
      • Exclude Paths from Authentication
      • Pattern-Based Exclusion
    • Token Inspection
      • Accessing Token Information
    • Complete OAuth2 Example
      • Full OAuth2 Integration
    • Error Handling
      • Handling OAuth2 Errors
      • Token Revocation
    • Testing with OAuth2
      • Mocking OAuth2 Tokens
    • See Also
  • Multi-Step Authentication Examples
    • Two-Step Authentication
      • App Token → User Token
    • Three-Step Authentication
      • Device → App → User Tokens
    • Header-Based Authentication Chain
      • Session → API Key → Access Token
    • Mixed Authentication Flow
      • Token in Header and Body
    • Selective Cache Invalidation
      • Invalidate Specific Steps
      • Cascade Invalidation Example
    • With Django Cache
      • Multi-Process Token Pipeline
    • Custom Token Fetcher
      • Complex Custom Logic
    • Error Handling
      • Pipeline Error Handling
      • Custom Error Handling in Fetcher
    • Testing Pipeline
      • Unit Testing Pipeline
    • Complete Example
      • Production Multi-Step Setup
    • See Also
  • Custom Retry Examples
    • Custom Retry Strategy
      • Business Hours Retry
      • Conditional Retry Strategy
      • Adaptive Retry Strategy
      • Rate-Limit Aware Retry
    • Custom Retry with Hooks
      • Capture Rate Limit Headers
      • Timing-Based Retry
    • Retry with Fallback
      • Fallback to Different Endpoint
    • Circuit Breaker Implementation
      • Custom Circuit Breaker
    • Retry Metrics
      • Track Retry Statistics
    • Exponential Backoff with Jitter
      • Custom Jitter Implementation
      • Decorrelated Jitter
    • Testing Retry Logic
      • Test Retry Behavior
    • See Also
  • Django Integration Examples
    • Basic Django Setup
      • settings.py Configuration
      • Using in Views
    • Service Layer Pattern
      • API Service Class
      • Using Service in Views
    • Django REST Framework Integration
      • API Client Mixin
      • ViewSet Example
    • Async Views (Django 4.1+)
      • Async View Example
    • Celery Integration
      • Celery Task
    • Django Management Command
      • Custom Management Command
    • Middleware Integration
      • Request ID Middleware
    • Testing with Django
      • Test Case with Mocked API
      • Using responses Library
    • Environment-Based Configuration
      • Multiple Environments
    • See Also

Architecture

  • Design Principles
    • SOLID Principles
      • Single Responsibility Principle (SRP)
      • Open/Closed Principle (OCP)
      • Liskov Substitution Principle (LSP)
      • Interface Segregation Principle (ISP)
      • Dependency Inversion Principle (DIP)
    • Design Patterns
      • Builder Pattern
      • Strategy Pattern
      • Chain of Responsibility Pattern
      • Factory Pattern
      • Template Method Pattern
      • Value Object Pattern
    • Immutability
    • Separation of Concerns
    • Fail-Fast Principle
    • Explicit over Implicit
    • Composition over Inheritance
    • Type Safety
    • See Also
  • Components Overview
    • System Architecture
      • High-Level Architecture
    • Core Components
      • HttpClient
      • HttpClientConfig
      • HttpClientConfigBuilder
    • Retry Components
      • RetryStrategyInterface
    • Hook Components
      • Hook Pipeline
      • Built-in Hooks
    • Token Management Components
      • TokenManager
      • TokenProviderInterface
      • TokenStorageInterface
    • Multi-Step Authentication Components
      • TokenFetchPipeline
      • TokenFetcherInterface
      • PipelineTokenProvider
    • Data Models
      • HttpRequest
      • HttpResponse
      • RequestContext
      • TokenData
    • Component Interactions
      • Request Flow
      • Token Management Flow
    • Thread Safety
    • Extension Points
    • See Also
  • Thread Safety
    • Thread-Safe Components
      • HttpClient
      • TokenManager
      • InMemoryTokenStorage
      • DjangoCacheTokenStorage
      • TokenFetchPipeline
    • Immutable Components
      • HttpRequest
      • HttpResponse
      • HttpClientConfig
      • TokenData
    • Mutable Components
      • RequestContext
      • FetchContext
    • Common Patterns
      • Sharing Client Across Threads
      • Sharing TokenManager Across Threads
      • Django Integration
    • Potential Issues
      • Sharing Mutable State
      • Blocking in Hooks
    • Testing Thread Safety
      • Example Test
    • Best Practices
    • Summary
    • See Also

Development

  • Development Guide
    • Getting Started
      • Prerequisites
      • Fork and Clone
    • Development Setup
      • Create Virtual Environment
      • Install Dependencies
      • Install Pre-commit Hooks
    • Project Structure
    • Development Workflow
      • 1. Create Feature Branch
      • 2. Make Changes
      • 3. Run Tests
      • 4. Run Linters
      • 5. Commit Changes
      • 6. Push to Your Fork
      • 7. Create Pull Request
    • Adding New Features
      • Adding a New Retry Strategy
      • Adding a New Hook
      • Adding a New Exception
    • Running Tests
      • Test Commands
      • Coverage Reports
    • Code Quality
      • Linting
      • Formatting
      • Type Checking
      • Pre-commit Hooks
    • Building Documentation
    • Testing Against Multiple Python Versions
    • Creating a Release
      • 1. Update Version
      • 2. Update CHANGELOG
      • 3. Create Release Commit
      • 4. Build Distribution
      • 5. Publish to PyPI
      • 6. Push to GitHub
    • Troubleshooting
      • Tests Failing
      • Import Errors
      • Pre-commit Hook Failures
    • Getting Help
    • Best Practices
    • See Also
  • Testing Guide
    • Test Structure
      • Test Organization
      • Test Markers
    • Common Fixtures
      • Basic Fixtures
      • responses Fixtures
    • Unit Testing
      • Testing Client
      • Testing Retry Logic
      • Testing Hooks
      • Testing Token Manager
    • Integration Testing
      • Testing with Real Endpoints
      • Testing with Test Server
    • Mocking Strategies
      • Using responses
      • Using unittest.mock
    • Testing Exceptions
      • Testing Error Handling
    • Coverage Requirements
      • Minimum Coverage
      • Check Coverage
      • Coverage Configuration
    • Performance Testing
      • Benchmark Tests
    • Best Practices
    • See Also
  • Code Style Guide
    • Code Formatting
      • Ruff Configuration
      • Running Ruff
    • Python Style
      • PEP 8 Compliance
      • Imports
      • Type Hints
    • Naming Conventions
      • Classes
      • Functions and Methods
      • Variables
    • Documentation
      • Docstrings
      • Module Docstrings
      • Comments
    • Code Organization
      • Class Structure
      • Function Length
    • Best Practices
      • Immutability
      • SOLID Principles
      • Error Handling
      • Resource Management
      • Constants
    • Example Code
      • Well-Styled Module
    • Pre-commit Configuration
    • See Also
  • Changelog
    • Unreleased
      • Planned Features
    • [1.0.0] - 2026-05-25
      • Added
      • Dependencies
      • Supported Python Versions
      • Security
      • Performance
      • Breaking Changes
      • Deprecated
    • [0.1.0-beta] - 2026-01-01
      • Added
      • Known Issues
      • Fixed
    • Version History
    • Version Numbering
    • Migration Guides
      • Migrating from 0.1.0-beta to 1.0.0
    • Links
Request Forge
  • Search


© Copyright 2026, Hamed Barati.

Built with Sphinx using a theme provided by Read the Docs.