Skip to main content

Python client for the Lynqa API

Project description

pylynqa

CI Acceptance test License Python

pylynqa is a Python client for the Lynqa REST API.

Python/Lynqa connector

Lynqa is a test execution AI Agent: you describe a test (plain steps or a Gherkin scenario) and Lynqa runs it against your web application. This library provides a wrapper around the REST API, covering test run management, step inspection, screenshot retrieval, and account operations.

Disclaimers

[!IMPORTANT] This is an unofficial project. pylynqa is not affiliated with, endorsed by, or maintained by Smartesting, the company that develops Lynqa. "Lynqa" and "Smartesting" are the property of their respective owners.

[!NOTE] Lynqa is a commercial product. Using this client requires a Lynqa account and an API key, and running tests consumes paid credits. See https://my.lynqa.smartesting.com/integration to create an API key.

Requirements

  • Python 3.9+
  • A Lynqa account and API key (test executions consume credits)

Installation

pip install pylynqa

At this early stage the package may not be published on PyPI yet. In the meantime you can install it from source:

pip install git+https://github.com/petit-robot/pylynqa.git

Quick start

from pylynqa import CreateTestStep, LynqaClient

client = LynqaClient(api_key="your-api-key")

run_id = client.add_test_run(
    url="https://lemonde.fr",
    steps=[
        CreateTestStep(
            action="Go to the website",
            expected_result="The website is open",
        ),
        CreateTestStep(
            action='Search an article on "france ia"',
            expected_result='Should have an article on "IA agentique"',
        ),
    ],
    name="Smoke - Search an article",
)

status = client.get_test_run_status(run_id)
print(status["status"])  # e.g. "running"

Bruno Collection

The project provides a Bruno Collection to interact with Lynqa API. A Bruno environment named "production" was also provided in addition to the collection.

You can access the collection here.

Prerequisites

Before using this collection, make sure you have:

  • Bruno 3.4.2+
  • A valid Lynqa API Key that you get once you have a Lynqa account

Where to put your API Key

To securely use the API, you must configure your API key inside a Bruno environment.

For that you should:

  • Select the environment named "production".
  • Click on "Configure" to get access to the environment variable

In the environment variable:

  • Paste your Lynqa API Key in the Value field
  • Make sure to mark it as Secret (enable the checkbox)
  • Click Save

This ensures your API key is never exposed in Bruno files.

Collaboration

This project is at an early stage, so external contributions are limited for now. This may be opened up more broadly later as the project matures.

In the meantime, you are very welcome to open an issue to report a bug or ask any question.

License

Licensed under the Apache License 2.0.

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

pylynqa-0.1.0b3.tar.gz (59.8 kB view details)

Uploaded Source

Built Distribution

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

pylynqa-0.1.0b3-py3-none-any.whl (26.8 kB view details)

Uploaded Python 3

File details

Details for the file pylynqa-0.1.0b3.tar.gz.

File metadata

  • Download URL: pylynqa-0.1.0b3.tar.gz
  • Upload date:
  • Size: 59.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pylynqa-0.1.0b3.tar.gz
Algorithm Hash digest
SHA256 481ecc86ff021f30091da177f4baf9ed3af66666b674c74272370b08703616d8
MD5 da93f3a8053af00d64783a0540062a95
BLAKE2b-256 779b8502d349eb6644072a8cecc8dec4d33a49414e7b0831d404d6317dd248c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylynqa-0.1.0b3.tar.gz:

Publisher: release.yml on petit-robot/pylynqa

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylynqa-0.1.0b3-py3-none-any.whl.

File metadata

  • Download URL: pylynqa-0.1.0b3-py3-none-any.whl
  • Upload date:
  • Size: 26.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pylynqa-0.1.0b3-py3-none-any.whl
Algorithm Hash digest
SHA256 f424dd7b9ce2d82e7e5376ed440b2d3ca1655ce2d1796884d35bd730cb0a2100
MD5 a0aa352b23b5ae4334cbd35e41832455
BLAKE2b-256 8d02634cb95783ddc0e4836c14d7ee946739ee3a7635763743c28b789480fefa

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylynqa-0.1.0b3-py3-none-any.whl:

Publisher: release.yml on petit-robot/pylynqa

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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