# allure-python-commons

> Contains the API for end users as well as helper functions and classes to build Allure adapters for Python test frameworks

- **URL**: https://www.freshcrate.ai/projects/allure-python-commons
- **Author**: Qameta Software Inc.
- **Category**: Frameworks
- **Latest version**: `2.16.0` (2026-04-27)
- **License**: Apache-2.0
- **Source**: https://github.com/allure-framework/allure-python
- **Homepage**: https://allurereport.org/
- **Language**: Python
- **GitHub**: 803 stars, 255 forks
- **Registry**: pypi (`allure-python-commons`)
- **Tags**: `allure`, `pypi`, `report-engine`, `reporting`

## Description

## Allure Common API

[![Release Status](https://img.shields.io/pypi/v/allure-python-commons)](https://pypi.python.org/pypi/allure-python-commons)
[![Downloads](https://img.shields.io/pypi/dm/allure-python-commons)](https://pypi.python.org/pypi/allure-python-commons)

> The package contains classes and functions for users of Allure Report. It can
> be used to enhance reports using an existing Allure adapter or to create new
> adapters.

[<img src="https://allurereport.org/public/img/allure-report.svg" height="85px" alt="Allure Report logo" align="right" />](https://allurereport.org "Allure Report")

- Learn more about Allure Report at [https://allurereport.org](https://allurereport.org)
- 📚 [Documentation](https://allurereport.org/docs/) – discover official documentation for Allure Report
- ❓ [Questions and Support](https://github.com/orgs/allure-framework/discussions/categories/questions-support) – get help from the team and community
- 📢 [Official announcements](https://github.com/orgs/allure-framework/discussions/categories/announcements) –  stay updated with our latest news and updates
- 💬 [General Discussion](https://github.com/orgs/allure-framework/discussions/categories/general-discussion) – engage in casual conversations, share insights and ideas with the community
- 🖥️ [Live Demo](https://demo.allurereport.org/) — explore a live example of Allure Report in action

---

## User's API

Install an adapter that suits your test framework. You can then add more
information to the report by using functions from the `allure` module.

### Decorators API

Use these functions as decorators of your own functions, e.g.:

```python
import allure

@allure.title("My test")
def test_fn():
    pass
```

The full list of decorators:

  - `allure.title`
  - `allure.description`
  - `allure.description_html`
  - `allure.label`
  - `allure.severity`
  - `allure.epic`
  - `allure.feature`
  - `allure.story`
  - `allure.suite`
  - `allure.parent_suite`
  - `allure.sub_suite`
  - `allure.tag`
  - `allure.id`
  - `allure.manual`
  - `allure.link`
  - `allure.issue`
  - `allure.testcase`
  - `allure.step`

Refer to the adapter's documentation for the information about what decorators
are supported and what functions they can be applied to.

### Runtime API

Most of the functions of Runtime API can be accessed via `allure.dynamic.*`.
Call them at runtime from your code.

The full list includes:

  - `allure.dynamic.title`
  - `allure.dynamic.description`
  - `allure.dynamic.description_html`
  - `allure.dynamic.label`
  - `allure.dynamic.severity`
  - `allure.dynamic.epic`
  - `allure.dynamic.feature`
  - `allure.dynamic.story`
  - `allure.dynamic.suite`
  - `allure.dynamic.parent_suite`
  - `allure.dynamic.sub_suite`
  - `allure.dynamic.tag`
  - `allure.dynamic.id`
  - `allure.dynamic.manual`
  - `allure.dynamic.link`
  - `allure.dynamic.issue`
  - `allure.dynamic.testcase`
  - `allure.dynamic.parameter`
  - `allure.attach`
  - `allure.attach.file`
  - `allure.step`

Refer to the adapter's documentation for the information about what functions
are supported and where you can use them.

## Adapter API

You may use `allure-pytest-commons` to build your own Allure adapter. The key
elements of the corresponding API are:

  - `allure_python_commons.model2`: the object model of Allure Report.
  - `allure_python_commons.logger`: classes that are used to emit Allure Report objects (tests, containers, attachments):
      - `AllureFileLogger`: emits to the file system.
      - `AllureMemoryLogger`: collects the objects in memory. Useful for
        testing.
  - `allure_python_commons.lifecycle.AllureLifecycle`: an implementation of
    Allure lifecycle that doesn't isolate the state between threads.
  - `allure_python_commons.reporter.AllureReporter`: an implementation of
    Allure lifecycle that supports some multithreaded scenarios.

A new version of the API is likely to be released in the future as we need
a decent support for multithreaded and async-based concurrency (see
[here](https://github.com/allure-framework/allure-python/issues/697) and
[here](https://github.com/allure-framework/allure-python/issues/720)).

## Recent releases

| Version | Date | Urgency | Changes |
| --- | --- | --- | --- |
| `2.16.0` | 2026-04-27 | High | ## 🚀 New Features  * New API for global errors and attachments (via #904) - @delatrie  ## 👻 Internal Changes  * Fix ModuleNotFoundError when creating distributions with setup.py (via #905) - @delatrie * chore(ci): test pytest v9 (via #893) - @kieran-ryan * Python linting through `ruff` (via #888) - @kieran-ryan  ## 👀 Links  [Commits since 2.15.3](https://github.com/allure-framework/allure-python/compare/2.15.3...master) |
| `2.15.3` | 2026-04-21 | Low | Imported from PyPI (2.15.3) |
| `2.15.2` | 2025-11-28 | Low | * Set testCaseId for all test results produced by allure_robotframework (via #884) - @delatrie  ## 👀 Links  [Commits since 2.15.1](https://github.com/allure-framework/allure-python/compare/2.15.1...master) |
| `2.15.1` | 2025-11-28 | Low | * Set testCaseId for all test results produced by allure_behave (via #883) - @delatrie * Add workflow-wide gh actions permissions (via #875) - @epszaw  ## 👀 Links  [Commits since 2.15.0](https://github.com/allure-framework/allure-python/compare/2.15.0...master) |
| `2.15.0` | 2025-07-22 | Low | ## 🚀 New Features  * feat: add titlePath to results generated by all allure-python integrations (via #870) - @delatrie  ## 🐞 Bug Fixes  * fix(pytest): properly include nested classes in fullName, historyId, testCaseId, and subSuite (via #869) - @delatrie  ## 👀 Links  [Commits since 2.14.3](https://github.com/allure-framework/allure-python/compare/2.14.3...master) |
| `2.14.3` | 2025-06-09 | Low | ## 🔬 Improvements  * Don't convert built-in (reserved) pytest markers to allure tags (fix #817) (via #862) - @sharovd  ## 🐞 Bug Fixes  * fix(pytest): can't change a fixture's title in pytest 8.4 or later (via #866) - @delatrie  ## 👀 Links  [Commits since 2.14.2](https://github.com/allure-framework/allure-python/compare/2.14.2...master) |
| `2.14.2` | 2025-05-06 | Low | This release fixes a couple of issues with Allure Behave.  ## 🐞 Bug Fixes  * extra test results generated after consecutive in-process runs of Behave (#858, via #860) - @delatrie * AttributeError is raised if Allure Behave is set up via AllureHooks (#629, via #860) - @delatrie  ## 👀 Links  [Commits since 2.14.1](https://github.com/allure-framework/allure-python/compare/2.14.1...master) |
| `2.14.1` | 2025-04-28 | Low | * Set the correct detail message for passed steps (fix #835) (via #853) - @sharovd  ## 👀 Links  [Commits since 2.14.0](https://github.com/allure-framework/allure-python/compare/2.14.0...master) |
| `2.14.0` | 2025-04-03 | Low | ## 🚀 New Features  * **allure-pytest-bdd:** the Allure API is now fully supported (implements #726 via #845) - @delatrie * **allure-pytest-bdd:** expected failures (xfail) are supported (via #845) - @delatrie * **allure-pytest-bdd:** steps can be renamed at runtime with `@allure.title` (implements #737 via #845) - @delatrie * **allure-pytest-bdd:** gherkin tags are converted to test result tags (via #845) - @delatrie * **allure-pytest-bdd:** fill test result descriptions from feature and |
| `2.13.5` | 2024-04-01 | Low | ## 🐞 Bug fixes  * Replace version comparison with duck-style checks (fix #802) (via #803) - @delatrie  ## 👀 Links  [Commits since 2.13.4](https://github.com/allure-framework/allure-python/compare/2.13.4...master) |

## Dependency audit

- **Score**: 100/100
- **Total deps**: 0
- **Resolved**: 0
- **Unresolved**: 0
- **License conflicts**: 0
- **Warnings**: 0
- **Scanned**: 2026-05-18

## Citation

- HTML: https://www.freshcrate.ai/projects/allure-python-commons
- Markdown: https://www.freshcrate.ai/projects/allure-python-commons.md
- Dependencies JSON: https://www.freshcrate.ai/api/projects/allure-python-commons/deps

_Generated by freshcrate.ai. Indexes pypi releases for AI-agent ecosystem packages._
