Skip to main content

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

Project description

Allure Common API

Release Status Downloads

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.

Allure Report logo


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.:

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 and here).

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

allure_python_commons-2.16.0.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

allure_python_commons-2.16.0-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file allure_python_commons-2.16.0.tar.gz.

File metadata

  • Download URL: allure_python_commons-2.16.0.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for allure_python_commons-2.16.0.tar.gz
Algorithm Hash digest
SHA256 ecdc92bafea074bab96b5f2c4eb3100825340188f5aece608ae80eced709b36f
MD5 f8718b3d5dc6a4253fe078b5d66e79c2
BLAKE2b-256 d6ad9cd9020d194bb0fff783538096cb5cfae9d714d1f63a7c542c0e92fd822f

See more details on using hashes here.

File details

Details for the file allure_python_commons-2.16.0-py3-none-any.whl.

File metadata

File hashes

Hashes for allure_python_commons-2.16.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6d42a500078aca8a2e68823075c1ffc2396987bb268d62b19af82390b205ce88
MD5 d040954ba3eeb420e49291b3aa079e5c
BLAKE2b-256 5378ddd0affa881b1e09bc59f11ab829a7904f4bca29d25c34cbb9395e8e0061

See more details on using hashes here.

Supported by

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