griffe


Namegriffe JSON
Version 1.5.1 PyPI version JSON
download
home_pageNone
SummarySignatures for entire Python programs. Extract the structure, the frame, the skeleton of your project, to generate API documentation or find breaking changes in your API.
upload_time2024-10-18 13:40:37
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseISC
keywords api signature breaking-changes static-analysis dynamic-analysis
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Griffe

[![ci](https://github.com/mkdocstrings/griffe/workflows/ci/badge.svg)](https://github.com/mkdocstrings/griffe/actions?query=workflow%3Aci)
[![documentation](https://img.shields.io/badge/docs-mkdocs-708FCC.svg?style=flat)](https://mkdocstrings.github.io/griffe/)
[![pypi version](https://img.shields.io/pypi/v/griffe.svg)](https://pypi.org/project/griffe/)
[![gitpod](https://img.shields.io/badge/gitpod-workspace-708FCC.svg?style=flat)](https://gitpod.io/#https://github.com/mkdocstrings/griffe)
[![gitter](https://badges.gitter.im/join%20chat.svg)](https://app.gitter.im/#/room/#mkdocstrings_griffe:gitter.im)

<img src="logo.svg" alt="Griffe logo, created by François Rozet &lt;francois.rozet@outlook.com&gt;" style="float: right; max-width: 200px; margin: 0 15px;">

Signatures for entire Python programs. Extract the structure, the frame, the skeleton of your project, to generate API documentation or find breaking changes in your API.

Griffe, pronounced "grif" (`/ɡʁif/`), is a french word that means "claw",
but also "signature" in a familiar way. "On reconnaît bien là sa griffe."

- [User guide](https://mkdocstrings.github.io/griffe/guide/users/)
- [Contributor guide](https://mkdocstrings.github.io/griffe/guide/contributors/)
- [API reference](https://mkdocstrings.github.io/griffe/reference/api/)

## Installation

```bash
pip install griffe
```

With [`uv`](https://docs.astral.sh/uv/):

```bash
uv tool install griffe
```

## Usage

### Dump JSON-serialized API

**On the command line**, pass the names of packages to the `griffe dump` command:

```console
$ griffe dump httpx fastapi
{
  "httpx": {
    "name": "httpx",
    ...
  },
  "fastapi": {
    "name": "fastapi",
    ...
  }
}
```

See the [Serializing chapter](https://mkdocstrings.github.io/griffe/guide/users/serializing/) for more examples.

### Check for API breaking changes

Pass a relative path to the `griffe check` command:

```console
$ griffe check mypackage --verbose
mypackage/mymodule.py:10: MyClass.mymethod(myparam):
Parameter kind was changed:
  Old: positional or keyword
  New: keyword-only
```

For `src` layouts:

```console
$ griffe check --search src mypackage --verbose
src/mypackage/mymodule.py:10: MyClass.mymethod(myparam):
Parameter kind was changed:
  Old: positional or keyword
  New: keyword-only
```

It's also possible to directly **check packages from PyPI.org**
(or other indexes configured through `PIP_INDEX_URL`). 
This feature is [available to sponsors only](https://mkdocstrings.github.io/griffe/insiders/)
and requires that you install Griffe with the `pypi` extra:

```bash
pip install griffe[pypi]
```

The command syntax is:

```bash
griffe check package_name -b project-name==2.0 -a project-name==1.0
```

See the [Checking chapter](https://mkdocstrings.github.io/griffe/guide/users/checking/) for more examples.

### Load and navigate data with Python

**With Python**, loading a package:

```python
import griffe

fastapi = griffe.load("fastapi")
```

Finding breaking changes:

```python
import griffe

previous = griffe.load_git("mypackage", ref="0.2.0")
current = griffe.load("mypackage")

for breakage in griffe.find_breaking_changes(previous, current):
    ...
```

See the [Loading chapter](https://mkdocstrings.github.io/griffe/guide/users/loading/) for more examples.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "griffe",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "api, signature, breaking-changes, static-analysis, dynamic-analysis",
    "author": null,
    "author_email": "=?utf-8?q?Timoth=C3=A9e_Mazzucotelli?= <dev@pawamoy.fr>",
    "download_url": "https://files.pythonhosted.org/packages/d4/c9/8167810358ca129839156dc002526e7398b5fad4a9d7b6e88b875e802d0d/griffe-1.5.1.tar.gz",
    "platform": null,
    "description": "# Griffe\n\n[![ci](https://github.com/mkdocstrings/griffe/workflows/ci/badge.svg)](https://github.com/mkdocstrings/griffe/actions?query=workflow%3Aci)\n[![documentation](https://img.shields.io/badge/docs-mkdocs-708FCC.svg?style=flat)](https://mkdocstrings.github.io/griffe/)\n[![pypi version](https://img.shields.io/pypi/v/griffe.svg)](https://pypi.org/project/griffe/)\n[![gitpod](https://img.shields.io/badge/gitpod-workspace-708FCC.svg?style=flat)](https://gitpod.io/#https://github.com/mkdocstrings/griffe)\n[![gitter](https://badges.gitter.im/join%20chat.svg)](https://app.gitter.im/#/room/#mkdocstrings_griffe:gitter.im)\n\n<img src=\"logo.svg\" alt=\"Griffe logo, created by Fran\u00e7ois Rozet &lt;francois.rozet@outlook.com&gt;\" style=\"float: right; max-width: 200px; margin: 0 15px;\">\n\nSignatures for entire Python programs. Extract the structure, the frame, the skeleton of your project, to generate API documentation or find breaking changes in your API.\n\nGriffe, pronounced \"grif\" (`/\u0261\u0281if/`), is a french word that means \"claw\",\nbut also \"signature\" in a familiar way. \"On reconna\u00eet bien l\u00e0 sa griffe.\"\n\n- [User guide](https://mkdocstrings.github.io/griffe/guide/users/)\n- [Contributor guide](https://mkdocstrings.github.io/griffe/guide/contributors/)\n- [API reference](https://mkdocstrings.github.io/griffe/reference/api/)\n\n## Installation\n\n```bash\npip install griffe\n```\n\nWith [`uv`](https://docs.astral.sh/uv/):\n\n```bash\nuv tool install griffe\n```\n\n## Usage\n\n### Dump JSON-serialized API\n\n**On the command line**, pass the names of packages to the `griffe dump` command:\n\n```console\n$ griffe dump httpx fastapi\n{\n  \"httpx\": {\n    \"name\": \"httpx\",\n    ...\n  },\n  \"fastapi\": {\n    \"name\": \"fastapi\",\n    ...\n  }\n}\n```\n\nSee the [Serializing chapter](https://mkdocstrings.github.io/griffe/guide/users/serializing/) for more examples.\n\n### Check for API breaking changes\n\nPass a relative path to the `griffe check` command:\n\n```console\n$ griffe check mypackage --verbose\nmypackage/mymodule.py:10: MyClass.mymethod(myparam):\nParameter kind was changed:\n  Old: positional or keyword\n  New: keyword-only\n```\n\nFor `src` layouts:\n\n```console\n$ griffe check --search src mypackage --verbose\nsrc/mypackage/mymodule.py:10: MyClass.mymethod(myparam):\nParameter kind was changed:\n  Old: positional or keyword\n  New: keyword-only\n```\n\nIt's also possible to directly **check packages from PyPI.org**\n(or other indexes configured through `PIP_INDEX_URL`). \nThis feature is [available to sponsors only](https://mkdocstrings.github.io/griffe/insiders/)\nand requires that you install Griffe with the `pypi` extra:\n\n```bash\npip install griffe[pypi]\n```\n\nThe command syntax is:\n\n```bash\ngriffe check package_name -b project-name==2.0 -a project-name==1.0\n```\n\nSee the [Checking chapter](https://mkdocstrings.github.io/griffe/guide/users/checking/) for more examples.\n\n### Load and navigate data with Python\n\n**With Python**, loading a package:\n\n```python\nimport griffe\n\nfastapi = griffe.load(\"fastapi\")\n```\n\nFinding breaking changes:\n\n```python\nimport griffe\n\nprevious = griffe.load_git(\"mypackage\", ref=\"0.2.0\")\ncurrent = griffe.load(\"mypackage\")\n\nfor breakage in griffe.find_breaking_changes(previous, current):\n    ...\n```\n\nSee the [Loading chapter](https://mkdocstrings.github.io/griffe/guide/users/loading/) for more examples.\n",
    "bugtrack_url": null,
    "license": "ISC",
    "summary": "Signatures for entire Python programs. Extract the structure, the frame, the skeleton of your project, to generate API documentation or find breaking changes in your API.",
    "version": "1.5.1",
    "project_urls": {
        "Changelog": "https://mkdocstrings.github.io/griffe/changelog",
        "Discussions": "https://github.com/mkdocstrings/griffe/discussions",
        "Documentation": "https://mkdocstrings.github.io/griffe",
        "Funding": "https://github.com/sponsors/pawamoy",
        "Gitter": "https://gitter.im/mkdocstrings/griffe",
        "Homepage": "https://mkdocstrings.github.io/griffe",
        "Issues": "https://github.com/mkdocstrings/griffe/issues",
        "Repository": "https://github.com/mkdocstrings/griffe"
    },
    "split_keywords": [
        "api",
        " signature",
        " breaking-changes",
        " static-analysis",
        " dynamic-analysis"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ab00e693a155da0a2a72fd2df75b8fe338146cae59d590ad6f56800adde90cb5",
                "md5": "fac5067611a510d929b91bbe21db00e1",
                "sha256": "ad6a7980f8c424c9102160aafa3bcdf799df0e75f7829d75af9ee5aef656f860"
            },
            "downloads": -1,
            "filename": "griffe-1.5.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fac5067611a510d929b91bbe21db00e1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 127132,
            "upload_time": "2024-10-18T13:40:34",
            "upload_time_iso_8601": "2024-10-18T13:40:34.353940Z",
            "url": "https://files.pythonhosted.org/packages/ab/00/e693a155da0a2a72fd2df75b8fe338146cae59d590ad6f56800adde90cb5/griffe-1.5.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d4c98167810358ca129839156dc002526e7398b5fad4a9d7b6e88b875e802d0d",
                "md5": "36f3f0261ed5f4181023ddd66720d8ee",
                "sha256": "72964f93e08c553257706d6cd2c42d1c172213feb48b2be386f243380b405d4b"
            },
            "downloads": -1,
            "filename": "griffe-1.5.1.tar.gz",
            "has_sig": false,
            "md5_digest": "36f3f0261ed5f4181023ddd66720d8ee",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 384113,
            "upload_time": "2024-10-18T13:40:37",
            "upload_time_iso_8601": "2024-10-18T13:40:37.466858Z",
            "url": "https://files.pythonhosted.org/packages/d4/c9/8167810358ca129839156dc002526e7398b5fad4a9d7b6e88b875e802d0d/griffe-1.5.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-18 13:40:37",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mkdocstrings",
    "github_project": "griffe",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "griffe"
}
        
Elapsed time: 0.35379s