Project description
Experimental set of Serializers for Betamax that may possibly end up in the
main package.
Pretty JSON Serializer
Usage:
from betamax_serializers.pretty_json import PrettyJSONSerializer
from betamax import Betamax
import requests
Betamax . register_serializer ( PrettyJSONSerializer )
session = requests . Session ()
recorder = Betamax ( session )
with recorder . use_cassette ( 'testpretty' , serialize_with = 'prettyjson' ):
session . request ( method = method , url = url , ... )
YAML 1.1 Serializer
To use the YAML 1.1 Serializer, you must ensure that you have pyyaml
installed either by using betamax_serializer[yaml11] >= 0.2.0 as your
dependency or by explicity adding PyYAML to your list of dependencies.
Usage:
from betamax import Betamax
from betamax_serializers.yaml11 import YAMLSerializer
import requests
Betamax . register_serializer ( YAMLSerializer )
session = requests . Session ()
recorder = Betamax ( session )
with recorder . use_cassette ( 'testyaml' , serialize_with = 'yaml11' ):
session . request ( method = method , url = url , ... )
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages .
Source Distribution
Built Distribution
File details
Details for the file betamax-serializers-0.2.1.tar.gz
.
File metadata
Download URL:
betamax-serializers-0.2.1.tar.gz
Upload date: Jul 27, 2019
Size: 3.3 kB
Tags: Source
Uploaded using Trusted Publishing? No
Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
File hashes
Hashes for betamax-serializers-0.2.1.tar.gz
Algorithm
Hash digest
SHA256
345c419b1b73171f2951c62ac3c701775ac4b76e13e86464ebf0ff2a978e4949
Copy
MD5
2d959013419cc9a7e4c1abf2e735e1df
Copy
BLAKE2b-256
1941bb325c131204a3feb7f4cf1611d38e6fa676a31615e9513427b115bb0cfa
Copy
See more details on using hashes here.
File details
Details for the file betamax_serializers-0.2.1-py2.py3-none-any.whl
.
File metadata
Download URL:
betamax_serializers-0.2.1-py2.py3-none-any.whl
Upload date: Jul 27, 2019
Size: 4.2 kB
Tags: Python 2, Python 3
Uploaded using Trusted Publishing? No
Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
File hashes
Hashes for betamax_serializers-0.2.1-py2.py3-none-any.whl
Algorithm
Hash digest
SHA256
1b23c46429c40a8873682854c88d805c787c72d252f3fa0c858e9c300682ceac
Copy
MD5
0e1f99dc912e6a25a245fcf14dbc61ad
Copy
BLAKE2b-256
90729bfb9eabcd19246d377ed05067e7a8c07a41817c7a87c76779700de86fe1
Copy
See more details on using hashes here.