Skip to content

Commit ae0c639

Browse files
Copilotstrawgate
andauthored
Add comprehensive navigation to documentation site (#215)
Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: strawgate <[email protected]> Co-authored-by: William Easton <[email protected]> Co-authored-by: William Easton <[email protected]>
1 parent cae92d8 commit ae0c639

File tree

2 files changed

+69
-4
lines changed

2 files changed

+69
-4
lines changed

docs/api/index.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# API Reference
2+
3+
Complete API reference documentation for py-key-value.
4+
5+
## Overview
6+
7+
The py-key-value API is organized into four main components:
8+
9+
- **[Protocols](protocols.md)** - Core interfaces for the key-value store
10+
- **[Stores](stores.md)** - Backend implementations for different storage systems
11+
- **[Wrappers](wrappers.md)** - Decorators that add functionality to stores
12+
- **[Adapters](adapters.md)** - Utilities that simplify working with stores
13+
14+
## Quick Links
15+
16+
### Core Protocols
17+
18+
The [`AsyncKeyValue`](protocols.md) protocol defines the async interface that all
19+
stores implement.
20+
21+
The [`KeyValue`](protocols.md) protocol is the synchronous version.
22+
23+
### Popular Stores
24+
25+
- [MemoryStore](stores.md) - In-memory storage
26+
- [RedisStore](stores.md) - Redis backend
27+
- [DiskStore](stores.md) - File-based storage
28+
29+
### Common Wrappers
30+
31+
- [LoggingWrapper](wrappers.md) - Add logging to any store
32+
- [CacheWrapper](wrappers.md) - Add caching layer
33+
- [RetryWrapper](wrappers.md) - Add automatic retry logic
34+
35+
## Using the API Reference
36+
37+
Each page provides:
38+
39+
- **Type signatures** - Full type information for all parameters and return values
40+
- **Docstrings** - Detailed descriptions of functionality
41+
- **Source links** - View the implementation on GitHub
42+
- **Cross-references** - Navigate between related components
43+
44+
## Example Usage
45+
46+
```python
47+
from key_value.aio.stores.memory import MemoryStore
48+
from key_value.aio.wrappers.logging import LoggingWrapper
49+
50+
# Create a store with logging
51+
store = LoggingWrapper(MemoryStore())
52+
53+
# Use the store
54+
await store.put("key", "value")
55+
result = await store.get("key")
56+
```
57+
58+
For more examples and guides, see the [User Guide](../stores.md).

mkdocs.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,17 @@ theme:
3030
- navigation.top
3131
- navigation.tracking
3232
- navigation.instant
33-
- toc.integrate
33+
- navigation.path
34+
- navigation.indexes
35+
- navigation.footer
3436
- toc.follow
3537
- search.suggest
3638
- search.highlight
39+
- search.share
3740
- content.code.copy
3841
- content.code.annotate
42+
- content.action.edit
43+
- content.action.view
3944

4045
plugins:
4146
- search
@@ -71,10 +76,12 @@ markdown_extensions:
7176
nav:
7277
- Home: index.md
7378
- Getting Started: getting-started.md
74-
- Stores: stores.md
75-
- Wrappers: wrappers.md
76-
- Adapters: adapters.md
79+
- User Guide:
80+
- Stores: stores.md
81+
- Wrappers: wrappers.md
82+
- Adapters: adapters.md
7783
- API Reference:
84+
- api/index.md
7885
- Protocols: api/protocols.md
7986
- Stores: api/stores.md
8087
- Wrappers: api/wrappers.md

0 commit comments

Comments
 (0)