Skip to main content

Easy Python package documentation using markdown and jupyter

Project description

jupydocs_logo

Netlify Status

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


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)

Uploaded Source

Built Distribution

jupydocs-0.1.2-py3-none-any.whl (6.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page