Skip to main content

No project description provided

Project description

Zapy REST client

Zapy is a Rest API client based on Python technologies. It aims to solve the duplication issue on integration testing.


Documentation: https://docs.zapy.dev

Github repo: https://github.com/ZapyLabs/zapy-sdk

FAQ: https://zapy.dev/faq


Main feature:

  • You can use python on your requests and import any script or library.
  • Your request files can be imported and executed in python.
  • As it's used with pytest, it's ready for CI/CD and can be combined with Playwright or any other library.
  • It's file based so it's git ready.
  • It uses Jinja2 or Python syntax.
  • Rapid development using low code user interface.
  • Request chaining powered by Jupyter Notebooks.

Usage

Install the python library under a virtual environment.

pip install zapy-sdk

Install the VSCode Extension. Create a .zapy file, for example my_first_request.zapy and open it using VSCode.

Requests

Integrated on VSCode using an extension.

first look

Stores

Stores enable the persistence and inspection of Python data for use in multiple requests, including the creation and management of environment variables.

stores

Hooks

Hooks can be global or request-specific, allowing interception and modification of requests, such as for authentication.

from zapy.requests import hooks, HttpxArguments

@hooks.pre_request
async def on_each_request(httpx_args: HttpxArguments):
    httpx_args['auth'] = ('alice', 'ecila123')
    print(httpx_args)

Chaining

Chaining runs a sequence of requests with one click, using responses from one request in the next. It also offers the ability to use conditionals or to resume from a failed step.

chaining

Integration test

Requests and their tests can be invoked directly on your scripts or tests.

from pathlib import Path
import pytest

from zapy import requests
from zapy.utils import module


@pytest.mark.asyncio
async def test_single():
    request = requests.from_path("request1.zapy")
    response = await request.send()
    response.json()

@pytest.mark.asyncio
async def test_chain(self):
    rel_path = Path('tests/assets')
    chain = await module.load_ipynb(
        rel_path / 'chain_import.ipynb',
        variables={
            'rel_path': rel_path
        },
    )

Privacy

Data for authentication is collected when using the Zapy VSCode Extension. No personal or request data is collected.

License

The Zapy SDK is licensed under the terms of the Business Source License 1.1 (BSL). The Zapy VSCode Extension is under End User Service Agreement.

By installing or running this software you expressly agree with the terms of use.

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

zapy_sdk-0.0.1a0.tar.gz (103.5 kB view details)

Uploaded Source

Built Distribution

zapy_sdk-0.0.1a0-py3-none-any.whl (28.9 kB view details)

Uploaded Python 3

File details

Details for the file zapy_sdk-0.0.1a0.tar.gz.

File metadata

  • Download URL: zapy_sdk-0.0.1a0.tar.gz
  • Upload date:
  • Size: 103.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for zapy_sdk-0.0.1a0.tar.gz
Algorithm Hash digest
SHA256 88e9d1eac95ac130f6d17a45a30660d2e6a441827cc4fafb96ea92c5055fca2d
MD5 7606b72e572f497f63c6131d7faab9e1
BLAKE2b-256 a0b405f57c06df5a2b237095d2c8dad39a3460ce43c6f3a48d206a4f05138e07

See more details on using hashes here.

File details

Details for the file zapy_sdk-0.0.1a0-py3-none-any.whl.

File metadata

  • Download URL: zapy_sdk-0.0.1a0-py3-none-any.whl
  • Upload date:
  • Size: 28.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for zapy_sdk-0.0.1a0-py3-none-any.whl
Algorithm Hash digest
SHA256 5358ddca86a32c4f0896006e2639e3dd5e1e84a7cbce227830c556284e14e94f
MD5 fb015dcad6a69aee27324ab71e0c9069
BLAKE2b-256 983e65b6aedfca6551bd6cf90f50638e763a43596a1a9b43403c15e4361b92dc

See more details on using hashes here.

Supported by

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