jj-district42


Namejj-district42 JSON
Version 1.2.2 PyPI version JSON
download
home_pagehttps://github.com/jj-mock/jj-district42
SummaryNone
upload_time2024-10-13 15:10:53
maintainerNone
docs_urlNone
authorNikita Tsvetkov
requires_python>=3.8
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements d42 jj niltype th
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # jj-district42

⚠️ This package has been renamed to [jj-d42](https://pypi.org/project/jj-d42/). The [jj-district42](https://pypi.org/project/jj-district42/) package on PyPI is no longer maintained. For updates and improvements, please use [jj-d42](https://pypi.org/project/jj-d42/) going forward.

[![PyPI](https://img.shields.io/pypi/v/jj-district42.svg?style=flat-square)](https://pypi.python.org/pypi/jj-district42/)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/jj-district42?style=flat-square)](https://pypi.python.org/pypi/jj-district42/)
[![Python Version](https://img.shields.io/pypi/pyversions/jj-district42.svg?style=flat-square)](https://pypi.python.org/pypi/jj-district42/)


## Installation

```sh
pip3 install jj-district42
```

## Usage

```python
import jj
import httpx
from jj.mock import mocked
from jj_district42 import HistorySchema
from valera import validate_or_fail


matcher = jj.match("GET", "/users")
response = jj.Response(status=200, json=[])

with mocked(matcher, response) as mock:
    resp = httpx.get("http://localhost:8080/users", params={"user_id": 1})

assert validate_or_fail(
    HistorySchema % [
        {
            "request": {
                "method": "GET",
                "path": "/users",
                "params": {"user_id": "1"},
            }
        }
    ],
    mock.history
)
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jj-mock/jj-district42",
    "name": "jj-district42",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Nikita Tsvetkov",
    "author_email": "tsv1@fastmail.com",
    "download_url": "https://files.pythonhosted.org/packages/f1/ff/975f43833f9552770ae33acfe0c726ae500c47f132c1faa0b85382458dee/jj_district42-1.2.2.tar.gz",
    "platform": null,
    "description": "# jj-district42\n\n\u26a0\ufe0f This package has been renamed to [jj-d42](https://pypi.org/project/jj-d42/). The [jj-district42](https://pypi.org/project/jj-district42/) package on PyPI is no longer maintained. For updates and improvements, please use [jj-d42](https://pypi.org/project/jj-d42/) going forward.\n\n[![PyPI](https://img.shields.io/pypi/v/jj-district42.svg?style=flat-square)](https://pypi.python.org/pypi/jj-district42/)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/jj-district42?style=flat-square)](https://pypi.python.org/pypi/jj-district42/)\n[![Python Version](https://img.shields.io/pypi/pyversions/jj-district42.svg?style=flat-square)](https://pypi.python.org/pypi/jj-district42/)\n\n\n## Installation\n\n```sh\npip3 install jj-district42\n```\n\n## Usage\n\n```python\nimport jj\nimport httpx\nfrom jj.mock import mocked\nfrom jj_district42 import HistorySchema\nfrom valera import validate_or_fail\n\n\nmatcher = jj.match(\"GET\", \"/users\")\nresponse = jj.Response(status=200, json=[])\n\nwith mocked(matcher, response) as mock:\n    resp = httpx.get(\"http://localhost:8080/users\", params={\"user_id\": 1})\n\nassert validate_or_fail(\n    HistorySchema % [\n        {\n            \"request\": {\n                \"method\": \"GET\",\n                \"path\": \"/users\",\n                \"params\": {\"user_id\": \"1\"},\n            }\n        }\n    ],\n    mock.history\n)\n```\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": null,
    "version": "1.2.2",
    "project_urls": {
        "Docs": "https://jj-mock.io/docs/integrations/d42",
        "GitHub": "https://github.com/jj-mock/jj-district42",
        "Homepage": "https://github.com/jj-mock/jj-district42"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "73394957297b4350f15273dc1c8a285e1dd4d45499a12e06e776e785b1ba3246",
                "md5": "16b75dfef810d9994b8000ad4c176e46",
                "sha256": "44aea0f042c3c3a26b310d5a47e06b4feb69302c7fb9e7b0c1fef1def2c16078"
            },
            "downloads": -1,
            "filename": "jj_district42-1.2.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "16b75dfef810d9994b8000ad4c176e46",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 35667,
            "upload_time": "2024-10-13T15:10:51",
            "upload_time_iso_8601": "2024-10-13T15:10:51.814517Z",
            "url": "https://files.pythonhosted.org/packages/73/39/4957297b4350f15273dc1c8a285e1dd4d45499a12e06e776e785b1ba3246/jj_district42-1.2.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f1ff975f43833f9552770ae33acfe0c726ae500c47f132c1faa0b85382458dee",
                "md5": "6acdc6657b390a37dad2bbe26bf5c36f",
                "sha256": "2bab3a4fad4d21058d9820f7b864675c2eaaeb353ba069dc74938fbc7d4cac1c"
            },
            "downloads": -1,
            "filename": "jj_district42-1.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "6acdc6657b390a37dad2bbe26bf5c36f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 18472,
            "upload_time": "2024-10-13T15:10:53",
            "upload_time_iso_8601": "2024-10-13T15:10:53.359565Z",
            "url": "https://files.pythonhosted.org/packages/f1/ff/975f43833f9552770ae33acfe0c726ae500c47f132c1faa0b85382458dee/jj_district42-1.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-13 15:10:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jj-mock",
    "github_project": "jj-district42",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "d42",
            "specs": [
                [
                    "<",
                    "3.0"
                ],
                [
                    ">=",
                    "2.0"
                ]
            ]
        },
        {
            "name": "jj",
            "specs": [
                [
                    "<",
                    "3.0"
                ],
                [
                    ">=",
                    "2.3.1"
                ]
            ]
        },
        {
            "name": "niltype",
            "specs": [
                [
                    "<",
                    "2.0"
                ],
                [
                    ">=",
                    "0.3"
                ]
            ]
        },
        {
            "name": "th",
            "specs": [
                [
                    "<",
                    "1.0"
                ],
                [
                    ">=",
                    "0.3"
                ]
            ]
        }
    ],
    "lcname": "jj-district42"
}
        
Elapsed time: 0.34467s