Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/danielfm/pybreaker
/ functions
Functions
206 in github.com/danielfm/pybreaker
⨍
Functions
206
◇
Types & classes
29
↳
Endpoints
3
Method
opened_at
Return the most recent value of when the circuit was opened.
src/pybreaker/__init__.py:464
Method
opened_at
Returns a datetime object of the most recent value of when the circuit was opened.
src/pybreaker/__init__.py:598
Method
reset_counter
Override this method to set the failure counter to zero.
src/pybreaker/__init__.py:387
Method
reset_counter
Set the failure counter to zero.
src/pybreaker/__init__.py:441
Method
reset_success_counter
Override this method to set the success counter to zero.
src/pybreaker/__init__.py:393
Method
reset_success_counter
Set the success counter to zero.
src/pybreaker/__init__.py:449
Method
reset_timeout
Once this circuit breaker is opened, it should remain opened until the timeout period, in seconds, elapses.
src/pybreaker/__init__.py:138
Method
setUp
(self)
tests/pybreaker_test.py:908
Method
setUp
(self)
tests/pybreaker_test.py:960
Method
setUp
(self)
tests/pybreaker_test.py:1044
Method
setUp
(self)
tests/pybreaker_test.py:1177
Method
set_if_greater
(pipe: Pipeline[bytes])
src/pybreaker/__init__.py:627
Method
state
Update (if needed) and returns the cached state object.
src/pybreaker/__init__.py:179
Method
state
Override this method to retrieve the current circuit breaker state.
src/pybreaker/__init__.py:377
Method
state
Return the current circuit breaker state.
src/pybreaker/__init__.py:428
Method
state
Return the current circuit breaker state. If the circuit breaker state on Redis is missing, re-initialize it with the fallback circui
src/pybreaker/__init__.py:515
Method
state_change
(self, cb, old_state, new_state)
tests/pybreaker_test.py:276
Method
state_change
(self, cb, old_state, new_state)
tests/pybreaker_test.py:1137
Method
state_change
(self, cb, old_state, new_state)
tests/pybreaker_test.py:1278
Method
suc
()
tests/pybreaker_test.py:50
Method
suc
Docstring
tests/pybreaker_test.py:676
Method
suc
()
tests/pybreaker_test.py:1092
Method
suc
()
tests/pybreaker_test.py:1233
Method
success
(self, cb)
tests/pybreaker_test.py:319
Method
success
(self, cb)
tests/pybreaker_test.py:1100
Method
success
(self, cb)
tests/pybreaker_test.py:1241
Method
success_counter
Return the current number of consecutive successes in half-open state.
src/pybreaker/__init__.py:123
Method
success_counter
Override this method to retrieve the current value of the success counter.
src/pybreaker/__init__.py:403
Method
success_counter
Return the current value of the success counter.
src/pybreaker/__init__.py:459
Method
success_counter
Return the current value of the success counter.
src/pybreaker/__init__.py:586
Method
success_threshold
Return the number of successful requests required before transitioning from half-open to closed state.
src/pybreaker/__init__.py:150
Method
tearDown
(self)
tests/pybreaker_test.py:965
Method
tearDown
(self)
tests/pybreaker_test.py:1186
Method
test_add_excluded_exception
CircuitBreaker: it should allow the user to exclude an exception at a later time.
tests/pybreaker_test.py:643
Method
test_add_excluded_exceptions
CircuitBreaker: it should allow the user to exclude exceptions at a later time.
tests/pybreaker_test.py:655
Method
test_add_listener
CircuitBreaker: it should allow the user to add a listener at a later time.
tests/pybreaker_test.py:511
Method
test_add_listeners
CircuitBreaker: it should allow the user to add listeners at a later time.
tests/pybreaker_test.py:525
Method
test_call_async_with_args
CircuitBreaker: it should be able to invoke async functions with args.
tests/pybreaker_test.py:490
Method
test_call_async_with_kwargs
CircuitBreaker: it should be able to invoke async functions with kwargs.
tests/pybreaker_test.py:501
Method
test_call_async_with_no_args
CircuitBreaker: it should be able to invoke async functions with no-args.
tests/pybreaker_test.py:479
Method
test_call_events
CircuitBreaker: it should call the appropriate functions on every successful/failed call.
tests/pybreaker_test.py:299
Method
test_call_with_args
CircuitBreaker: it should be able to invoke functions with args.
tests/pybreaker_test.py:462
Method
test_call_with_kwargs
CircuitBreaker: it should be able to invoke functions with kwargs.
tests/pybreaker_test.py:470
Method
test_call_with_no_args
CircuitBreaker: it should be able to invoke functions with no-args.
tests/pybreaker_test.py:454
Method
test_calling
Test that the CircuitBreaker calling() API returns a context manager and works as expected.
tests/pybreaker_test.py:1321
Method
test_close
CircuitBreaker: it should allow the circuit to be closed manually.
tests/pybreaker_test.py:242
Method
test_cluster_mode
(self)
tests/pybreaker_test.py:1020
Method
test_contextmanager
CircuitBreaker: it should catch in a with statement
tests/pybreaker_test.py:362
Method
test_create_new_state__bad_state
(self)
tests/pybreaker_test.py:913
Method
test_decorator
CircuitBreaker: it should be a decorator.
tests/pybreaker_test.py:672
Method
test_decorator_call_future
CircuitBreaker: it should be a decorator.
tests/pybreaker_test.py:698
Method
test_default_params
CircuitBreaker: it should define smart defaults.
tests/pybreaker_test.py:394
Method
test_default_state
CircuitBreaker: it should get initial state from state_storage.
tests/pybreaker_test.py:387
Method
test_excluded_callable_and_types_exceptions
CircuitBreaker: it should allow a mix of exclusions that includes both filter functions and types.
tests/pybreaker_test.py:605
Method
test_excluded_callable_exceptions
CircuitBreaker: it should ignore specific exceptions that return true from a filtering callable.
tests/pybreaker_test.py:574
Method
test_excluded_exceptions
CircuitBreaker: it should ignore specific exceptions.
tests/pybreaker_test.py:542
Method
test_fail_max_setter
CircuitBreaker: it should allow the user to set a new value for 'fail_max'.
tests/pybreaker_test.py:438
Method
test_fail_max_thread_safety
CircuitBreaker: it should not allow more failed calls than 'fail_max' setting.
tests/pybreaker_test.py:1147
Method
test_fail_max_thread_safety
CircuitBreaker: it should not allow more failed calls than 'fail_max' setting. Note that with Redis, where we have separate systems in
tests/pybreaker_test.py:1288
Method
test_fail_thread_safety
CircuitBreaker: it should compute a failed call atomically to avoid race conditions.
tests/pybreaker_test.py:1057
Method
test_fail_thread_safety
CircuitBreaker: it should compute a failed call atomically to avoid race conditions.
tests/pybreaker_test.py:1199
Method
test_failed_call_after_timeout
CircuitBreaker: it should half-open the circuit after timeout.
tests/pybreaker_test.py:147
Method
test_failed_call_when_halfopen
CircuitBreaker: it should open the circuit when a call fails in half-open state.
tests/pybreaker_test.py:207
Method
test_failure_count_not_reset_during_creation
(self)
tests/pybreaker_test.py:931
Method
test_fallback_state
(self)
tests/pybreaker_test.py:984
Method
test_generator
CircuitBreaker: it should inspect generator values.
tests/pybreaker_test.py:336
Method
test_half_open_thread_safety
CircuitBreaker: it should allow only one trial call when the circuit is half-open.
tests/pybreaker_test.py:1111
Method
test_half_open_thread_safety
CircuitBreaker: it should allow only one trial call when the circuit is half-open.
tests/pybreaker_test.py:1252
Method
test_missing_state
CircuitBreakerRedis: If state on Redis is missing, it should set the fallback circuit state and reset the fail counter to 0.
tests/pybreaker_test.py:999
Method
test_name
CircuitBreaker: it should allow an optional name to be set and retrieved.
tests/pybreaker_test.py:736
Method
test_namespace
(self)
tests/pybreaker_test.py:968
Method
test_new_with_custom_excluded_exceptions
CircuitBreaker: it should support a custom list of excluded exceptions.
tests/pybreaker_test.py:426
Method
test_new_with_custom_fail_max
CircuitBreaker: it should support a custom maximum number of failures.
tests/pybreaker_test.py:414
Method
test_new_with_custom_reset_timeout
CircuitBreaker: it should support a custom reset timeout value.
tests/pybreaker_test.py:404
Method
test_no_tornado_raises
(self)
tests/pybreaker_test.py:728
Method
test_notify_called_on_state_change
(self, open_state)
tests/pybreaker_test.py:924
Method
test_notify_not_called_on_init
(self, open_state)
tests/pybreaker_test.py:918
Method
test_one_failed_call
CircuitBreaker: it should keep the circuit closed after a few failures.
tests/pybreaker_test.py:32
Method
test_one_successful_call_after_failed_call
CircuitBreaker: it should keep the circuit closed after few mixed outcomes.
tests/pybreaker_test.py:45
Method
test_remove_excluded_exception
CircuitBreaker: it should allow the user to remove an excluded exception.
tests/pybreaker_test.py:662
Method
test_remove_listener
CircuitBreaker: it should allow the user to remove a listener.
tests/pybreaker_test.py:533
Method
test_reset_timeout_setter
CircuitBreaker: it should allow the user to set a new value for 'reset_timeout'.
tests/pybreaker_test.py:446
Method
test_several_failed_calls_setting_absent
CircuitBreaker: it should open the circuit after many failures.
tests/pybreaker_test.py:64
Method
test_state_opened_at_not_reset_during_creation
(self)
tests/pybreaker_test.py:940
Method
test_success_thread_safety
CircuitBreaker: it should compute a successful call atomically to avoid race conditions.
tests/pybreaker_test.py:1086
Method
test_success_thread_safety
CircuitBreaker: it should compute a successful call atomically to avoid race conditions.
tests/pybreaker_test.py:1227
Method
test_success_threshold_default_behavior
CircuitBreaker: it should maintain backward compatibility with default success_threshold=1.
tests/pybreaker_test.py:748
Method
test_success_threshold_failure_resets_counter
CircuitBreaker: it should reset success counter when a failure occurs in half-open state.
tests/pybreaker_test.py:812
Method
test_success_threshold_multiple_successes_required
CircuitBreaker: it should require multiple successful calls before closing when success_threshold > 1.
tests/pybreaker_test.py:775
Method
test_success_threshold_property
CircuitBreaker: it should support getting and setting success_threshold.
tests/pybreaker_test.py:850
Method
test_success_threshold_redis_storage
CircuitBreaker: it should work correctly with Redis storage.
tests/pybreaker_test.py:858
Method
test_successful_after_timeout
CircuitBreaker: it should close the circuit when a call succeeds after timeout. The successful function should only be called once.
tests/pybreaker_test.py:174
Method
test_successful_call
CircuitBreaker: it should keep the circuit closed after a successful call.
tests/pybreaker_test.py:20
Method
test_successful_call_when_halfopen
CircuitBreaker: it should close the circuit when a call succeeds in half-open state.
tests/pybreaker_test.py:225
Method
test_throw_new_error_on_trip_false
CircuitBreaker: it should throw the original exception
tests/pybreaker_test.py:82
Method
test_throw_new_error_on_trip_true
CircuitBreaker: it should throw a CircuitBreakerError exception
tests/pybreaker_test.py:106
Method
test_traceback_in_circuitbreaker_error
CircuitBreaker: it should open the circuit after many failures.
tests/pybreaker_test.py:124
Method
test_transition_events
CircuitBreaker: it should call the appropriate functions on every state transition.
tests/pybreaker_test.py:267
Method
trigger_error
()
tests/pybreaker_test.py:1070
Method
trigger_error
()
tests/pybreaker_test.py:1212
← previous
next →
101–200 of 206, ranked by callers