Skip to main content

A set of third-party serializers for Betamax

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, ...)

0.2.1 - 2019-07-27

  • Fix bug in YAMLSerializer to work with new files

0.2.0 - 2016-04-12

  • Add YAMLSerializer and yaml11 extra for installation

0.1.0 - 2015-06-21

  • Add PrettyJSONSerializer

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

betamax-serializers-0.2.1.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

betamax_serializers-0.2.1-py2.py3-none-any.whl (4.2 kB view details)

Uploaded Python 2 Python 3

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:
  • 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
MD5 2d959013419cc9a7e4c1abf2e735e1df
BLAKE2b-256 1941bb325c131204a3feb7f4cf1611d38e6fa676a31615e9513427b115bb0cfa

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:
  • 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
MD5 0e1f99dc912e6a25a245fcf14dbc61ad
BLAKE2b-256 90729bfb9eabcd19246d377ed05067e7a8c07a41817c7a87c76779700de86fe1

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