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.0.tar.gz (59.7 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.0-py3-none-any.whl (26.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pylynqa-0.1.0.tar.gz
  • Upload date:
  • Size: 59.7 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.0.tar.gz
Algorithm Hash digest
SHA256 92c4ec2e10264b377439afcd01d1e1531226258859d6b37d17f8c5ebdfb8e95d
MD5 e8796dc6eef01483a55fa4d1102b2808
BLAKE2b-256 8c19562a46017e7bb8dc9b3731ce3c9e38143efbfc3bc01fecaf103ec20fcbd3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylynqa-0.1.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: pylynqa-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 26.7 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 78cbf7648b3c6264304e174f6e137970204683978832a2ec4a377138a17cb408
MD5 bfcfda8974252e218df59cb7271d05d6
BLAKE2b-256 524e7c0b7577faf9264ed056440b8e1328dd7a5760f8f70edfd31a93cb22861f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylynqa-0.1.0-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