Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add API reference #165

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading