Skip to content

Commit 39c9be1

Browse files
authored
Merge pull request #99 from rsocket/documentation
Documentation RTD
2 parents 6ba8bcd + 283cdfc commit 39c9be1

21 files changed

+218
-36
lines changed

CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Changelog
44
v0.4.6
55
======
66
- fire_and_forget now only removes the stream id when the future denoting the frame was sent, is done
7+
- API documentation auto generated at rsocket.readthedocs.io
78

89
v0.4.5
910
======

docs/api.rst

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,44 @@
1-
API Reference
2-
-------------
1+
Core API Reference
2+
==================
33

4-
Core
5-
----
4+
Server
5+
------
66

77
.. automodule:: rsocket.rsocket_server
88
:members:
9+
:inherited-members:
10+
11+
Client
12+
------
913

1014
.. automodule:: rsocket.rsocket_client
1115
:members:
16+
:inherited-members:
1217

13-
Helpers
14-
--------
18+
Handler
19+
-------
1520

16-
Requester
17-
~~~~~~~~~
21+
.. automodule:: rsocket.request_handler
22+
:members:
1823

19-
Responder
20-
~~~~~~~~~
2124

22-
Clients
23-
-------
25+
Interfaces
26+
----------
27+
28+
Publisher
29+
~~~~~~~~~
2430

25-
.. automodule:: rsocket.awaitable.awaitable_rsocket
31+
.. automodule:: reactivestreams.publisher
2632
:members:
2733

28-
.. automodule:: rsocket.rx_support.rx_rsocket
34+
Subscriber
35+
~~~~~~~~~~
36+
37+
.. automodule:: reactivestreams.subscriber
2938
:members:
3039

40+
Subscription
41+
~~~~~~~~~~~~
42+
43+
.. automodule:: reactivestreams.subscription
44+
:members:

docs/conf.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,21 @@
1010
# add these directories to sys.path here. If the directory is relative to the
1111
# documentation root, use os.path.abspath to make it absolute, like shown here.
1212
#
13-
# import os
14-
# import sys
15-
# sys.path.insert(0, os.path.abspath('.'))
13+
import os
14+
import sys
15+
16+
sys.path.insert(0, os.path.abspath('..'))
1617

1718

1819
# -- Project information -----------------------------------------------------
1920
import os
2021

21-
project = 'rsocket'
22-
copyright = '2022, [email protected]'
23-
22+
project = 'RSocket python'
23+
copyright = '2021, [email protected]'
24+
2425

2526
# The full version, including alpha/beta/rc tags
26-
release = '0.3'
27+
release = '0.4.6'
2728

2829
# -- General configuration ---------------------------------------------------
2930

@@ -70,5 +71,8 @@
7071

7172
autodoc_default_flags = ['members']
7273
autosummary_generate = True
74+
autodoc_inherit_docstrings = False
7375
autodoc_typehints = 'description'
7476
autodoc_typehints_format = 'short'
77+
autodoc_member_order = 'bysource'
78+
master_doc = 'index'

docs/extensions.rst

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
Extensions
2+
==========
3+
4+
Transports
5+
----------
6+
7+
TCP
8+
~~~
9+
10+
.. automodule:: rsocket.transports.tcp
11+
:members:
12+
13+
Websocket
14+
~~~~~~~~~
15+
16+
aiohttp
17+
+++++++
18+
19+
.. automodule:: rsocket.transports.aiohttp_websocket
20+
:members:
21+
22+
quart
23+
+++++
24+
25+
.. automodule:: rsocket.transports.quart_websocket
26+
:members:
27+
28+
quic
29+
~~~~
30+
31+
.. automodule:: rsocket.transports.aioquic_transport
32+
:members:
33+
34+
http3
35+
~~~~~
36+
37+
.. automodule:: rsocket.transports.http3_transport
38+
:members:
39+
40+
Routing
41+
-------
42+
43+
RequestRouter
44+
~~~~~~~~~~~~~
45+
46+
.. automodule:: rsocket.routing.request_router
47+
:members:
48+
49+
RoutingRequestHandler
50+
~~~~~~~~~~~~~~~~~~~~~
51+
52+
.. automodule:: rsocket.routing.routing_request_handler
53+
:members:

docs/guide.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Guide
2+
=====
3+
4+
.. autosummary::
5+
:toctree: generated
6+
7+
A detailed getting started guide is available at https://rsocket.io/guides/rsocket-py/tutorial/
8+

docs/index.rst

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
.. Dataclasses Serialization documentation master file, created by
2-
sphinx-quickstart on Fri Apr 22 11:01:09 2022.
3-
You can adapt this file completely to your liking, but it should at least
4-
contain the root `toctree` directive.
1+
.. rsocket documentation master file
52
63
RSocket
74
=======
@@ -10,14 +7,21 @@ RSocket
107
:maxdepth: 1
118

129
quickstart
10+
guide
1311
api
12+
extensions
1413
changelog
1514

1615
.. autosummary::
1716
:toctree: generated
1817

1918

20-
RSocket ...
19+
The python rsocket package implements the 1.0 version of the RSocket protocol (excluding "resume" functionality)
20+
and is designed for use in python >= 3.8 using asyncio.
21+
22+
.. note::
23+
The python package API is not stable. There may be changes until version 1.0.0.
24+
2125

2226
Indices and tables
2327
==================

docs/quickstart.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
Quick start
22
===========
33

4-
.. automodule:: rsocket.rsocket
5-
:members:
4+
.. autosummary::
5+
:toctree: generated
6+
7+
8+
A quick getting started guide is available at https://rsocket.io/guides/rsocket-py/simple

reactivestreams/publisher.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55

66
class Publisher(metaclass=abc.ABCMeta):
7+
"""
8+
Handles event for subscription to a subscriber
9+
"""
10+
711
@abc.abstractmethod
812
def subscribe(self, subscriber: Subscriber):
913
...

reactivestreams/subscriber.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55

66

77
class Subscriber(metaclass=ABCMeta):
8+
"""
9+
Handles stream events.
10+
"""
11+
812
@abstractmethod
913
def on_subscribe(self, subscription: Subscription):
1014
...

reactivestreams/subscription.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33

44
class Subscription(metaclass=ABCMeta):
5+
"""
6+
Backpressure stream control.
7+
"""
8+
59
@abstractmethod
610
def request(self, n: int):
711
...

0 commit comments

Comments
 (0)