Skip to content

Commit

Permalink
Add API reference (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbrochart authored Oct 1, 2024
1 parent e6178c3 commit 7b382be
Show file tree
Hide file tree
Showing 16 changed files with 1,028 additions and 47 deletions.
34 changes: 34 additions & 0 deletions docs/api_reference.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# API reference

::: pycrdt
options:
inherited_members: true
unwrap_annotated: true
members:
- BaseType
- Array
- ArrayEvent
- Decoder
- Doc
- Map
- MapEvent
- NewTransaction
- ReadTransaction
- StackItem
- Subscription
- SubdocsEvent
- Text
- TextEvent
- Transaction
- TransactionEvent
- UndoManager
- YMessageType
- YSyncMessageType
- create_sync_message
- create_update_message
- handle_sync_message
- get_state
- get_update
- merge_updates
- read_message
- write_var_uint
Binary file added docs/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,28 @@ theme:
- search.highlight
- content.code.annotate
- content.code.copy
logo: assets/logo.png

nav:
- Overview: index.md
- install.md
- usage.md
- api_reference.md

markdown_extensions:
- admonition
- pymdownx.details
- pymdownx.superfences

plugins:
- search
- mkdocstrings:
default_handler: python
handlers:
python:
options:
show_source: false
docstring_style: google
find_stubs_package: true
docstring_options:
ignore_init_summary: false
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ test = [
"coverage[toml] >=7",
"exceptiongroup; python_version<'3.11'",
]
docs = [ "mkdocs", "mkdocs-material" ]
docs = [
"mkdocs",
"mkdocs-material",
"mkdocstrings[python]",
]

[project.urls]
Homepage = "https://github.com/jupyter-server/pycrdt"
Expand Down
3 changes: 3 additions & 0 deletions python/pycrdt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
from ._doc import Doc as Doc
from ._map import Map as Map
from ._map import MapEvent as MapEvent
from ._pycrdt import StackItem as StackItem
from ._pycrdt import SubdocsEvent as SubdocsEvent
from ._pycrdt import Subscription as Subscription
from ._pycrdt import TransactionEvent as TransactionEvent
from ._sync import Decoder as Decoder
Expand All @@ -15,6 +17,7 @@
from ._sync import write_var_uint as write_var_uint
from ._text import Text as Text
from ._text import TextEvent as TextEvent
from ._transaction import NewTransaction as NewTransaction
from ._transaction import ReadTransaction as ReadTransaction
from ._transaction import Transaction as Transaction
from ._undo import UndoManager as UndoManager
Expand Down
Loading

0 comments on commit 7b382be

Please sign in to comment.