Skip to content

Commit 7b382be

Browse files
Add API reference (#165)
1 parent e6178c3 commit 7b382be

16 files changed

+1028
-47
lines changed

docs/api_reference.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# API reference
2+
3+
::: pycrdt
4+
options:
5+
inherited_members: true
6+
unwrap_annotated: true
7+
members:
8+
- BaseType
9+
- Array
10+
- ArrayEvent
11+
- Decoder
12+
- Doc
13+
- Map
14+
- MapEvent
15+
- NewTransaction
16+
- ReadTransaction
17+
- StackItem
18+
- Subscription
19+
- SubdocsEvent
20+
- Text
21+
- TextEvent
22+
- Transaction
23+
- TransactionEvent
24+
- UndoManager
25+
- YMessageType
26+
- YSyncMessageType
27+
- create_sync_message
28+
- create_update_message
29+
- handle_sync_message
30+
- get_state
31+
- get_update
32+
- merge_updates
33+
- read_message
34+
- write_var_uint

docs/assets/logo.png

6.25 KB
Loading

mkdocs.yml

+15
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,28 @@ theme:
2525
- search.highlight
2626
- content.code.annotate
2727
- content.code.copy
28+
logo: assets/logo.png
2829

2930
nav:
3031
- Overview: index.md
3132
- install.md
3233
- usage.md
34+
- api_reference.md
3335

3436
markdown_extensions:
3537
- admonition
3638
- pymdownx.details
3739
- pymdownx.superfences
40+
41+
plugins:
42+
- search
43+
- mkdocstrings:
44+
default_handler: python
45+
handlers:
46+
python:
47+
options:
48+
show_source: false
49+
docstring_style: google
50+
find_stubs_package: true
51+
docstring_options:
52+
ignore_init_summary: false

pyproject.toml

+5-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ test = [
4343
"coverage[toml] >=7",
4444
"exceptiongroup; python_version<'3.11'",
4545
]
46-
docs = [ "mkdocs", "mkdocs-material" ]
46+
docs = [
47+
"mkdocs",
48+
"mkdocs-material",
49+
"mkdocstrings[python]",
50+
]
4751

4852
[project.urls]
4953
Homepage = "https://github.com/jupyter-server/pycrdt"

python/pycrdt/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
from ._doc import Doc as Doc
44
from ._map import Map as Map
55
from ._map import MapEvent as MapEvent
6+
from ._pycrdt import StackItem as StackItem
7+
from ._pycrdt import SubdocsEvent as SubdocsEvent
68
from ._pycrdt import Subscription as Subscription
79
from ._pycrdt import TransactionEvent as TransactionEvent
810
from ._sync import Decoder as Decoder
@@ -15,6 +17,7 @@
1517
from ._sync import write_var_uint as write_var_uint
1618
from ._text import Text as Text
1719
from ._text import TextEvent as TextEvent
20+
from ._transaction import NewTransaction as NewTransaction
1821
from ._transaction import ReadTransaction as ReadTransaction
1922
from ._transaction import Transaction as Transaction
2023
from ._undo import UndoManager as UndoManager

0 commit comments

Comments
 (0)