Skip to main content

inari

Write docstrings in Markdown!

Features

  • Minimum configuration.
  • No dependencies by default(but MkDocs is recommended!).
  • CLI and MkDocs Plugin.
  • Cross reference in API documents.

Install

pip install inari[mkdocs]

Example

# sample.py
"""This is a sample module."""

variable = 42
"""(`int`):  Docstrings for module-level variables."""

def func(foo: str, bar: int) -> str:
    """
    Docstrings for functions.

    **Args**

    * foo (`str`): First argument.
    * bar (`int`): Second argument.

    **Returns**

    * `str`: Type of return value.

    """
    return foo * bar

class SampleClass:
    """
    Class docstrings.

    **Attributes**

    * baz (`str`): Docstrings for attributes.

    """
    baz: str

    def __init__(self, b: str):
        """
        **Args**

        * b (`str`): Arguments for initializing.

        """

        self.baz = b

    def method(self, bar: int) -> str:
        """
        Method docstrings.

        Cross reference available. `sample.func`

        **Args**

        * bar(`int`)

        **Returns**

        * `str`

        """
        return func(self.baz, bar)
inari sample docs

inari makes this Markdown file:

<!-- docs/sample-py.md -->

# Module sample

This is a sample module.

## Variables

- **variable**{: #variable } (`int`): Docstrings for module-level variables.

## Classes

### SampleClass {: #SampleClass }

```python
class SampleClass(self, b: str)
```

Class docstrings.

**Attributes**

- **baz** (`str`): Docstrings for attributes.

**Args**

- **b** (`str`): Arguments for initializing.

---

#### Methods {: #SampleClass-methods }

[**method**](#SampleClass.method){: #SampleClass.method }

```python
def method(self, bar: int) -> str
```

Method docstrings.

Cross reference available. [`func `](#func)

**Args**

- **bar** (`int`)

**Returns**

- `str`

## Functions

### func {: #func }

```python
def func(foo: str, bar: int) -> str
```

Docstrings for functions.

**Args**

- **foo** (`str`): First argument.
- **bar** (`int`): Second argument.

**Returns**

- `str`: Type of return value.

License

MIT

Metadata

Release files for inari 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for inari 0.2.1
File Size Uploaded
inari-0.2.1.tar.gz 11.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for inari 0.2.1
File Interpreter ABI Platform
inari-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 24.1 kB

Release files / inari-0.2.1.tar.gz

Download URL inari-0.2.1.tar.gz
Size 11.6 kB
Tags Source
SHA-256 checksum
How to use checksums
2f0974db2fe64403f2a2d43a4484c194db48f4b76b366c70324b604f309f9eed
BLAKE2b-256 checksum
How to use checksums
75d0267f01e102665f5858d748154205da2152042b94fd2ab852ccc21ffbe177
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.7 CPython/3.9.6 Linux/5.4.0-77-generic

Release files / inari-0.2.1-py3-none-any.whl

Download URL inari-0.2.1-py3-none-any.whl
Size 12.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
edda3334e07125c38221f53a5fb0a6ab6e98948f9c6c156a7e2f7bc4907c5d5d
BLAKE2b-256 checksum
How to use checksums
d56086478ee94ebe40a67ac5ff5f2ebd5f0900f896b0855de679244b1958f96e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.7 CPython/3.9.6 Linux/5.4.0-77-generic

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page