create_http_provider
Documentation for eth_defi.compat.create_http_provider function.
- create_http_provider(*args, **kwargs)
Create an HTTPProvider instance.
Register the endpoint before construction so dependency diagnostics cannot expose it. Request arguments and the provider endpoint remain intact.
- Parameters
- Returns
The configured HTTP provider.
- Return type
web3.providers.rpc.rpc.HTTPProvider
Example:
@pytest.fixture() def provider_1(anvil): provider = create_http_provider(anvil.json_rpc_url, exception_retry_configuration=None) clear_middleware(provider) return provider