Easy Python package documentation using markdown and jupyter
Project description
The easiest way to document your python library with jupyter and markdown.
Pleaes note jupydocs is currently under active development.
It can be used for testing, but should not be used for deployment.
It will change!
Installation
pip install jupydocs
Quickstart
from jupydocs.numpydocstring import NumpyDocString
def custom_sum(x, y):
"""A new take on the class `sum` function.
Does 1 + 1 always need to equal 2? Not anymore! Thanks to the `custom_sum`
function 1 + 1 will never equal 2 again.
Parameters
----------
x : float
A number.
y : float
A number.
Returns
-------
num : Float
A new take on the traditional sum function. x * 2 + y * 3. Not at all
useful. But fun!
Example
-------
>>> from examplepackage.example import custom_sum
>>> custom_sum(2, 3)
13
"""
return x * 2 + y * 3
docstring = NumpyDocString(custom_sum)
docstring.render_md()
custom_sum
A new take on the class sum
function.
Does 1 + 1 always need to equal 2? Not anymore! Thanks to the custom_sum
function 1 + 1 will never equal 2 again.
Parameters
NAME | TYPE | DESCRIPTION |
---|---|---|
x | float | A number. |
y | float | A number. |
Returns
NAME | TYPE | DESCRIPTION |
---|---|---|
num | Float | A new take on the traditional sum function. x * 2 + y * 3. Not at all useful. But fun! |
Example
>>> from examplepackage.example import custom_sum
>>> custom_sum(2, 3)
13
print(docstring.render_md(return_str=True))
## custom_sum
A new take on the class `sum` function.
Does 1 + 1 always need to equal 2? Not anymore! Thanks to the `custom_sum` function 1 + 1 will never equal 2 again.
### Parameters
| NAME | TYPE | DESCRIPTION |
|:-------|:-------|:--------------|
| x | float | A number. |
| y | float | A number. |
### Returns
| NAME | TYPE | DESCRIPTION |
|:-------|:-------|:---------------------------------------------------------------------------------------|
| num | Float | A new take on the traditional sum function. x * 2 + y * 3. Not at all useful. But fun! |
### Example
```python
>>> from examplepackage.example import custom_sum
>>> custom_sum(2, 3)
13
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
jupydocs-0.1.2.tar.gz
(6.5 kB
view hashes)