Metadata-Version: 2.1
Name: hypothesis-jsonrpc
Version: 2.0.0
Summary: Hypothesis strategy to generate JSON-RPC 2.0
Home-page: https://github.com/macheins/hypothesis-jsonrpc
License: UNKOWN
Author: macheins
Requires-Python: >=3.5,<4.0
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved
Classifier: License :: OSI Approved :: MirOS License (MirOS)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Software Development :: Testing
Requires-Dist: hypothesis (>=3.71,<4.0)
Requires-Dist: hypothesis-json (>=1.2,<2.0)
Description-Content-Type: text/markdown

# hypothesis-jsonrpc

This Python package provides a [Hypothesis](https://pypi.org/project/hypothesis/) strategy to generate Python objects compliant to the [JSON-RPC 2.0 Specification](https://www.jsonrpc.org/specification) to uncover unhandled edge cases in your code.

## Example

```python
>>> from pprint import pprint
>>> from hypothesis_jsonrpc.strategies import requests
>>> pprint(requests().example())
{'id': 29028,
 'jsonrpc': '2.0',
 'method': "\U000db1d5\U0004cabb'\x03",
 'params': {'-105.0': {},
            'Infinity': ['false', -1677172375.0, -inf],
            'nan': [19940.0]}}
```

## Installation

The package is published to the [Python Package Index (PyPI)](https://pypi.org/project/hypothesis-jsonrpc/) and may be installed using your favorite installer, e.g.:
```sh
pip install hypothesis-jsonrpc
```

## Remarks

- So far, only requests, not responses, can be generated
- Invalid requests are generated by mutating valid requests and are guranteed to be JSON compliant
- Generated numbers are guaranteed to be processable as [double-precision floating-point numbers](https://en.wikipedia.org/wiki/Double-precision_floating-point_format)
- The non-standard constants supported by [Python's json module](https://docs.python.org/3/library/json.html) may also be generated, but are disabled by default

## Status & Versioning

Although this is a very young project, it was developed with a strong focus on quality and should be suitable for use in production environments. Versioning of releases will strictly follow the [Semantic Versioning Specification (SemVer)](https://semver.org).

## Licensing

This project may be licensed under the terms of the [OSI](https://opensource.org/licenses/alphabetical) approved [MirOS License](https://www.mirbsd.org/MirOS-Licence.htm).

