• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Tatsh / niquests-cache / 24616948037 / 2
100%
master: 100%

Build:
DEFAULT BRANCH: master
Ran 19 Apr 2026 12:10AM UTC
Files 9
Run time 0s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

19 Apr 2026 12:09AM UTC coverage: 100.0%. Remained the same
24616948037.2

push

github

Tatsh
project: rework session API and add pluggable backends

Match the public API of `requests_cache.CachedSession` (`cache_name`,
`backend`, `serializer`, `expire_after`, `urls_expire_after`,
`cache_control`, `allowable_codes`, `allowable_methods`,
`ignored_parameters`, `match_headers`, `filter_fn`, `key_fn`,
`read_only`, etc.) and add per-request `only_if_cached`, `refresh`, and
`force_refresh` to `request()`. Add `cache_disabled()` context manager
and a mutable `session.settings` (`CacheSettings` dataclass).

Introduce `niquests_cache.backends` with `BaseBackend`, `MemoryBackend`,
`FileCache`, and `SQLiteBackend`. SQLite is now the default backend;
its schema uses typed columns and stores `content` as `BLOB` so binary
responses round-trip intact. `FileCache` matches the `requests_cache`
signature (`cache_name`, `use_temp`, `use_cache_dir`, `extension`,
`lock`, `serializer`). `AsyncCachedSession` uses `aiosqlite` for SQLite
and `anyio` for filesystem I/O.

Add `niquests_cache.serializers` with `JsonSerializer` (default;
base64-encodes binary content), `PickleSerializer`, and a duck-typed
custom-serializer protocol. `CacheEntry.content` becomes `bytes`.

Rename `CachedAsyncSession` to `AsyncCachedSession`, expose
`CacheMixin` for subclassing, and trim the top-level package re-exports
to `AsyncCachedSession`, `CachedSession`, and `cached_session` (other
types live under their submodules). Log the selected backend and its
storage path at debug level on session construction.

Add `aiosqlite>=0.20` and `anyio>=4.4` runtime dependencies. Update
project description.

Signed-off-by: Andrew Udvare <audvare@gmail.com>

50 of 50 branches covered (100.0%)

Branch coverage included in aggregate %.

457 of 457 relevant lines covered (100.0%)

1.0 hits per line

Source Files on job 24616948037.2
  • Tree
  • List 9
  • Changed 2
  • Source Changed 2
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 24616948037
  • 599e1780 on github
  • Prev Job for on master (#24330219858.4)
  • Next Job for on master (#24617237940.2)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc