MCPcopy Create free account

hub / github.com/requests-cache/requests-cache / functions

Functions788 in github.com/requests-cache/requests-cache

Methodis_expired
(self)
requests_cache/models/response.py:44
Methodis_expired
Determine if this cached response is expired
requests_cache/models/response.py:155
Functionis_installed
Indicate whether or not requests-cache is currently installed
requests_cache/patcher.py:104
Functionlinkcheck
Check documentation for dead links
noxfile.py:135
Functionlint
Run linters and code formatters via pre-commit
noxfile.py:161
Functionlivedocs
Auto-build docs with live reload in browser. Add `--open` to also open the browser after starting.
noxfile.py:141
Methodloads
(self, value)
requests_cache/serializers/pipeline.py:70
Methodlock
The lock used by the cache.
requests_cache/backends/filesystem.py:70
Methodlock
The lock used by the cache.
requests_cache/backends/filesystem.py:119
Functionmake_decimal_timedelta_converter
Make a converter that uses Decimals instead of floats to represent timedelta objects
requests_cache/serializers/cattrs.py:168
Functionmock_session
Fixture for combining requests-cache with requests-mock. This will behave the same as a CachedSession, except it will make mock requests for ``moc
tests/conftest.py:128
Functionmock_session
Fixture that provides a session with mocked URLs and responses based on cache data
tests/compat/test_requests_mock_load_cache.py:23
Functionmock_session
Fixture that provides a CachedSession that will make mock requests where it would normally make real requests
tests/compat/test_requests_mock_combine_cache.py:12
Functionnew_key_fn
(*args, **kwargs)
tests/unit/test_base_cache.py:237
Methodnext
Returns a PreparedRequest for the next request in a redirect chain, if there is one.
requests_cache/models/response.py:169
Methodnormalize_cookies
(cookies: Optional[Mapping])
requests_cache/policy/actions.py:386
Functionpatch_automodapi
Monkey-patch the automodapi extension to exclude imported members: https://github.com/astropy/sphinx-automodapi/blob/main/sphinx_automodapi/automo
docs/conf.py:161
Methodpath_url
(self)
requests_cache/models/request.py:33
Methodpaths
Get absolute file paths to all cached responses
requests_cache/backends/filesystem.py:79
Methodrecreate_keys
(self)
requests_cache/backends/sqlite.py:171
Methodrelease_conn
No-op for compatibility
requests_cache/models/raw_response.py:83
Functionremove_expired_responses
()
examples/generate_test_db.py:89
Functionrequests_cache_mock
(requests_mock)
tests/compat/test_requests_mock_disable_cache.py:10
Methodreset_expiration
Set a new expiration for this response
requests_cache/models/response.py:173
Methodset_ttl
Create or update a TTL index. Notes: * This will have no effect if TTL is already set * To overwrite an existing TTL index, use ``ove
requests_cache/backends/mongodb.py:62
Methodsettings
Settings that affect cache behavior
requests_cache/session.py:113
Functionsetup
Run some additional steps after the Sphinx builder is initialized
docs/conf.py:154
Methodsize
Return the size of the database, in bytes
requests_cache/backends/filesystem.py:175
Methodsize
Return the size of the database, in bytes
requests_cache/backends/filesystem.py:312
Methodsize
Get the size of the response body in bytes
requests_cache/models/response.py:179
Functionskip_missing_deps
(module_name: str)
tests/conftest.py:363
Functionslow_request
(*args, **kwargs)
tests/unit/test_session.py:882
Methodsorted
Get LRU entries in sorted order, by either ``access_time`` or ``size``
requests_cache/backends/filesystem.py:453
Methodsorted
Get cached responses, with sorting and other query options. Args: key: Key to sort by; either 'expires', 'size', or 'key'
requests_cache/backends/sqlite.py:175
Functionsqlite_template
Template function to get an accurate signature for the builtin :py:func:`sqlite3.connect`
requests_cache/backends/sqlite.py:503
Functionstress_test
Run concurrency tests with a higher stress test multiplier
noxfile.py:118
Functionstructure_fwd_ref
(obj, cls)
requests_cache/serializers/cattrs.py:149
Functiontarget
()
tests/conftest.py:308
Methodteardown_class
(cls)
tests/integration/test_filesystem.py:43
Methodteardown_class
(cls)
tests/integration/test_filesystem.py:331
Methodteardown_class
(cls)
tests/integration/test_sqlite.py:27
Methodteardown_class
(cls)
tests/integration/test_sqlite.py:335
Methodteardown_class
(cls)
tests/integration/base_cache_test.py:63
Methodteardown_class
(cls)
tests/integration/base_storage_test.py:29
Functiontempfile_path
Get a unique tempfile path
tests/conftest.py:154
Functiontempfile_session
Get a CachedSession using a temporary SQLite db
tests/conftest.py:144
Functiontest
Run tests in a separate virtualenv per python version
noxfile.py:74
Functiontest_304_not_modified
( response_code, cache_hit, cache_expired, expected_from_cache, mock_session )
tests/unit/test_session.py:825
Functiontest_all_methods
Test all relevant combinations of methods and data fields. Requests with different request params, data, or json should be cached under different
tests/unit/test_session.py:146
Methodtest_all_methods
Test all relevant combinations of methods X data fields X serializers
tests/integration/test_filesystem.py:483
Methodtest_all_methods
Test all relevant combinations of methods X data fields. Requests with different request params, data, or json should be cached under differen
tests/integration/base_cache_test.py:69
Functiontest_all_methods__ignored_parameters__not_matched
Test all relevant combinations of methods and data fields. Requests with different request params, data, or json should not be cached under differ
tests/unit/test_session.py:157
Functiontest_all_methods__ignored_parameters__redacted
Test all relevant combinations of methods and data fields. Requests with ignored params should have those values redacted from the cached response
tests/unit/test_session.py:176
Methodtest_all_response_formats
Test all relevant combinations of response formats X serializers
tests/integration/base_cache_test.py:82
Methodtest_all_response_formats__no_decode_content
Test with decode_content=True for text-based serialization formats
tests/integration/test_filesystem.py:500
Functiontest_allowable_codes
(mock_session)
tests/unit/test_session.py:629
Functiontest_allowable_methods
(mock_session)
tests/unit/test_session.py:643
Functiontest_allowable_methods__override_headers
(override_header, mock_session)
tests/unit/test_session.py:666
Functiontest_always_revalidate
The session always_revalidate option should send a conditional request, if possible
tests/unit/test_session.py:682
Functiontest_basic_attrs
(mock_session)
tests/unit/models/test_response.py:14
Methodtest_basic_methods
Test basic dict methods with multiple cache instances: ``getitem, setitem, delitem, len, contains``
tests/integration/base_storage_test.py:33
Methodtest_block_alignment
File size should be aligned with the block on the file system, and be taken into account when adding, replacing, and deleting items.
tests/integration/test_filesystem.py:278
Methodtest_bool
Check boolean conversion.
tests/integration/base_storage_test.py:191
Methodtest_bulk_commit
(self)
tests/integration/test_sqlite.py:82
Methodtest_bulk_commit__noop
(self)
tests/integration/test_sqlite.py:116
Methodtest_bulk_delete
(self)
tests/integration/base_storage_test.py:89
Methodtest_bulk_delete__chunked
When deleting more items than SQLite can handle in a single statement, it should be chunked into multiple smaller statements
tests/integration/test_sqlite.py:94
Methodtest_bulk_delete__noop
Just make sure bulk_delete doesn't do anything unexpected if no keys are provided
tests/integration/base_storage_test.py:100
Methodtest_busy_timeout
(self)
tests/integration/test_sqlite.py:146
Methodtest_cache_control_expiration
Test cache headers for both requests and responses. The `/cache/{seconds}` endpoint returns Cache-Control headers, which should be used unless
tests/integration/base_cache_test.py:172
Functiontest_cache_disabled
(mock_session)
tests/unit/test_session.py:593
Functiontest_cache_disabled__nested
(mock_session)
tests/unit/test_session.py:601
Functiontest_cache_error
If there is an error while fetching a cached response, a new one should be fetched
tests/unit/test_session.py:484
Methodtest_cache_key
The cache_key attribute should be available on responses returned from all mapping/collection methods
tests/integration/base_storage_test.py:67
Functiontest_cache_signing
(tempfile_path)
tests/unit/test_serializers.py:80
Functiontest_cattrs_compat
CattrStage should be compatible with BaseConverter, which doesn't support the omit_if_default keyword arg.
tests/unit/test_serializers.py:126
Functiontest_clear
(mock_session)
tests/unit/test_base_cache.py:311
Functiontest_clear
(mock_clear, installed_session)
tests/unit/test_patcher.py:63
Methodtest_clear
(self)
tests/integration/test_filesystem.py:371
Methodtest_clear
(self)
tests/integration/base_storage_test.py:144
Methodtest_clear__failure
When a corrupted cache prevents a normal DROP TABLE, clear() should still succeed
tests/integration/test_sqlite.py:343
Methodtest_clear__file_already_deleted
(self, mock_clear)
tests/integration/test_sqlite.py:354
Functiontest_clear__not_installed
If clear is called without a cache installed, it should just fail silently
tests/unit/test_patcher.py:69
Methodtest_clear_empty_cache
(self)
tests/integration/base_storage_test.py:159
Methodtest_clear_with_unaligned_blocks
(self, max_cache_bytes)
tests/integration/test_filesystem.py:310
Functiontest_close
By default, backend connections should be closed when the session closes
tests/unit/test_session.py:1209
Functiontest_close
()
tests/unit/models/test_raw_response.py:37
Functiontest_close__autoclose_off
With autoclose=False, backend connections should NOT be closed when the session closes
tests/unit/test_session.py:1216
Methodtest_concurrency
On GitHub runners, sometimes the MongoDB container is not ready yet by the time this, runs, so some retries are added here.
tests/integration/test_mongodb.py:105
Methodtest_concurrency
Run multithreaded and multiprocess stress tests for each backend. The number of workers (thread/processes), iterations, and requests per itera
tests/integration/base_cache_test.py:411
Methodtest_concurrency
Test a large number of concurrent write operations for each backend
tests/integration/base_storage_test.py:180
Methodtest_conditional_request
Test behavior of ETag and Last-Modified headers and 304 responses. When a cached response contains one of these headers, corresponding reques
tests/integration/base_cache_test.py:195
Methodtest_conditional_request__refreshes_expire_date
Test that revalidation attempt with 304 responses causes stale entry to become fresh again considering Cache-Control header of the 304 respons
tests/integration/base_cache_test.py:238
Methodtest_conditional_request__response_headers
Test response headers that can initiate revalidation before a cached response expires
tests/integration/base_cache_test.py:221
Methodtest_connection_kwargs
A spot check to make sure optional connection kwargs gets passed to connection; except for isolation_level, which is ignored
tests/integration/test_sqlite.py:34
Methodtest_connection_kwargs
A spot check to make sure optional connection kwargs gets passed to connection
tests/integration/test_mongodb.py:40
Methodtest_connection_kwargs
A spot check to make sure optional connection kwargs gets passed to connection
tests/integration/test_mongodb.py:143
Methodtest_connection_kwargs
A spot check to make sure optional connection kwargs gets passed to connection
tests/integration/test_dynamodb.py:44
Methodtest_connection_kwargs
A spot check to make sure optional connection kwargs get passed to connection
tests/integration/test_redis.py:30
Methodtest_connection_obj
(self)
tests/integration/test_mongodb.py:157
← previousnext →401–500 of 788, ranked by callers