![](https://github.com/scanapi/design/raw/main/images/github-hero-dark.png)
<p align="center">
<a href="https://codecov.io/gh/scanapi/scanapi">
<img alt="Codecov" src="https://img.shields.io/codecov/c/github/scanapi/scanapi">
</a>
<a href="https://app.circleci.com/pipelines/github/scanapi/scanapi?branch=main">
<img alt="CircleCI" src="https://img.shields.io/circleci/build/github/scanapi/scanapi">
</a>
<a href="https://github.com/scanapi/scanapi/actions/workflows/lint.yml?query=branch%3Amain">
<img alt="LintCheck" src="https://github.com/scanapi/scanapi/workflows/Lint%20check/badge.svg?event=push">
</a>
<a href="https://github.com/scanapi/scanapi/actions/workflows/run-examples.yml?query=branch%3Amain">
<img alt="Examples" src="https://github.com/scanapi/scanapi/actions/workflows/run-examples.yml/badge.svg?branch=main">
</a>
<a href="https://pypistats.org/packages/scanapi">
<img alt="Downloads Per Month" src="https://shields.io/pypi/dm/scanapi">
</a>
<a href="https://pypi.org/project/scanapi/">
<img alt="PyPI version" src="https://shields.io/pypi/v/scanapi">
</a>
<a href="https://discord.scanapi.dev">
<img alt="Discord" src="https://img.shields.io/discord/847208162993242162?color=7389D8&label=discord&logo=6A7EC2&logoColor=ffffff&style=flat-square">
</a>
</p>
A library for **your API** that provides:
- Automated Integration Testing
- Automated Live Documentation
Given an API specification, written in YAML/JSON format, ScanAPI hits the specified
endpoints, runs the test cases, and generates a detailed report of this execution - which can also
be used as the API documentation itself.
With almost no Python knowledge, the user can define endpoints to be hit, the expected behavior
for each response and will receive a full real-time diagnostic report of the API!
## Contents
- [Contents](#contents)
- [Requirements](#requirements)
- [How to install](#how-to-install)
- [Basic Usage](#basic-usage)
- [Documentation](#documentation)
- [Examples](#examples)
- [Contributing](#contributing)
## Requirements
- [pip][pip-installation]
## How to install
```bash
$ pip install scanapi
```
## Basic Usage
You will need to write the API's specification and save it as a **YAML** or **JSON** file.
For example:
```yaml
endpoints:
- name: scanapi-demo # The API's name of your API
path: http://demo.scanapi.dev/api/v1 # The API's base url
requests:
- name: list_all_users # The name of the first request
path: users/ # The path of the first request
method: get # The HTTP method of the first request
tests:
- name: status_code_is_200 # The name of the first test for this request
assert: ${{ response.status_code == 200 }} # The assertion
```
And run the scanapi command
```bash
$ scanapi run <file_path>
```
Then, the lib will hit the specified endpoints and generate a `scanapi-report.html` file with the report results.
<p align="center">
<img
src="https://raw.githubusercontent.com/scanapi/scanapi/main/images/report-print-closed.png"
width="700",
alt="An overview screenshot of the report."
>
<img
src="https://raw.githubusercontent.com/scanapi/scanapi/main/images/report-print-opened.png"
width="700"
alt="A screenshot of the report showing the request details."
>
</p>
## Documentation
The full documentation is available at [scanapi.dev][website]
## Examples
You can find complete examples at [scanapi/examples][scanapi-examples]!
This tutorial helps you to create integration tests for your REST API using ScanAPI
[![Watch the video](https://raw.githubusercontent.com/scanapi/scanapi/main/images/youtube-scanapi-tutorial.png)](https://www.youtube.com/watch?v=JIo4sA8LHco&t=2s)
## Contributing
Collaboration is super welcome! We prepared the [Newcomers Guide][newcomers-guide] to help you in the first steps. Every little bit of help counts! Feel free to create new [GitHub issues][github-issues] and interact here.
Let's build it together 🚀🚀
[github-issues]: https://github.com/scanapi/scanapi/issues
[newcomers-guide]: https://github.com/scanapi/scanapi/wiki/Newcomers
[pip-installation]: https://pip.pypa.io/en/stable/installing/
[scanapi-examples]: https://github.com/scanapi/examples
[website]: https://scanapi.dev
Raw data
{
"_id": null,
"home_page": "https://scanapi.dev/",
"name": "scanapi",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7.13,<4.0.0",
"maintainer_email": "",
"keywords": "python,scanapi,tests,end2end,endtoend,integration tests,json,apis,api rest",
"author": "The ScanAPI Organization",
"author_email": "cmaiacd@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/44/92/de769747d9781d78b97c4b073a50d193fffbb38453eb1a126a280625b4f0/scanapi-2.9.0.tar.gz",
"platform": null,
"description": "![](https://github.com/scanapi/design/raw/main/images/github-hero-dark.png)\n\n<p align=\"center\">\n <a href=\"https://codecov.io/gh/scanapi/scanapi\">\n <img alt=\"Codecov\" src=\"https://img.shields.io/codecov/c/github/scanapi/scanapi\">\n </a>\n <a href=\"https://app.circleci.com/pipelines/github/scanapi/scanapi?branch=main\">\n <img alt=\"CircleCI\" src=\"https://img.shields.io/circleci/build/github/scanapi/scanapi\">\n </a>\n <a href=\"https://github.com/scanapi/scanapi/actions/workflows/lint.yml?query=branch%3Amain\">\n <img alt=\"LintCheck\" src=\"https://github.com/scanapi/scanapi/workflows/Lint%20check/badge.svg?event=push\">\n </a>\n <a href=\"https://github.com/scanapi/scanapi/actions/workflows/run-examples.yml?query=branch%3Amain\">\n <img alt=\"Examples\" src=\"https://github.com/scanapi/scanapi/actions/workflows/run-examples.yml/badge.svg?branch=main\">\n </a>\n <a href=\"https://pypistats.org/packages/scanapi\">\n <img alt=\"Downloads Per Month\" src=\"https://shields.io/pypi/dm/scanapi\">\n </a>\n <a href=\"https://pypi.org/project/scanapi/\">\n <img alt=\"PyPI version\" src=\"https://shields.io/pypi/v/scanapi\">\n </a>\n\n <a href=\"https://discord.scanapi.dev\">\n <img alt=\"Discord\" src=\"https://img.shields.io/discord/847208162993242162?color=7389D8&label=discord&logo=6A7EC2&logoColor=ffffff&style=flat-square\">\n </a>\n</p>\n\nA library for **your API** that provides:\n\n- Automated Integration Testing\n- Automated Live Documentation\n\nGiven an API specification, written in YAML/JSON format, ScanAPI hits the specified\nendpoints, runs the test cases, and generates a detailed report of this execution - which can also\nbe used as the API documentation itself.\n\nWith almost no Python knowledge, the user can define endpoints to be hit, the expected behavior\nfor each response and will receive a full real-time diagnostic report of the API!\n\n## Contents\n\n- [Contents](#contents)\n- [Requirements](#requirements)\n- [How to install](#how-to-install)\n- [Basic Usage](#basic-usage)\n- [Documentation](#documentation)\n- [Examples](#examples)\n- [Contributing](#contributing)\n\n## Requirements\n\n- [pip][pip-installation]\n\n## How to install\n\n```bash\n$ pip install scanapi\n```\n\n## Basic Usage\n\nYou will need to write the API's specification and save it as a **YAML** or **JSON** file.\nFor example:\n\n```yaml\nendpoints:\n - name: scanapi-demo # The API's name of your API\n path: http://demo.scanapi.dev/api/v1 # The API's base url\n requests:\n - name: list_all_users # The name of the first request\n path: users/ # The path of the first request\n method: get # The HTTP method of the first request\n tests:\n - name: status_code_is_200 # The name of the first test for this request\n assert: ${{ response.status_code == 200 }} # The assertion\n```\n\nAnd run the scanapi command\n\n```bash\n$ scanapi run <file_path>\n```\n\nThen, the lib will hit the specified endpoints and generate a `scanapi-report.html` file with the report results.\n\n<p align=\"center\">\n <img\n src=\"https://raw.githubusercontent.com/scanapi/scanapi/main/images/report-print-closed.png\"\n width=\"700\",\n alt=\"An overview screenshot of the report.\"\n >\n <img\n src=\"https://raw.githubusercontent.com/scanapi/scanapi/main/images/report-print-opened.png\"\n width=\"700\"\n alt=\"A screenshot of the report showing the request details.\"\n >\n</p>\n\n## Documentation\n\nThe full documentation is available at [scanapi.dev][website]\n\n## Examples\n\nYou can find complete examples at [scanapi/examples][scanapi-examples]!\n\nThis tutorial helps you to create integration tests for your REST API using ScanAPI\n\n[![Watch the video](https://raw.githubusercontent.com/scanapi/scanapi/main/images/youtube-scanapi-tutorial.png)](https://www.youtube.com/watch?v=JIo4sA8LHco&t=2s)\n\n## Contributing\n\nCollaboration is super welcome! We prepared the [Newcomers Guide][newcomers-guide] to help you in the first steps. Every little bit of help counts! Feel free to create new [GitHub issues][github-issues] and interact here.\n\nLet's build it together \ud83d\ude80\ud83d\ude80\n\n[github-issues]: https://github.com/scanapi/scanapi/issues\n[newcomers-guide]: https://github.com/scanapi/scanapi/wiki/Newcomers\n[pip-installation]: https://pip.pypa.io/en/stable/installing/\n[scanapi-examples]: https://github.com/scanapi/examples\n[website]: https://scanapi.dev\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Automated Testing and Documentation for your REST API",
"version": "2.9.0",
"split_keywords": [
"python",
"scanapi",
"tests",
"end2end",
"endtoend",
"integration tests",
"json",
"apis",
"api rest"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6a2cc8b38da209b76489d81413b8137f9ed4ec37e5a9a6e2c736e09becba5015",
"md5": "5deeff5ce5f6b707288ab8893b87c856",
"sha256": "e1520972da464d661d946d9ef08d1cc3c759be05a8d8e2057fad1e179795a7c4"
},
"downloads": -1,
"filename": "scanapi-2.9.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5deeff5ce5f6b707288ab8893b87c856",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7.13,<4.0.0",
"size": 31040,
"upload_time": "2023-03-16T15:37:16",
"upload_time_iso_8601": "2023-03-16T15:37:16.473992Z",
"url": "https://files.pythonhosted.org/packages/6a/2c/c8b38da209b76489d81413b8137f9ed4ec37e5a9a6e2c736e09becba5015/scanapi-2.9.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4492de769747d9781d78b97c4b073a50d193fffbb38453eb1a126a280625b4f0",
"md5": "a10256bd0f577d56dd8da16ecf9389c4",
"sha256": "333d4d40a0bfcc5f5ccfdf08141deff02623325511af03421d1517281931767c"
},
"downloads": -1,
"filename": "scanapi-2.9.0.tar.gz",
"has_sig": false,
"md5_digest": "a10256bd0f577d56dd8da16ecf9389c4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7.13,<4.0.0",
"size": 26293,
"upload_time": "2023-03-16T15:37:18",
"upload_time_iso_8601": "2023-03-16T15:37:18.121447Z",
"url": "https://files.pythonhosted.org/packages/44/92/de769747d9781d78b97c4b073a50d193fffbb38453eb1a126a280625b4f0/scanapi-2.9.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-03-16 15:37:18",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "scanapi"
}