{
  "result": {
    "2.5.3": {
      "name": "srsly",
      "version": "2.5.3",
      "metadata_version": "2.4",
      "summary": "Modern high-performance serialization utilities for Python",
      "home_page": "https://github.com/explosion/srsly",
      "author": "Explosion",
      "author_email": "contact@explosion.ai",
      "maintainer": "",
      "maintainer_email": "",
      "license": "MIT",
      "description": "<a href=\"https://explosion.ai\"><img src=\"https://explosion.ai/assets/img/logo.svg\" width=\"125\" height=\"125\" align=\"right\" /></a>\n\n# srsly: Modern high-performance serialization utilities for Python\n\nThis package bundles some of the best Python serialization libraries into one\nstandalone package, with a high-level API that makes it easy to write code\nthat's correct across platforms and Pythons. This allows us to provide all the\nserialization utilities we need in a single binary wheel. Currently supports\n**JSON**, **JSONL**, **MessagePack**, **Pickle** and **YAML**.\n\n[![tests](https://github.com/explosion/srsly/actions/workflows/tests.yml/badge.svg)](https://github.com/explosion/srsly/actions/workflows/tests.yml)\n[![PyPi](https://img.shields.io/pypi/v/srsly.svg?style=flat-square&logo=pypi&logoColor=white)](https://pypi.python.org/pypi/srsly)\n[![conda](https://img.shields.io/conda/vn/conda-forge/srsly.svg?style=flat-square&logo=conda-forge&logoColor=white)](https://anaconda.org/conda-forge/srsly)\n[![GitHub](https://img.shields.io/github/release/explosion/srsly/all.svg?style=flat-square&logo=github)](https://github.com/explosion/srsly)\n[![Python wheels](https://img.shields.io/badge/wheels-%E2%9C%93-4c1.svg?longCache=true&style=flat-square&logo=python&logoColor=white)](https://github.com/explosion/wheelwright/releases)\n\n## Motivation\n\nSerialization is hard, especially across Python versions and multiple platforms.\nAfter dealing with many subtle bugs over the years (encodings, locales, large\nfiles) our libraries like [spaCy](https://github.com/explosion/spaCy) and\n[Prodigy](https://prodi.gy) had steadily grown a number of utility functions to\nwrap the multiple serialization formats we need to support (especially `json`,\n`msgpack` and `pickle`). These wrapping functions ended up duplicated across our\ncodebases, so we wanted to put them in one place.\n\nAt the same time, we noticed that having a lot of small dependencies was making\nmaintenance harder, and making installation slower. To solve this, we've made\n`srsly` standalone, by including the component packages directly within it. This\nway we can provide all the serialization utilities we need in a single binary\nwheel.\n\n`srsly` currently includes forks of the following packages:\n\n- [`ujson`](https://github.com/esnme/ultrajson)\n- [`msgpack`](https://github.com/msgpack/msgpack-python)\n- [`msgpack-numpy`](https://github.com/lebedov/msgpack-numpy)\n- [`cloudpickle`](https://github.com/cloudpipe/cloudpickle)\n- [`ruamel.yaml`](https://github.com/pycontribs/ruamel-yaml) (without unsafe\n  implementations!)\n\n## Installation\n\n> \u26a0\ufe0f Note that `v2.x` is only compatible with **Python 3.6+**. For 2.7+\n> compatibility, use `v1.x`.\n\n`srsly` can be installed from pip. Before installing, make sure that your `pip`,\n`setuptools` and `wheel` are up to date.\n\n```bash\npython -m pip install -U pip setuptools wheel\npython -m pip install srsly\n```\n\nOr from conda via conda-forge:\n\n```bash\nconda install -c conda-forge srsly\n```\n\nAlternatively, you can also compile the library from source. You'll need to make\nsure that you have a development environment with a Python distribution\nincluding header files, a compiler (XCode command-line tools on macOS / OS X or\nVisual C++ build tools on Windows), pip and git installed.\n\nInstall from source:\n\n```bash\n# clone the repo\ngit clone https://github.com/explosion/srsly\ncd srsly\n\n# create a virtual environment\npython -m venv .env\nsource .env/bin/activate\n\n# update pip\npython -m pip install -U pip setuptools wheel\n\n# compile and install from source\npython -m pip install .\n```\n\nFor developers, install requirements separately and then install in editable\nmode without build isolation:\n\n```bash\n# install in editable mode\npython -m pip install -r requirements.txt\npython -m pip install --no-build-isolation --editable .\n\n# run test suite\npython -m pytest --pyargs srsly\n```\n\n## API\n\n### JSON\n\n> \ud83d\udce6 The underlying module is exposed via `srsly.ujson`. However, we normally\n> interact with it via the utility functions only.\n\n#### <kbd>function</kbd> `srsly.json_dumps`\n\nSerialize an object to a JSON string. Falls back to `json` if `sort_keys=True`\nis used (until it's fixed in `ujson`).\n\n```python\ndata = {\"foo\": \"bar\", \"baz\": 123}\njson_string = srsly.json_dumps(data)\n```\n\n| Argument    | Type | Description                                            |\n| ----------- | ---- | ------------------------------------------------------ |\n| `data`      | -    | The JSON-serializable data to output.                  |\n| `indent`    | int  | Number of spaces used to indent JSON. Defaults to `0`. |\n| `sort_keys` | bool | Sort dictionary keys. Defaults to `False`.             |\n| **RETURNS** | str  | The serialized string.                                 |\n\n#### <kbd>function</kbd> `srsly.json_loads`\n\nDeserialize unicode or bytes to a Python object.\n\n```python\ndata = '{\"foo\": \"bar\", \"baz\": 123}'\nobj = srsly.json_loads(data)\n```\n\n| Argument    | Type        | Description                     |\n| ----------- | ----------- | ------------------------------- |\n| `data`      | str / bytes | The data to deserialize.        |\n| **RETURNS** | -           | The deserialized Python object. |\n\n#### <kbd>function</kbd> `srsly.write_json`\n\nCreate a JSON file and dump contents or write to standard output.\n\n```python\ndata = {\"foo\": \"bar\", \"baz\": 123}\nsrsly.write_json(\"/path/to/file.json\", data)\n```\n\n| Argument | Type         | Description                                            |\n| -------- | ------------ | ------------------------------------------------------ |\n| `path`   | str / `Path` | The file path or `\"-\"` to write to stdout.             |\n| `data`   | -            | The JSON-serializable data to output.                  |\n| `indent` | int          | Number of spaces used to indent JSON. Defaults to `2`. |\n\n#### <kbd>function</kbd> `srsly.read_json`\n\nLoad JSON from a file or standard input.\n\n```python\ndata = srsly.read_json(\"/path/to/file.json\")\n```\n\n| Argument    | Type         | Description                                |\n| ----------- | ------------ | ------------------------------------------ |\n| `path`      | str / `Path` | The file path or `\"-\"` to read from stdin. |\n| **RETURNS** | dict / list  | The loaded JSON content.                   |\n\n#### <kbd>function</kbd> `srsly.write_gzip_json`\n\nCreate a gzipped JSON file and dump contents.\n\n```python\ndata = {\"foo\": \"bar\", \"baz\": 123}\nsrsly.write_gzip_json(\"/path/to/file.json.gz\", data)\n```\n\n| Argument | Type         | Description                                            |\n| -------- | ------------ | ------------------------------------------------------ |\n| `path`   | str / `Path` | The file path.                                         |\n| `data`   | -            | The JSON-serializable data to output.                  |\n| `indent` | int          | Number of spaces used to indent JSON. Defaults to `2`. |\n\n#### <kbd>function</kbd> `srsly.write_gzip_jsonl`\n\nCreate a gzipped JSONL file and dump contents.\n\n```python\ndata = [{\"foo\": \"bar\"}, {\"baz\": 123}]\nsrsly.write_gzip_json(\"/path/to/file.jsonl.gz\", data)\n```\n\n| Argument          | Type         | Description                                                                                                                                                                                                             |\n| ----------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `path`            | str / `Path` | The file path.                                                                                                                                                                                                          |\n| `lines`           | -            | The JSON-serializable contents of each line.                                                                                                                                                                            |\n| `append`          | bool         | Whether or not to append to the location. Appending to .gz files is generally not recommended, as it doesn't allow the algorithm to take advantage of all data when compressing - files may hence be poorly compressed. |\n| `append_new_line` | bool         | Whether or not to write a new line before appending to the file.                                                                                                                                                        |\n\n#### <kbd>function</kbd> `srsly.read_gzip_json`\n\nLoad gzipped JSON from a file.\n\n```python\ndata = srsly.read_gzip_json(\"/path/to/file.json.gz\")\n```\n\n| Argument    | Type         | Description              |\n| ----------- | ------------ | ------------------------ |\n| `path`      | str / `Path` | The file path.           |\n| **RETURNS** | dict / list  | The loaded JSON content. |\n\n#### <kbd>function</kbd> `srsly.read_gzip_jsonl`\n\nLoad gzipped JSONL from a file.\n\n```python\ndata = srsly.read_gzip_jsonl(\"/path/to/file.jsonl.gz\")\n```\n\n| Argument    | Type         | Description               |\n| ----------- | ------------ | ------------------------- |\n| `path`      | str / `Path` | The file path.            |\n| **RETURNS** | dict / list  | The loaded JSONL content. |\n\n#### <kbd>function</kbd> `srsly.write_jsonl`\n\nCreate a JSONL file (newline-delimited JSON) and dump contents line by line, or\nwrite to standard output.\n\n```python\ndata = [{\"foo\": \"bar\"}, {\"baz\": 123}]\nsrsly.write_jsonl(\"/path/to/file.jsonl\", data)\n```\n\n| Argument          | Type         | Description                                                                                                            |\n| ----------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------- |\n| `path`            | str / `Path` | The file path or `\"-\"` to write to stdout.                                                                             |\n| `lines`           | iterable     | The JSON-serializable lines.                                                                                           |\n| `append`          | bool         | Append to an existing file. Will open it in `\"a\"` mode and insert a newline before writing lines. Defaults to `False`. |\n| `append_new_line` | bool         | Defines whether a new line should first be written when appending to an existing file. Defaults to `True`.             |\n\n#### <kbd>function</kbd> `srsly.read_jsonl`\n\nRead a JSONL file (newline-delimited JSON) or from JSONL data from standard\ninput and yield contents line by line. Blank lines will always be skipped.\n\n```python\ndata = srsly.read_jsonl(\"/path/to/file.jsonl\")\n```\n\n| Argument   | Type       | Description                                                          |\n| ---------- | ---------- | -------------------------------------------------------------------- |\n| `path`     | str / Path | The file path or `\"-\"` to read from stdin.                           |\n| `skip`     | bool       | Skip broken lines and don't raise `ValueError`. Defaults to `False`. |\n| **YIELDS** | -          | The loaded JSON contents of each line.                               |\n\n#### <kbd>function</kbd> `srsly.is_json_serializable`\n\nCheck if a Python object is JSON-serializable.\n\n```python\nassert srsly.is_json_serializable({\"hello\": \"world\"}) is True\nassert srsly.is_json_serializable(lambda x: x) is False\n```\n\n| Argument    | Type | Description                              |\n| ----------- | ---- | ---------------------------------------- |\n| `obj`       | -    | The object to check.                     |\n| **RETURNS** | bool | Whether the object is JSON-serializable. |\n\n### msgpack\n\n> \ud83d\udce6 The underlying module is exposed via `srsly.msgpack`. However, we normally\n> interact with it via the utility functions only.\n\n#### <kbd>function</kbd> `srsly.msgpack_dumps`\n\nSerialize an object to a msgpack byte string.\n\n```python\ndata = {\"foo\": \"bar\", \"baz\": 123}\nmsg = srsly.msgpack_dumps(data)\n```\n\n| Argument    | Type  | Description            |\n| ----------- | ----- | ---------------------- |\n| `data`      | -     | The data to serialize. |\n| **RETURNS** | bytes | The serialized bytes.  |\n\n#### <kbd>function</kbd> `srsly.msgpack_loads`\n\nDeserialize msgpack bytes to a Python object.\n\n```python\nmsg = b\"\\x82\\xa3foo\\xa3bar\\xa3baz{\"\ndata = srsly.msgpack_loads(msg)\n```\n\n| Argument    | Type  | Description                                                                             |\n| ----------- | ----- | --------------------------------------------------------------------------------------- |\n| `data`      | bytes | The data to deserialize.                                                                |\n| `use_list`  | bool  | Don't use tuples instead of lists. Can make deserialization slower. Defaults to `True`. |\n| **RETURNS** | -     | The deserialized Python object.                                                         |\n\n#### <kbd>function</kbd> `srsly.write_msgpack`\n\nCreate a msgpack file and dump contents.\n\n```python\ndata = {\"foo\": \"bar\", \"baz\": 123}\nsrsly.write_msgpack(\"/path/to/file.msg\", data)\n```\n\n| Argument | Type         | Description            |\n| -------- | ------------ | ---------------------- |\n| `path`   | str / `Path` | The file path.         |\n| `data`   | -            | The data to serialize. |\n\n#### <kbd>function</kbd> `srsly.read_msgpack`\n\nLoad a msgpack file.\n\n```python\ndata = srsly.read_msgpack(\"/path/to/file.msg\")\n```\n\n| Argument    | Type         | Description                                                                             |\n| ----------- | ------------ | --------------------------------------------------------------------------------------- |\n| `path`      | str / `Path` | The file path.                                                                          |\n| `use_list`  | bool         | Don't use tuples instead of lists. Can make deserialization slower. Defaults to `True`. |\n| **RETURNS** | -            | The loaded and deserialized content.                                                    |\n\n### pickle\n\n> \ud83d\udce6 The underlying module is exposed via `srsly.cloudpickle`. However, we\n> normally interact with it via the utility functions only.\n\n#### <kbd>function</kbd> `srsly.pickle_dumps`\n\nSerialize a Python object with pickle.\n\n```python\ndata = {\"foo\": \"bar\", \"baz\": 123}\npickled_data = srsly.pickle_dumps(data)\n```\n\n| Argument    | Type  | Description                                            |\n| ----------- | ----- | ------------------------------------------------------ |\n| `data`      | -     | The object to serialize.                               |\n| `protocol`  | int   | Protocol to use. `-1` for highest. Defaults to `None`. |\n| **RETURNS** | bytes | The serialized object.                                 |\n\n#### <kbd>function</kbd> `srsly.pickle_loads`\n\nDeserialize bytes with pickle.\n\n```python\npickled_data = b\"\\x80\\x04\\x95\\x19\\x00\\x00\\x00\\x00\\x00\\x00\\x00}\\x94(\\x8c\\x03foo\\x94\\x8c\\x03bar\\x94\\x8c\\x03baz\\x94K{u.\"\ndata = srsly.pickle_loads(pickled_data)\n```\n\n| Argument    | Type  | Description                     |\n| ----------- | ----- | ------------------------------- |\n| `data`      | bytes | The data to deserialize.        |\n| **RETURNS** | -     | The deserialized Python object. |\n\n### YAML\n\n> \ud83d\udce6 The underlying module is exposed via `srsly.ruamel_yaml`. However, we\n> normally interact with it via the utility functions only.\n\n#### <kbd>function</kbd> `srsly.yaml_dumps`\n\nSerialize an object to a YAML string. See the\n[`ruamel.yaml` docs](https://yaml.readthedocs.io/en/latest/detail.html?highlight=indentation#indentation-of-block-sequences)\nfor details on the indentation format.\n\n```python\ndata = {\"foo\": \"bar\", \"baz\": 123}\nyaml_string = srsly.yaml_dumps(data)\n```\n\n| Argument          | Type | Description                                |\n| ----------------- | ---- | ------------------------------------------ |\n| `data`            | -    | The JSON-serializable data to output.      |\n| `indent_mapping`  | int  | Mapping indentation. Defaults to `2`.      |\n| `indent_sequence` | int  | Sequence indentation. Defaults to `4`.     |\n| `indent_offset`   | int  | Indentation offset. Defaults to `2`.       |\n| `sort_keys`       | bool | Sort dictionary keys. Defaults to `False`. |\n| **RETURNS**       | str  | The serialized string.                     |\n\n#### <kbd>function</kbd> `srsly.yaml_loads`\n\nDeserialize unicode or a file object to a Python object.\n\n```python\ndata = 'foo: bar\\nbaz: 123'\nobj = srsly.yaml_loads(data)\n```\n\n| Argument    | Type       | Description                     |\n| ----------- | ---------- | ------------------------------- |\n| `data`      | str / file | The data to deserialize.        |\n| **RETURNS** | -          | The deserialized Python object. |\n\n#### <kbd>function</kbd> `srsly.write_yaml`\n\nCreate a YAML file and dump contents or write to standard output.\n\n```python\ndata = {\"foo\": \"bar\", \"baz\": 123}\nsrsly.write_yaml(\"/path/to/file.yml\", data)\n```\n\n| Argument          | Type         | Description                                |\n| ----------------- | ------------ | ------------------------------------------ |\n| `path`            | str / `Path` | The file path or `\"-\"` to write to stdout. |\n| `data`            | -            | The JSON-serializable data to output.      |\n| `indent_mapping`  | int          | Mapping indentation. Defaults to `2`.      |\n| `indent_sequence` | int          | Sequence indentation. Defaults to `4`.     |\n| `indent_offset`   | int          | Indentation offset. Defaults to `2`.       |\n| `sort_keys`       | bool         | Sort dictionary keys. Defaults to `False`. |\n\n#### <kbd>function</kbd> `srsly.read_yaml`\n\nLoad YAML from a file or standard input.\n\n```python\ndata = srsly.read_yaml(\"/path/to/file.yml\")\n```\n\n| Argument    | Type         | Description                                |\n| ----------- | ------------ | ------------------------------------------ |\n| `path`      | str / `Path` | The file path or `\"-\"` to read from stdin. |\n| **RETURNS** | dict / list  | The loaded YAML content.                   |\n\n#### <kbd>function</kbd> `srsly.is_yaml_serializable`\n\nCheck if a Python object is YAML-serializable.\n\n```python\nassert srsly.is_yaml_serializable({\"hello\": \"world\"}) is True\nassert srsly.is_yaml_serializable(lambda x: x) is False\n```\n\n| Argument    | Type | Description                              |\n| ----------- | ---- | ---------------------------------------- |\n| `obj`       | -    | The object to check.                     |\n| **RETURNS** | bool | Whether the object is YAML-serializable. |\n",
      "keywords": "",
      "platform": [],
      "classifiers": [
        "Development Status :: 5 - Production/Stable",
        "Environment :: Console",
        "Intended Audience :: Developers",
        "Intended Audience :: Science/Research",
        "License :: OSI Approved :: MIT License",
        "Operating System :: POSIX :: Linux",
        "Operating System :: MacOS :: MacOS X",
        "Operating System :: Microsoft :: Windows",
        "Programming Language :: Cython",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.9",
        "Programming Language :: Python :: 3.10",
        "Programming Language :: Python :: 3.11",
        "Programming Language :: Python :: 3.12",
        "Programming Language :: Python :: 3.13",
        "Topic :: Scientific/Engineering",
        "Environment :: MetaData :: IBM Python Ecosystem"
      ],
      "download_url": "",
      "supported_platform": [],
      "comment": "",
      "provides": [],
      "requires": [],
      "obsoletes": [],
      "project_urls": [],
      "provides_dist": [],
      "obsoletes_dist": [],
      "requires_dist": [
        "catalogue<2.1.0,>=2.0.3"
      ],
      "requires_external": [],
      "requires_python": "<3.15,>=3.9",
      "description_content_type": "text/markdown",
      "provides_extras": [],
      "dynamic": [
        "license-file"
      ],
      "license_expression": "",
      "license_file": [
        "LICENSE"
      ],
      "+links": [
        {
          "rel": "releasefile",
          "hash_spec": "sha256=ed2511a5ae3bf826db3602017ac0827d61f5c822b7e4a744613926ef5f6dd8b9",
          "hashes": {
            "sha256": "ed2511a5ae3bf826db3602017ac0827d61f5c822b7e4a744613926ef5f6dd8b9"
          },
          "href": "https://wheels.developerfirst.ibm.com/ppc64le/linux/+f/ed2/511a5ae3bf826/srsly-2.5.3-cp310-cp310-manylinux_2_31_ppc64le.whl",
          "log": [
            {
              "what": "upload",
              "who": "ppc64le",
              "when": [
                2026,
                7,
                27,
                13,
                15,
                47
              ],
              "dst": "ppc64le/linux"
            }
          ]
        },
        {
          "rel": "releasefile",
          "hash_spec": "sha256=8ae12fca1e60de6a65676aecb7797a2110379b156cd34e7985fe00803bbc8a73",
          "hashes": {
            "sha256": "8ae12fca1e60de6a65676aecb7797a2110379b156cd34e7985fe00803bbc8a73"
          },
          "href": "https://wheels.developerfirst.ibm.com/ppc64le/linux/+f/8ae/12fca1e60de6a/srsly-2.5.3-cp311-cp311-manylinux_2_31_ppc64le.whl",
          "log": [
            {
              "what": "upload",
              "who": "ppc64le",
              "when": [
                2026,
                7,
                27,
                13,
                15,
                47
              ],
              "dst": "ppc64le/linux"
            }
          ]
        },
        {
          "rel": "releasefile",
          "hash_spec": "sha256=ec61c5bace2a4b428780eaee7c742e232f61d2340510cacef528339696f4e366",
          "hashes": {
            "sha256": "ec61c5bace2a4b428780eaee7c742e232f61d2340510cacef528339696f4e366"
          },
          "href": "https://wheels.developerfirst.ibm.com/ppc64le/linux/+f/ec6/1c5bace2a4b42/srsly-2.5.3-cp312-cp312-manylinux_2_31_ppc64le.whl",
          "log": [
            {
              "what": "upload",
              "who": "ppc64le",
              "when": [
                2026,
                7,
                27,
                13,
                15,
                47
              ],
              "dst": "ppc64le/linux"
            }
          ]
        },
        {
          "rel": "releasefile",
          "hash_spec": "sha256=569a723b0a4e34ecbba6d32c944bd750df0e416c7c82af2d2a0ae8643943e57a",
          "hashes": {
            "sha256": "569a723b0a4e34ecbba6d32c944bd750df0e416c7c82af2d2a0ae8643943e57a"
          },
          "href": "https://wheels.developerfirst.ibm.com/ppc64le/linux/+f/569/a723b0a4e34ec/srsly-2.5.3-cp313-cp313-manylinux_2_31_ppc64le.whl",
          "log": [
            {
              "what": "upload",
              "who": "ppc64le",
              "when": [
                2026,
                7,
                27,
                13,
                15,
                47
              ],
              "dst": "ppc64le/linux"
            }
          ]
        },
        {
          "rel": "releasefile",
          "hash_spec": "sha256=a128e74bd4ee33d174d739b58d8ff8fb6b8728d236167292f98cf0bcf3528b3a",
          "hashes": {
            "sha256": "a128e74bd4ee33d174d739b58d8ff8fb6b8728d236167292f98cf0bcf3528b3a"
          },
          "href": "https://wheels.developerfirst.ibm.com/ppc64le/linux/+f/a12/8e74bd4ee33d1/srsly-2.5.3-cp314-cp314-manylinux_2_31_ppc64le.whl",
          "log": [
            {
              "what": "upload",
              "who": "ppc64le",
              "when": [
                2026,
                7,
                27,
                13,
                15,
                48
              ],
              "dst": "ppc64le/linux"
            }
          ]
        }
      ]
    },
    "2.5.3+ppc64le1": {
      "name": "srsly",
      "version": "2.5.3+ppc64le1",
      "metadata_version": "2.4",
      "summary": "Modern high-performance serialization utilities for Python",
      "home_page": "https://github.com/explosion/srsly",
      "author": "Explosion",
      "author_email": "contact@explosion.ai",
      "maintainer": "",
      "maintainer_email": "",
      "license": "MIT",
      "description": "<a href=\"https://explosion.ai\"><img src=\"https://explosion.ai/assets/img/logo.svg\" width=\"125\" height=\"125\" align=\"right\" /></a>\n\n# srsly: Modern high-performance serialization utilities for Python\n\nThis package bundles some of the best Python serialization libraries into one\nstandalone package, with a high-level API that makes it easy to write code\nthat's correct across platforms and Pythons. This allows us to provide all the\nserialization utilities we need in a single binary wheel. Currently supports\n**JSON**, **JSONL**, **MessagePack**, **Pickle** and **YAML**.\n\n[![tests](https://github.com/explosion/srsly/actions/workflows/tests.yml/badge.svg)](https://github.com/explosion/srsly/actions/workflows/tests.yml)\n[![PyPi](https://img.shields.io/pypi/v/srsly.svg?style=flat-square&logo=pypi&logoColor=white)](https://pypi.python.org/pypi/srsly)\n[![conda](https://img.shields.io/conda/vn/conda-forge/srsly.svg?style=flat-square&logo=conda-forge&logoColor=white)](https://anaconda.org/conda-forge/srsly)\n[![GitHub](https://img.shields.io/github/release/explosion/srsly/all.svg?style=flat-square&logo=github)](https://github.com/explosion/srsly)\n[![Python wheels](https://img.shields.io/badge/wheels-%E2%9C%93-4c1.svg?longCache=true&style=flat-square&logo=python&logoColor=white)](https://github.com/explosion/wheelwright/releases)\n\n## Motivation\n\nSerialization is hard, especially across Python versions and multiple platforms.\nAfter dealing with many subtle bugs over the years (encodings, locales, large\nfiles) our libraries like [spaCy](https://github.com/explosion/spaCy) and\n[Prodigy](https://prodi.gy) had steadily grown a number of utility functions to\nwrap the multiple serialization formats we need to support (especially `json`,\n`msgpack` and `pickle`). These wrapping functions ended up duplicated across our\ncodebases, so we wanted to put them in one place.\n\nAt the same time, we noticed that having a lot of small dependencies was making\nmaintenance harder, and making installation slower. To solve this, we've made\n`srsly` standalone, by including the component packages directly within it. This\nway we can provide all the serialization utilities we need in a single binary\nwheel.\n\n`srsly` currently includes forks of the following packages:\n\n- [`ujson`](https://github.com/esnme/ultrajson)\n- [`msgpack`](https://github.com/msgpack/msgpack-python)\n- [`msgpack-numpy`](https://github.com/lebedov/msgpack-numpy)\n- [`cloudpickle`](https://github.com/cloudpipe/cloudpickle)\n- [`ruamel.yaml`](https://github.com/pycontribs/ruamel-yaml) (without unsafe\n  implementations!)\n\n## Installation\n\n> \u26a0\ufe0f Note that `v2.x` is only compatible with **Python 3.6+**. For 2.7+\n> compatibility, use `v1.x`.\n\n`srsly` can be installed from pip. Before installing, make sure that your `pip`,\n`setuptools` and `wheel` are up to date.\n\n```bash\npython -m pip install -U pip setuptools wheel\npython -m pip install srsly\n```\n\nOr from conda via conda-forge:\n\n```bash\nconda install -c conda-forge srsly\n```\n\nAlternatively, you can also compile the library from source. You'll need to make\nsure that you have a development environment with a Python distribution\nincluding header files, a compiler (XCode command-line tools on macOS / OS X or\nVisual C++ build tools on Windows), pip and git installed.\n\nInstall from source:\n\n```bash\n# clone the repo\ngit clone https://github.com/explosion/srsly\ncd srsly\n\n# create a virtual environment\npython -m venv .env\nsource .env/bin/activate\n\n# update pip\npython -m pip install -U pip setuptools wheel\n\n# compile and install from source\npython -m pip install .\n```\n\nFor developers, install requirements separately and then install in editable\nmode without build isolation:\n\n```bash\n# install in editable mode\npython -m pip install -r requirements.txt\npython -m pip install --no-build-isolation --editable .\n\n# run test suite\npython -m pytest --pyargs srsly\n```\n\n## API\n\n### JSON\n\n> \ud83d\udce6 The underlying module is exposed via `srsly.ujson`. However, we normally\n> interact with it via the utility functions only.\n\n#### <kbd>function</kbd> `srsly.json_dumps`\n\nSerialize an object to a JSON string. Falls back to `json` if `sort_keys=True`\nis used (until it's fixed in `ujson`).\n\n```python\ndata = {\"foo\": \"bar\", \"baz\": 123}\njson_string = srsly.json_dumps(data)\n```\n\n| Argument    | Type | Description                                            |\n| ----------- | ---- | ------------------------------------------------------ |\n| `data`      | -    | The JSON-serializable data to output.                  |\n| `indent`    | int  | Number of spaces used to indent JSON. Defaults to `0`. |\n| `sort_keys` | bool | Sort dictionary keys. Defaults to `False`.             |\n| **RETURNS** | str  | The serialized string.                                 |\n\n#### <kbd>function</kbd> `srsly.json_loads`\n\nDeserialize unicode or bytes to a Python object.\n\n```python\ndata = '{\"foo\": \"bar\", \"baz\": 123}'\nobj = srsly.json_loads(data)\n```\n\n| Argument    | Type        | Description                     |\n| ----------- | ----------- | ------------------------------- |\n| `data`      | str / bytes | The data to deserialize.        |\n| **RETURNS** | -           | The deserialized Python object. |\n\n#### <kbd>function</kbd> `srsly.write_json`\n\nCreate a JSON file and dump contents or write to standard output.\n\n```python\ndata = {\"foo\": \"bar\", \"baz\": 123}\nsrsly.write_json(\"/path/to/file.json\", data)\n```\n\n| Argument | Type         | Description                                            |\n| -------- | ------------ | ------------------------------------------------------ |\n| `path`   | str / `Path` | The file path or `\"-\"` to write to stdout.             |\n| `data`   | -            | The JSON-serializable data to output.                  |\n| `indent` | int          | Number of spaces used to indent JSON. Defaults to `2`. |\n\n#### <kbd>function</kbd> `srsly.read_json`\n\nLoad JSON from a file or standard input.\n\n```python\ndata = srsly.read_json(\"/path/to/file.json\")\n```\n\n| Argument    | Type         | Description                                |\n| ----------- | ------------ | ------------------------------------------ |\n| `path`      | str / `Path` | The file path or `\"-\"` to read from stdin. |\n| **RETURNS** | dict / list  | The loaded JSON content.                   |\n\n#### <kbd>function</kbd> `srsly.write_gzip_json`\n\nCreate a gzipped JSON file and dump contents.\n\n```python\ndata = {\"foo\": \"bar\", \"baz\": 123}\nsrsly.write_gzip_json(\"/path/to/file.json.gz\", data)\n```\n\n| Argument | Type         | Description                                            |\n| -------- | ------------ | ------------------------------------------------------ |\n| `path`   | str / `Path` | The file path.                                         |\n| `data`   | -            | The JSON-serializable data to output.                  |\n| `indent` | int          | Number of spaces used to indent JSON. Defaults to `2`. |\n\n#### <kbd>function</kbd> `srsly.write_gzip_jsonl`\n\nCreate a gzipped JSONL file and dump contents.\n\n```python\ndata = [{\"foo\": \"bar\"}, {\"baz\": 123}]\nsrsly.write_gzip_json(\"/path/to/file.jsonl.gz\", data)\n```\n\n| Argument          | Type         | Description                                                                                                                                                                                                             |\n| ----------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `path`            | str / `Path` | The file path.                                                                                                                                                                                                          |\n| `lines`           | -            | The JSON-serializable contents of each line.                                                                                                                                                                            |\n| `append`          | bool         | Whether or not to append to the location. Appending to .gz files is generally not recommended, as it doesn't allow the algorithm to take advantage of all data when compressing - files may hence be poorly compressed. |\n| `append_new_line` | bool         | Whether or not to write a new line before appending to the file.                                                                                                                                                        |\n\n#### <kbd>function</kbd> `srsly.read_gzip_json`\n\nLoad gzipped JSON from a file.\n\n```python\ndata = srsly.read_gzip_json(\"/path/to/file.json.gz\")\n```\n\n| Argument    | Type         | Description              |\n| ----------- | ------------ | ------------------------ |\n| `path`      | str / `Path` | The file path.           |\n| **RETURNS** | dict / list  | The loaded JSON content. |\n\n#### <kbd>function</kbd> `srsly.read_gzip_jsonl`\n\nLoad gzipped JSONL from a file.\n\n```python\ndata = srsly.read_gzip_jsonl(\"/path/to/file.jsonl.gz\")\n```\n\n| Argument    | Type         | Description               |\n| ----------- | ------------ | ------------------------- |\n| `path`      | str / `Path` | The file path.            |\n| **RETURNS** | dict / list  | The loaded JSONL content. |\n\n#### <kbd>function</kbd> `srsly.write_jsonl`\n\nCreate a JSONL file (newline-delimited JSON) and dump contents line by line, or\nwrite to standard output.\n\n```python\ndata = [{\"foo\": \"bar\"}, {\"baz\": 123}]\nsrsly.write_jsonl(\"/path/to/file.jsonl\", data)\n```\n\n| Argument          | Type         | Description                                                                                                            |\n| ----------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------- |\n| `path`            | str / `Path` | The file path or `\"-\"` to write to stdout.                                                                             |\n| `lines`           | iterable     | The JSON-serializable lines.                                                                                           |\n| `append`          | bool         | Append to an existing file. Will open it in `\"a\"` mode and insert a newline before writing lines. Defaults to `False`. |\n| `append_new_line` | bool         | Defines whether a new line should first be written when appending to an existing file. Defaults to `True`.             |\n\n#### <kbd>function</kbd> `srsly.read_jsonl`\n\nRead a JSONL file (newline-delimited JSON) or from JSONL data from standard\ninput and yield contents line by line. Blank lines will always be skipped.\n\n```python\ndata = srsly.read_jsonl(\"/path/to/file.jsonl\")\n```\n\n| Argument   | Type       | Description                                                          |\n| ---------- | ---------- | -------------------------------------------------------------------- |\n| `path`     | str / Path | The file path or `\"-\"` to read from stdin.                           |\n| `skip`     | bool       | Skip broken lines and don't raise `ValueError`. Defaults to `False`. |\n| **YIELDS** | -          | The loaded JSON contents of each line.                               |\n\n#### <kbd>function</kbd> `srsly.is_json_serializable`\n\nCheck if a Python object is JSON-serializable.\n\n```python\nassert srsly.is_json_serializable({\"hello\": \"world\"}) is True\nassert srsly.is_json_serializable(lambda x: x) is False\n```\n\n| Argument    | Type | Description                              |\n| ----------- | ---- | ---------------------------------------- |\n| `obj`       | -    | The object to check.                     |\n| **RETURNS** | bool | Whether the object is JSON-serializable. |\n\n### msgpack\n\n> \ud83d\udce6 The underlying module is exposed via `srsly.msgpack`. However, we normally\n> interact with it via the utility functions only.\n\n#### <kbd>function</kbd> `srsly.msgpack_dumps`\n\nSerialize an object to a msgpack byte string.\n\n```python\ndata = {\"foo\": \"bar\", \"baz\": 123}\nmsg = srsly.msgpack_dumps(data)\n```\n\n| Argument    | Type  | Description            |\n| ----------- | ----- | ---------------------- |\n| `data`      | -     | The data to serialize. |\n| **RETURNS** | bytes | The serialized bytes.  |\n\n#### <kbd>function</kbd> `srsly.msgpack_loads`\n\nDeserialize msgpack bytes to a Python object.\n\n```python\nmsg = b\"\\x82\\xa3foo\\xa3bar\\xa3baz{\"\ndata = srsly.msgpack_loads(msg)\n```\n\n| Argument    | Type  | Description                                                                             |\n| ----------- | ----- | --------------------------------------------------------------------------------------- |\n| `data`      | bytes | The data to deserialize.                                                                |\n| `use_list`  | bool  | Don't use tuples instead of lists. Can make deserialization slower. Defaults to `True`. |\n| **RETURNS** | -     | The deserialized Python object.                                                         |\n\n#### <kbd>function</kbd> `srsly.write_msgpack`\n\nCreate a msgpack file and dump contents.\n\n```python\ndata = {\"foo\": \"bar\", \"baz\": 123}\nsrsly.write_msgpack(\"/path/to/file.msg\", data)\n```\n\n| Argument | Type         | Description            |\n| -------- | ------------ | ---------------------- |\n| `path`   | str / `Path` | The file path.         |\n| `data`   | -            | The data to serialize. |\n\n#### <kbd>function</kbd> `srsly.read_msgpack`\n\nLoad a msgpack file.\n\n```python\ndata = srsly.read_msgpack(\"/path/to/file.msg\")\n```\n\n| Argument    | Type         | Description                                                                             |\n| ----------- | ------------ | --------------------------------------------------------------------------------------- |\n| `path`      | str / `Path` | The file path.                                                                          |\n| `use_list`  | bool         | Don't use tuples instead of lists. Can make deserialization slower. Defaults to `True`. |\n| **RETURNS** | -            | The loaded and deserialized content.                                                    |\n\n### pickle\n\n> \ud83d\udce6 The underlying module is exposed via `srsly.cloudpickle`. However, we\n> normally interact with it via the utility functions only.\n\n#### <kbd>function</kbd> `srsly.pickle_dumps`\n\nSerialize a Python object with pickle.\n\n```python\ndata = {\"foo\": \"bar\", \"baz\": 123}\npickled_data = srsly.pickle_dumps(data)\n```\n\n| Argument    | Type  | Description                                            |\n| ----------- | ----- | ------------------------------------------------------ |\n| `data`      | -     | The object to serialize.                               |\n| `protocol`  | int   | Protocol to use. `-1` for highest. Defaults to `None`. |\n| **RETURNS** | bytes | The serialized object.                                 |\n\n#### <kbd>function</kbd> `srsly.pickle_loads`\n\nDeserialize bytes with pickle.\n\n```python\npickled_data = b\"\\x80\\x04\\x95\\x19\\x00\\x00\\x00\\x00\\x00\\x00\\x00}\\x94(\\x8c\\x03foo\\x94\\x8c\\x03bar\\x94\\x8c\\x03baz\\x94K{u.\"\ndata = srsly.pickle_loads(pickled_data)\n```\n\n| Argument    | Type  | Description                     |\n| ----------- | ----- | ------------------------------- |\n| `data`      | bytes | The data to deserialize.        |\n| **RETURNS** | -     | The deserialized Python object. |\n\n### YAML\n\n> \ud83d\udce6 The underlying module is exposed via `srsly.ruamel_yaml`. However, we\n> normally interact with it via the utility functions only.\n\n#### <kbd>function</kbd> `srsly.yaml_dumps`\n\nSerialize an object to a YAML string. See the\n[`ruamel.yaml` docs](https://yaml.readthedocs.io/en/latest/detail.html?highlight=indentation#indentation-of-block-sequences)\nfor details on the indentation format.\n\n```python\ndata = {\"foo\": \"bar\", \"baz\": 123}\nyaml_string = srsly.yaml_dumps(data)\n```\n\n| Argument          | Type | Description                                |\n| ----------------- | ---- | ------------------------------------------ |\n| `data`            | -    | The JSON-serializable data to output.      |\n| `indent_mapping`  | int  | Mapping indentation. Defaults to `2`.      |\n| `indent_sequence` | int  | Sequence indentation. Defaults to `4`.     |\n| `indent_offset`   | int  | Indentation offset. Defaults to `2`.       |\n| `sort_keys`       | bool | Sort dictionary keys. Defaults to `False`. |\n| **RETURNS**       | str  | The serialized string.                     |\n\n#### <kbd>function</kbd> `srsly.yaml_loads`\n\nDeserialize unicode or a file object to a Python object.\n\n```python\ndata = 'foo: bar\\nbaz: 123'\nobj = srsly.yaml_loads(data)\n```\n\n| Argument    | Type       | Description                     |\n| ----------- | ---------- | ------------------------------- |\n| `data`      | str / file | The data to deserialize.        |\n| **RETURNS** | -          | The deserialized Python object. |\n\n#### <kbd>function</kbd> `srsly.write_yaml`\n\nCreate a YAML file and dump contents or write to standard output.\n\n```python\ndata = {\"foo\": \"bar\", \"baz\": 123}\nsrsly.write_yaml(\"/path/to/file.yml\", data)\n```\n\n| Argument          | Type         | Description                                |\n| ----------------- | ------------ | ------------------------------------------ |\n| `path`            | str / `Path` | The file path or `\"-\"` to write to stdout. |\n| `data`            | -            | The JSON-serializable data to output.      |\n| `indent_mapping`  | int          | Mapping indentation. Defaults to `2`.      |\n| `indent_sequence` | int          | Sequence indentation. Defaults to `4`.     |\n| `indent_offset`   | int          | Indentation offset. Defaults to `2`.       |\n| `sort_keys`       | bool         | Sort dictionary keys. Defaults to `False`. |\n\n#### <kbd>function</kbd> `srsly.read_yaml`\n\nLoad YAML from a file or standard input.\n\n```python\ndata = srsly.read_yaml(\"/path/to/file.yml\")\n```\n\n| Argument    | Type         | Description                                |\n| ----------- | ------------ | ------------------------------------------ |\n| `path`      | str / `Path` | The file path or `\"-\"` to read from stdin. |\n| **RETURNS** | dict / list  | The loaded YAML content.                   |\n\n#### <kbd>function</kbd> `srsly.is_yaml_serializable`\n\nCheck if a Python object is YAML-serializable.\n\n```python\nassert srsly.is_yaml_serializable({\"hello\": \"world\"}) is True\nassert srsly.is_yaml_serializable(lambda x: x) is False\n```\n\n| Argument    | Type | Description                              |\n| ----------- | ---- | ---------------------------------------- |\n| `obj`       | -    | The object to check.                     |\n| **RETURNS** | bool | Whether the object is YAML-serializable. |\n",
      "keywords": "",
      "platform": [],
      "classifiers": [
        "Development Status :: 5 - Production/Stable",
        "Environment :: Console",
        "Intended Audience :: Developers",
        "Intended Audience :: Science/Research",
        "License :: OSI Approved :: MIT License",
        "Operating System :: POSIX :: Linux",
        "Operating System :: MacOS :: MacOS X",
        "Operating System :: Microsoft :: Windows",
        "Programming Language :: Cython",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.9",
        "Programming Language :: Python :: 3.10",
        "Programming Language :: Python :: 3.11",
        "Programming Language :: Python :: 3.12",
        "Programming Language :: Python :: 3.13",
        "Topic :: Scientific/Engineering",
        "Environment :: MetaData :: IBM Python Ecosystem"
      ],
      "download_url": "",
      "supported_platform": [],
      "comment": "",
      "provides": [],
      "requires": [],
      "obsoletes": [],
      "project_urls": [],
      "provides_dist": [],
      "obsoletes_dist": [],
      "requires_dist": [
        "catalogue<2.1.0,>=2.0.3"
      ],
      "requires_external": [],
      "requires_python": "<3.15,>=3.9",
      "description_content_type": "text/markdown",
      "provides_extras": [],
      "dynamic": [
        "license-file"
      ],
      "license_expression": "",
      "license_file": [
        "LICENSE"
      ],
      "+links": [
        {
          "rel": "releasefile",
          "hash_spec": "sha256=95acaee190d985d83787b74d0916ff724476660d34dc61c6556d2c5e9d75749f",
          "hashes": {
            "sha256": "95acaee190d985d83787b74d0916ff724476660d34dc61c6556d2c5e9d75749f"
          },
          "href": "https://wheels.developerfirst.ibm.com/ppc64le/linux/+f/95a/caee190d985d8/srsly-2.5.3+ppc64le1-cp310-cp310-manylinux_2_31_ppc64le.whl",
          "log": [
            {
              "what": "upload",
              "who": "ppc64le",
              "when": [
                2026,
                7,
                23,
                10,
                27,
                47
              ],
              "dst": "ppc64le/linux"
            }
          ]
        },
        {
          "rel": "releasefile",
          "hash_spec": "sha256=d33e48f34c2de616def0a879a71738ba6cd5cf557b6e59aa963d52cd427879d7",
          "hashes": {
            "sha256": "d33e48f34c2de616def0a879a71738ba6cd5cf557b6e59aa963d52cd427879d7"
          },
          "href": "https://wheels.developerfirst.ibm.com/ppc64le/linux/+f/d33/e48f34c2de616/srsly-2.5.3+ppc64le1-cp311-cp311-manylinux_2_31_ppc64le.whl",
          "log": [
            {
              "what": "upload",
              "who": "ppc64le",
              "when": [
                2026,
                7,
                23,
                10,
                27,
                48
              ],
              "dst": "ppc64le/linux"
            }
          ]
        },
        {
          "rel": "releasefile",
          "hash_spec": "sha256=867e2abc8b02e088f86e18abe5bbdda3715625151858c10f26450949d1a72c8f",
          "hashes": {
            "sha256": "867e2abc8b02e088f86e18abe5bbdda3715625151858c10f26450949d1a72c8f"
          },
          "href": "https://wheels.developerfirst.ibm.com/ppc64le/linux/+f/867/e2abc8b02e088/srsly-2.5.3+ppc64le1-cp312-cp312-manylinux_2_31_ppc64le.whl",
          "log": [
            {
              "what": "upload",
              "who": "ppc64le",
              "when": [
                2026,
                7,
                23,
                10,
                27,
                48
              ],
              "dst": "ppc64le/linux"
            }
          ]
        },
        {
          "rel": "releasefile",
          "hash_spec": "sha256=7f58d7657e14e9773273f5311773cb24e733b221353073a59d406597cfa76c7e",
          "hashes": {
            "sha256": "7f58d7657e14e9773273f5311773cb24e733b221353073a59d406597cfa76c7e"
          },
          "href": "https://wheels.developerfirst.ibm.com/ppc64le/linux/+f/7f5/8d7657e14e977/srsly-2.5.3+ppc64le1-cp313-cp313-manylinux_2_31_ppc64le.whl",
          "log": [
            {
              "what": "upload",
              "who": "ppc64le",
              "when": [
                2026,
                7,
                23,
                10,
                27,
                49
              ],
              "dst": "ppc64le/linux"
            }
          ]
        },
        {
          "rel": "releasefile",
          "hash_spec": "sha256=4ab830a0f069e2af79667fc6a025c937457208846417011e1598e2524b94ba20",
          "hashes": {
            "sha256": "4ab830a0f069e2af79667fc6a025c937457208846417011e1598e2524b94ba20"
          },
          "href": "https://wheels.developerfirst.ibm.com/ppc64le/linux/+f/4ab/830a0f069e2af/srsly-2.5.3+ppc64le1-cp314-cp314-manylinux_2_31_ppc64le.whl",
          "log": [
            {
              "what": "upload",
              "who": "ppc64le",
              "when": [
                2026,
                7,
                23,
                10,
                27,
                50
              ],
              "dst": "ppc64le/linux"
            }
          ]
        }
      ]
    },
    "2.4.8": {
      "name": "srsly",
      "version": "2.4.8",
      "metadata_version": "2.4",
      "summary": "Modern high-performance serialization utilities for Python",
      "home_page": "https://github.com/explosion/srsly",
      "author": "Explosion",
      "author_email": "contact@explosion.ai",
      "maintainer": "",
      "maintainer_email": "",
      "license": "MIT",
      "description": "<a href=\"https://explosion.ai\"><img src=\"https://explosion.ai/assets/img/logo.svg\" width=\"125\" height=\"125\" align=\"right\" /></a>\n\n# srsly: Modern high-performance serialization utilities for Python\n\nThis package bundles some of the best Python serialization libraries into one\nstandalone package, with a high-level API that makes it easy to write code\nthat's correct across platforms and Pythons. This allows us to provide all the\nserialization utilities we need in a single binary wheel. Currently supports\n**JSON**, **JSONL**, **MessagePack**, **Pickle** and **YAML**.\n\n[![tests](https://github.com/explosion/srsly/actions/workflows/tests.yml/badge.svg)](https://github.com/explosion/srsly/actions/workflows/tests.yml)\n[![PyPi](https://img.shields.io/pypi/v/srsly.svg?style=flat-square&logo=pypi&logoColor=white)](https://pypi.python.org/pypi/srsly)\n[![conda](https://img.shields.io/conda/vn/conda-forge/srsly.svg?style=flat-square&logo=conda-forge&logoColor=white)](https://anaconda.org/conda-forge/srsly)\n[![GitHub](https://img.shields.io/github/release/explosion/srsly/all.svg?style=flat-square&logo=github)](https://github.com/explosion/srsly)\n[![Python wheels](https://img.shields.io/badge/wheels-%E2%9C%93-4c1.svg?longCache=true&style=flat-square&logo=python&logoColor=white)](https://github.com/explosion/wheelwright/releases)\n\n## Motivation\n\nSerialization is hard, especially across Python versions and multiple platforms.\nAfter dealing with many subtle bugs over the years (encodings, locales, large\nfiles) our libraries like [spaCy](https://github.com/explosion/spaCy) and\n[Prodigy](https://prodi.gy) had steadily grown a number of utility functions to\nwrap the multiple serialization formats we need to support (especially `json`,\n`msgpack` and `pickle`). These wrapping functions ended up duplicated across our\ncodebases, so we wanted to put them in one place.\n\nAt the same time, we noticed that having a lot of small dependencies was making\nmaintenance harder, and making installation slower. To solve this, we've made\n`srsly` standalone, by including the component packages directly within it. This\nway we can provide all the serialization utilities we need in a single binary\nwheel.\n\n`srsly` currently includes forks of the following packages:\n\n- [`ujson`](https://github.com/esnme/ultrajson)\n- [`msgpack`](https://github.com/msgpack/msgpack-python)\n- [`msgpack-numpy`](https://github.com/lebedov/msgpack-numpy)\n- [`cloudpickle`](https://github.com/cloudpipe/cloudpickle)\n- [`ruamel.yaml`](https://github.com/pycontribs/ruamel-yaml) (without unsafe\n  implementations!)\n\n## Installation\n\n> \u26a0\ufe0f Note that `v2.x` is only compatible with **Python 3.6+**. For 2.7+\n> compatibility, use `v1.x`.\n\n`srsly` can be installed from pip. Before installing, make sure that your `pip`,\n`setuptools` and `wheel` are up to date.\n\n```bash\npython -m pip install -U pip setuptools wheel\npython -m pip install srsly\n```\n\nOr from conda via conda-forge:\n\n```bash\nconda install -c conda-forge srsly\n```\n\nAlternatively, you can also compile the library from source. You'll need to make\nsure that you have a development environment with a Python distribution\nincluding header files, a compiler (XCode command-line tools on macOS / OS X or\nVisual C++ build tools on Windows), pip and git installed.\n\nInstall from source:\n\n```bash\n# clone the repo\ngit clone https://github.com/explosion/srsly\ncd srsly\n\n# create a virtual environment\npython -m venv .env\nsource .env/bin/activate\n\n# update pip\npython -m pip install -U pip setuptools wheel\n\n# compile and install from source\npython -m pip install .\n```\n\nFor developers, install requirements separately and then install in editable\nmode without build isolation:\n\n```bash\n# install in editable mode\npython -m pip install -r requirements.txt\npython -m pip install --no-build-isolation --editable .\n\n# run test suite\npython -m pytest --pyargs srsly\n```\n\n## API\n\n### JSON\n\n> \ud83d\udce6 The underlying module is exposed via `srsly.ujson`. However, we normally\n> interact with it via the utility functions only.\n\n#### <kbd>function</kbd> `srsly.json_dumps`\n\nSerialize an object to a JSON string. Falls back to `json` if `sort_keys=True`\nis used (until it's fixed in `ujson`).\n\n```python\ndata = {\"foo\": \"bar\", \"baz\": 123}\njson_string = srsly.json_dumps(data)\n```\n\n| Argument    | Type | Description                                            |\n| ----------- | ---- | ------------------------------------------------------ |\n| `data`      | -    | The JSON-serializable data to output.                  |\n| `indent`    | int  | Number of spaces used to indent JSON. Defaults to `0`. |\n| `sort_keys` | bool | Sort dictionary keys. Defaults to `False`.             |\n| **RETURNS** | str  | The serialized string.                                 |\n\n#### <kbd>function</kbd> `srsly.json_loads`\n\nDeserialize unicode or bytes to a Python object.\n\n```python\ndata = '{\"foo\": \"bar\", \"baz\": 123}'\nobj = srsly.json_loads(data)\n```\n\n| Argument    | Type        | Description                     |\n| ----------- | ----------- | ------------------------------- |\n| `data`      | str / bytes | The data to deserialize.        |\n| **RETURNS** | -           | The deserialized Python object. |\n\n#### <kbd>function</kbd> `srsly.write_json`\n\nCreate a JSON file and dump contents or write to standard output.\n\n```python\ndata = {\"foo\": \"bar\", \"baz\": 123}\nsrsly.write_json(\"/path/to/file.json\", data)\n```\n\n| Argument | Type         | Description                                            |\n| -------- | ------------ | ------------------------------------------------------ |\n| `path`   | str / `Path` | The file path or `\"-\"` to write to stdout.             |\n| `data`   | -            | The JSON-serializable data to output.                  |\n| `indent` | int          | Number of spaces used to indent JSON. Defaults to `2`. |\n\n#### <kbd>function</kbd> `srsly.read_json`\n\nLoad JSON from a file or standard input.\n\n```python\ndata = srsly.read_json(\"/path/to/file.json\")\n```\n\n| Argument    | Type         | Description                                |\n| ----------- | ------------ | ------------------------------------------ |\n| `path`      | str / `Path` | The file path or `\"-\"` to read from stdin. |\n| **RETURNS** | dict / list  | The loaded JSON content.                   |\n\n#### <kbd>function</kbd> `srsly.write_gzip_json`\n\nCreate a gzipped JSON file and dump contents.\n\n```python\ndata = {\"foo\": \"bar\", \"baz\": 123}\nsrsly.write_gzip_json(\"/path/to/file.json.gz\", data)\n```\n\n| Argument | Type         | Description                                            |\n| -------- | ------------ | ------------------------------------------------------ |\n| `path`   | str / `Path` | The file path.                                         |\n| `data`   | -            | The JSON-serializable data to output.                  |\n| `indent` | int          | Number of spaces used to indent JSON. Defaults to `2`. |\n\n#### <kbd>function</kbd> `srsly.write_gzip_jsonl`\n\nCreate a gzipped JSONL file and dump contents.\n\n```python\ndata = [{\"foo\": \"bar\"}, {\"baz\": 123}]\nsrsly.write_gzip_json(\"/path/to/file.jsonl.gz\", data)\n```\n\n| Argument          | Type         | Description                                                                                                                                                                                                             |\n| ----------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `path`            | str / `Path` | The file path.                                                                                                                                                                                                          |\n| `lines`           | -            | The JSON-serializable contents of each line.                                                                                                                                                                            |\n| `append`          | bool         | Whether or not to append to the location. Appending to .gz files is generally not recommended, as it doesn't allow the algorithm to take advantage of all data when compressing - files may hence be poorly compressed. |\n| `append_new_line` | bool         | Whether or not to write a new line before appending to the file.                                                                                                                                                        |\n\n#### <kbd>function</kbd> `srsly.read_gzip_json`\n\nLoad gzipped JSON from a file.\n\n```python\ndata = srsly.read_gzip_json(\"/path/to/file.json.gz\")\n```\n\n| Argument    | Type         | Description              |\n| ----------- | ------------ | ------------------------ |\n| `path`      | str / `Path` | The file path.           |\n| **RETURNS** | dict / list  | The loaded JSON content. |\n\n#### <kbd>function</kbd> `srsly.read_gzip_jsonl`\n\nLoad gzipped JSONL from a file.\n\n```python\ndata = srsly.read_gzip_jsonl(\"/path/to/file.jsonl.gz\")\n```\n\n| Argument    | Type         | Description               |\n| ----------- | ------------ | ------------------------- |\n| `path`      | str / `Path` | The file path.            |\n| **RETURNS** | dict / list  | The loaded JSONL content. |\n\n#### <kbd>function</kbd> `srsly.write_jsonl`\n\nCreate a JSONL file (newline-delimited JSON) and dump contents line by line, or\nwrite to standard output.\n\n```python\ndata = [{\"foo\": \"bar\"}, {\"baz\": 123}]\nsrsly.write_jsonl(\"/path/to/file.jsonl\", data)\n```\n\n| Argument          | Type         | Description                                                                                                            |\n| ----------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------- |\n| `path`            | str / `Path` | The file path or `\"-\"` to write to stdout.                                                                             |\n| `lines`           | iterable     | The JSON-serializable lines.                                                                                           |\n| `append`          | bool         | Append to an existing file. Will open it in `\"a\"` mode and insert a newline before writing lines. Defaults to `False`. |\n| `append_new_line` | bool         | Defines whether a new line should first be written when appending to an existing file. Defaults to `True`.             |\n\n#### <kbd>function</kbd> `srsly.read_jsonl`\n\nRead a JSONL file (newline-delimited JSON) or from JSONL data from standard\ninput and yield contents line by line. Blank lines will always be skipped.\n\n```python\ndata = srsly.read_jsonl(\"/path/to/file.jsonl\")\n```\n\n| Argument   | Type       | Description                                                          |\n| ---------- | ---------- | -------------------------------------------------------------------- |\n| `path`     | str / Path | The file path or `\"-\"` to read from stdin.                           |\n| `skip`     | bool       | Skip broken lines and don't raise `ValueError`. Defaults to `False`. |\n| **YIELDS** | -          | The loaded JSON contents of each line.                               |\n\n#### <kbd>function</kbd> `srsly.is_json_serializable`\n\nCheck if a Python object is JSON-serializable.\n\n```python\nassert srsly.is_json_serializable({\"hello\": \"world\"}) is True\nassert srsly.is_json_serializable(lambda x: x) is False\n```\n\n| Argument    | Type | Description                              |\n| ----------- | ---- | ---------------------------------------- |\n| `obj`       | -    | The object to check.                     |\n| **RETURNS** | bool | Whether the object is JSON-serializable. |\n\n### msgpack\n\n> \ud83d\udce6 The underlying module is exposed via `srsly.msgpack`. However, we normally\n> interact with it via the utility functions only.\n\n#### <kbd>function</kbd> `srsly.msgpack_dumps`\n\nSerialize an object to a msgpack byte string.\n\n```python\ndata = {\"foo\": \"bar\", \"baz\": 123}\nmsg = srsly.msgpack_dumps(data)\n```\n\n| Argument    | Type  | Description            |\n| ----------- | ----- | ---------------------- |\n| `data`      | -     | The data to serialize. |\n| **RETURNS** | bytes | The serialized bytes.  |\n\n#### <kbd>function</kbd> `srsly.msgpack_loads`\n\nDeserialize msgpack bytes to a Python object.\n\n```python\nmsg = b\"\\x82\\xa3foo\\xa3bar\\xa3baz{\"\ndata = srsly.msgpack_loads(msg)\n```\n\n| Argument    | Type  | Description                                                                             |\n| ----------- | ----- | --------------------------------------------------------------------------------------- |\n| `data`      | bytes | The data to deserialize.                                                                |\n| `use_list`  | bool  | Don't use tuples instead of lists. Can make deserialization slower. Defaults to `True`. |\n| **RETURNS** | -     | The deserialized Python object.                                                         |\n\n#### <kbd>function</kbd> `srsly.write_msgpack`\n\nCreate a msgpack file and dump contents.\n\n```python\ndata = {\"foo\": \"bar\", \"baz\": 123}\nsrsly.write_msgpack(\"/path/to/file.msg\", data)\n```\n\n| Argument | Type         | Description            |\n| -------- | ------------ | ---------------------- |\n| `path`   | str / `Path` | The file path.         |\n| `data`   | -            | The data to serialize. |\n\n#### <kbd>function</kbd> `srsly.read_msgpack`\n\nLoad a msgpack file.\n\n```python\ndata = srsly.read_msgpack(\"/path/to/file.msg\")\n```\n\n| Argument    | Type         | Description                                                                             |\n| ----------- | ------------ | --------------------------------------------------------------------------------------- |\n| `path`      | str / `Path` | The file path.                                                                          |\n| `use_list`  | bool         | Don't use tuples instead of lists. Can make deserialization slower. Defaults to `True`. |\n| **RETURNS** | -            | The loaded and deserialized content.                                                    |\n\n### pickle\n\n> \ud83d\udce6 The underlying module is exposed via `srsly.cloudpickle`. However, we\n> normally interact with it via the utility functions only.\n\n#### <kbd>function</kbd> `srsly.pickle_dumps`\n\nSerialize a Python object with pickle.\n\n```python\ndata = {\"foo\": \"bar\", \"baz\": 123}\npickled_data = srsly.pickle_dumps(data)\n```\n\n| Argument    | Type  | Description                                            |\n| ----------- | ----- | ------------------------------------------------------ |\n| `data`      | -     | The object to serialize.                               |\n| `protocol`  | int   | Protocol to use. `-1` for highest. Defaults to `None`. |\n| **RETURNS** | bytes | The serialized object.                                 |\n\n#### <kbd>function</kbd> `srsly.pickle_loads`\n\nDeserialize bytes with pickle.\n\n```python\npickled_data = b\"\\x80\\x04\\x95\\x19\\x00\\x00\\x00\\x00\\x00\\x00\\x00}\\x94(\\x8c\\x03foo\\x94\\x8c\\x03bar\\x94\\x8c\\x03baz\\x94K{u.\"\ndata = srsly.pickle_loads(pickled_data)\n```\n\n| Argument    | Type  | Description                     |\n| ----------- | ----- | ------------------------------- |\n| `data`      | bytes | The data to deserialize.        |\n| **RETURNS** | -     | The deserialized Python object. |\n\n### YAML\n\n> \ud83d\udce6 The underlying module is exposed via `srsly.ruamel_yaml`. However, we\n> normally interact with it via the utility functions only.\n\n#### <kbd>function</kbd> `srsly.yaml_dumps`\n\nSerialize an object to a YAML string. See the\n[`ruamel.yaml` docs](https://yaml.readthedocs.io/en/latest/detail.html?highlight=indentation#indentation-of-block-sequences)\nfor details on the indentation format.\n\n```python\ndata = {\"foo\": \"bar\", \"baz\": 123}\nyaml_string = srsly.yaml_dumps(data)\n```\n\n| Argument          | Type | Description                                |\n| ----------------- | ---- | ------------------------------------------ |\n| `data`            | -    | The JSON-serializable data to output.      |\n| `indent_mapping`  | int  | Mapping indentation. Defaults to `2`.      |\n| `indent_sequence` | int  | Sequence indentation. Defaults to `4`.     |\n| `indent_offset`   | int  | Indentation offset. Defaults to `2`.       |\n| `sort_keys`       | bool | Sort dictionary keys. Defaults to `False`. |\n| **RETURNS**       | str  | The serialized string.                     |\n\n#### <kbd>function</kbd> `srsly.yaml_loads`\n\nDeserialize unicode or a file object to a Python object.\n\n```python\ndata = 'foo: bar\\nbaz: 123'\nobj = srsly.yaml_loads(data)\n```\n\n| Argument    | Type       | Description                     |\n| ----------- | ---------- | ------------------------------- |\n| `data`      | str / file | The data to deserialize.        |\n| **RETURNS** | -          | The deserialized Python object. |\n\n#### <kbd>function</kbd> `srsly.write_yaml`\n\nCreate a YAML file and dump contents or write to standard output.\n\n```python\ndata = {\"foo\": \"bar\", \"baz\": 123}\nsrsly.write_yaml(\"/path/to/file.yml\", data)\n```\n\n| Argument          | Type         | Description                                |\n| ----------------- | ------------ | ------------------------------------------ |\n| `path`            | str / `Path` | The file path or `\"-\"` to write to stdout. |\n| `data`            | -            | The JSON-serializable data to output.      |\n| `indent_mapping`  | int          | Mapping indentation. Defaults to `2`.      |\n| `indent_sequence` | int          | Sequence indentation. Defaults to `4`.     |\n| `indent_offset`   | int          | Indentation offset. Defaults to `2`.       |\n| `sort_keys`       | bool         | Sort dictionary keys. Defaults to `False`. |\n\n#### <kbd>function</kbd> `srsly.read_yaml`\n\nLoad YAML from a file or standard input.\n\n```python\ndata = srsly.read_yaml(\"/path/to/file.yml\")\n```\n\n| Argument    | Type         | Description                                |\n| ----------- | ------------ | ------------------------------------------ |\n| `path`      | str / `Path` | The file path or `\"-\"` to read from stdin. |\n| **RETURNS** | dict / list  | The loaded YAML content.                   |\n\n#### <kbd>function</kbd> `srsly.is_yaml_serializable`\n\nCheck if a Python object is YAML-serializable.\n\n```python\nassert srsly.is_yaml_serializable({\"hello\": \"world\"}) is True\nassert srsly.is_yaml_serializable(lambda x: x) is False\n```\n\n| Argument    | Type | Description                              |\n| ----------- | ---- | ---------------------------------------- |\n| `obj`       | -    | The object to check.                     |\n| **RETURNS** | bool | Whether the object is YAML-serializable. |\n",
      "keywords": "",
      "platform": [],
      "classifiers": [
        "Development Status :: 5 - Production/Stable",
        "Environment :: Console",
        "Intended Audience :: Developers",
        "Intended Audience :: Science/Research",
        "License :: OSI Approved :: MIT License",
        "Operating System :: POSIX :: Linux",
        "Operating System :: MacOS :: MacOS X",
        "Operating System :: Microsoft :: Windows",
        "Programming Language :: Cython",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.6",
        "Programming Language :: Python :: 3.7",
        "Programming Language :: Python :: 3.8",
        "Programming Language :: Python :: 3.9",
        "Programming Language :: Python :: 3.10",
        "Programming Language :: Python :: 3.11",
        "Programming Language :: Python :: 3.12",
        "Topic :: Scientific/Engineering",
        "Environment :: MetaData :: IBM Python Ecosystem"
      ],
      "download_url": "",
      "supported_platform": [],
      "comment": "",
      "provides": [],
      "requires": [],
      "obsoletes": [],
      "project_urls": [],
      "provides_dist": [],
      "obsoletes_dist": [],
      "requires_dist": [
        "catalogue<2.1.0,>=2.0.3"
      ],
      "requires_external": [],
      "requires_python": ">=3.6",
      "description_content_type": "text/markdown",
      "provides_extras": [],
      "dynamic": [
        "license-file"
      ],
      "license_expression": "",
      "license_file": [
        "LICENSE"
      ],
      "+links": [
        {
          "rel": "releasefile",
          "hash_spec": "sha256=8b82efdb77210508bf35d1a7f145f0513654c12caf6ffa8764cfb75d4cc78c9d",
          "hashes": {
            "sha256": "8b82efdb77210508bf35d1a7f145f0513654c12caf6ffa8764cfb75d4cc78c9d"
          },
          "href": "https://wheels.developerfirst.ibm.com/ppc64le/linux/+f/8b8/2efdb77210508/srsly-2.4.8-cp310-cp310-manylinux_2_31_ppc64le.whl",
          "log": [
            {
              "what": "upload",
              "who": "ppc64le",
              "when": [
                2026,
                7,
                27,
                13,
                15,
                47
              ],
              "dst": "ppc64le/linux"
            }
          ]
        },
        {
          "rel": "releasefile",
          "hash_spec": "sha256=517ccfa65e635703f9cfcb8e83313a7d922b939e3f7174d4ce61ee6955b0325f",
          "hashes": {
            "sha256": "517ccfa65e635703f9cfcb8e83313a7d922b939e3f7174d4ce61ee6955b0325f"
          },
          "href": "https://wheels.developerfirst.ibm.com/ppc64le/linux/+f/517/ccfa65e635703/srsly-2.4.8-cp311-cp311-manylinux_2_31_ppc64le.whl",
          "log": [
            {
              "what": "upload",
              "who": "ppc64le",
              "when": [
                2026,
                7,
                27,
                13,
                15,
                47
              ],
              "dst": "ppc64le/linux"
            }
          ]
        },
        {
          "rel": "releasefile",
          "hash_spec": "sha256=f45793e9049e8bcc068a39e8aa38656dcdf4c8852268cd133b4ba3a6e0b62f43",
          "hashes": {
            "sha256": "f45793e9049e8bcc068a39e8aa38656dcdf4c8852268cd133b4ba3a6e0b62f43"
          },
          "href": "https://wheels.developerfirst.ibm.com/ppc64le/linux/+f/f45/793e9049e8bcc/srsly-2.4.8-cp312-cp312-manylinux_2_31_ppc64le.whl",
          "log": [
            {
              "what": "upload",
              "who": "ppc64le",
              "when": [
                2026,
                7,
                27,
                13,
                15,
                47
              ],
              "dst": "ppc64le/linux"
            }
          ]
        }
      ]
    },
    "2.4.8+ppc64le1": {
      "name": "srsly",
      "version": "2.4.8+ppc64le1",
      "metadata_version": "2.4",
      "summary": "Modern high-performance serialization utilities for Python",
      "home_page": "https://github.com/explosion/srsly",
      "author": "Explosion",
      "author_email": "contact@explosion.ai",
      "maintainer": "",
      "maintainer_email": "",
      "license": "MIT",
      "description": "<a href=\"https://explosion.ai\"><img src=\"https://explosion.ai/assets/img/logo.svg\" width=\"125\" height=\"125\" align=\"right\" /></a>\n\n# srsly: Modern high-performance serialization utilities for Python\n\nThis package bundles some of the best Python serialization libraries into one\nstandalone package, with a high-level API that makes it easy to write code\nthat's correct across platforms and Pythons. This allows us to provide all the\nserialization utilities we need in a single binary wheel. Currently supports\n**JSON**, **JSONL**, **MessagePack**, **Pickle** and **YAML**.\n\n[![tests](https://github.com/explosion/srsly/actions/workflows/tests.yml/badge.svg)](https://github.com/explosion/srsly/actions/workflows/tests.yml)\n[![PyPi](https://img.shields.io/pypi/v/srsly.svg?style=flat-square&logo=pypi&logoColor=white)](https://pypi.python.org/pypi/srsly)\n[![conda](https://img.shields.io/conda/vn/conda-forge/srsly.svg?style=flat-square&logo=conda-forge&logoColor=white)](https://anaconda.org/conda-forge/srsly)\n[![GitHub](https://img.shields.io/github/release/explosion/srsly/all.svg?style=flat-square&logo=github)](https://github.com/explosion/srsly)\n[![Python wheels](https://img.shields.io/badge/wheels-%E2%9C%93-4c1.svg?longCache=true&style=flat-square&logo=python&logoColor=white)](https://github.com/explosion/wheelwright/releases)\n\n## Motivation\n\nSerialization is hard, especially across Python versions and multiple platforms.\nAfter dealing with many subtle bugs over the years (encodings, locales, large\nfiles) our libraries like [spaCy](https://github.com/explosion/spaCy) and\n[Prodigy](https://prodi.gy) had steadily grown a number of utility functions to\nwrap the multiple serialization formats we need to support (especially `json`,\n`msgpack` and `pickle`). These wrapping functions ended up duplicated across our\ncodebases, so we wanted to put them in one place.\n\nAt the same time, we noticed that having a lot of small dependencies was making\nmaintenance harder, and making installation slower. To solve this, we've made\n`srsly` standalone, by including the component packages directly within it. This\nway we can provide all the serialization utilities we need in a single binary\nwheel.\n\n`srsly` currently includes forks of the following packages:\n\n- [`ujson`](https://github.com/esnme/ultrajson)\n- [`msgpack`](https://github.com/msgpack/msgpack-python)\n- [`msgpack-numpy`](https://github.com/lebedov/msgpack-numpy)\n- [`cloudpickle`](https://github.com/cloudpipe/cloudpickle)\n- [`ruamel.yaml`](https://github.com/pycontribs/ruamel-yaml) (without unsafe\n  implementations!)\n\n## Installation\n\n> \u26a0\ufe0f Note that `v2.x` is only compatible with **Python 3.6+**. For 2.7+\n> compatibility, use `v1.x`.\n\n`srsly` can be installed from pip. Before installing, make sure that your `pip`,\n`setuptools` and `wheel` are up to date.\n\n```bash\npython -m pip install -U pip setuptools wheel\npython -m pip install srsly\n```\n\nOr from conda via conda-forge:\n\n```bash\nconda install -c conda-forge srsly\n```\n\nAlternatively, you can also compile the library from source. You'll need to make\nsure that you have a development environment with a Python distribution\nincluding header files, a compiler (XCode command-line tools on macOS / OS X or\nVisual C++ build tools on Windows), pip and git installed.\n\nInstall from source:\n\n```bash\n# clone the repo\ngit clone https://github.com/explosion/srsly\ncd srsly\n\n# create a virtual environment\npython -m venv .env\nsource .env/bin/activate\n\n# update pip\npython -m pip install -U pip setuptools wheel\n\n# compile and install from source\npython -m pip install .\n```\n\nFor developers, install requirements separately and then install in editable\nmode without build isolation:\n\n```bash\n# install in editable mode\npython -m pip install -r requirements.txt\npython -m pip install --no-build-isolation --editable .\n\n# run test suite\npython -m pytest --pyargs srsly\n```\n\n## API\n\n### JSON\n\n> \ud83d\udce6 The underlying module is exposed via `srsly.ujson`. However, we normally\n> interact with it via the utility functions only.\n\n#### <kbd>function</kbd> `srsly.json_dumps`\n\nSerialize an object to a JSON string. Falls back to `json` if `sort_keys=True`\nis used (until it's fixed in `ujson`).\n\n```python\ndata = {\"foo\": \"bar\", \"baz\": 123}\njson_string = srsly.json_dumps(data)\n```\n\n| Argument    | Type | Description                                            |\n| ----------- | ---- | ------------------------------------------------------ |\n| `data`      | -    | The JSON-serializable data to output.                  |\n| `indent`    | int  | Number of spaces used to indent JSON. Defaults to `0`. |\n| `sort_keys` | bool | Sort dictionary keys. Defaults to `False`.             |\n| **RETURNS** | str  | The serialized string.                                 |\n\n#### <kbd>function</kbd> `srsly.json_loads`\n\nDeserialize unicode or bytes to a Python object.\n\n```python\ndata = '{\"foo\": \"bar\", \"baz\": 123}'\nobj = srsly.json_loads(data)\n```\n\n| Argument    | Type        | Description                     |\n| ----------- | ----------- | ------------------------------- |\n| `data`      | str / bytes | The data to deserialize.        |\n| **RETURNS** | -           | The deserialized Python object. |\n\n#### <kbd>function</kbd> `srsly.write_json`\n\nCreate a JSON file and dump contents or write to standard output.\n\n```python\ndata = {\"foo\": \"bar\", \"baz\": 123}\nsrsly.write_json(\"/path/to/file.json\", data)\n```\n\n| Argument | Type         | Description                                            |\n| -------- | ------------ | ------------------------------------------------------ |\n| `path`   | str / `Path` | The file path or `\"-\"` to write to stdout.             |\n| `data`   | -            | The JSON-serializable data to output.                  |\n| `indent` | int          | Number of spaces used to indent JSON. Defaults to `2`. |\n\n#### <kbd>function</kbd> `srsly.read_json`\n\nLoad JSON from a file or standard input.\n\n```python\ndata = srsly.read_json(\"/path/to/file.json\")\n```\n\n| Argument    | Type         | Description                                |\n| ----------- | ------------ | ------------------------------------------ |\n| `path`      | str / `Path` | The file path or `\"-\"` to read from stdin. |\n| **RETURNS** | dict / list  | The loaded JSON content.                   |\n\n#### <kbd>function</kbd> `srsly.write_gzip_json`\n\nCreate a gzipped JSON file and dump contents.\n\n```python\ndata = {\"foo\": \"bar\", \"baz\": 123}\nsrsly.write_gzip_json(\"/path/to/file.json.gz\", data)\n```\n\n| Argument | Type         | Description                                            |\n| -------- | ------------ | ------------------------------------------------------ |\n| `path`   | str / `Path` | The file path.                                         |\n| `data`   | -            | The JSON-serializable data to output.                  |\n| `indent` | int          | Number of spaces used to indent JSON. Defaults to `2`. |\n\n#### <kbd>function</kbd> `srsly.write_gzip_jsonl`\n\nCreate a gzipped JSONL file and dump contents.\n\n```python\ndata = [{\"foo\": \"bar\"}, {\"baz\": 123}]\nsrsly.write_gzip_json(\"/path/to/file.jsonl.gz\", data)\n```\n\n| Argument          | Type         | Description                                                                                                                                                                                                             |\n| ----------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `path`            | str / `Path` | The file path.                                                                                                                                                                                                          |\n| `lines`           | -            | The JSON-serializable contents of each line.                                                                                                                                                                            |\n| `append`          | bool         | Whether or not to append to the location. Appending to .gz files is generally not recommended, as it doesn't allow the algorithm to take advantage of all data when compressing - files may hence be poorly compressed. |\n| `append_new_line` | bool         | Whether or not to write a new line before appending to the file.                                                                                                                                                        |\n\n#### <kbd>function</kbd> `srsly.read_gzip_json`\n\nLoad gzipped JSON from a file.\n\n```python\ndata = srsly.read_gzip_json(\"/path/to/file.json.gz\")\n```\n\n| Argument    | Type         | Description              |\n| ----------- | ------------ | ------------------------ |\n| `path`      | str / `Path` | The file path.           |\n| **RETURNS** | dict / list  | The loaded JSON content. |\n\n#### <kbd>function</kbd> `srsly.read_gzip_jsonl`\n\nLoad gzipped JSONL from a file.\n\n```python\ndata = srsly.read_gzip_jsonl(\"/path/to/file.jsonl.gz\")\n```\n\n| Argument    | Type         | Description               |\n| ----------- | ------------ | ------------------------- |\n| `path`      | str / `Path` | The file path.            |\n| **RETURNS** | dict / list  | The loaded JSONL content. |\n\n#### <kbd>function</kbd> `srsly.write_jsonl`\n\nCreate a JSONL file (newline-delimited JSON) and dump contents line by line, or\nwrite to standard output.\n\n```python\ndata = [{\"foo\": \"bar\"}, {\"baz\": 123}]\nsrsly.write_jsonl(\"/path/to/file.jsonl\", data)\n```\n\n| Argument          | Type         | Description                                                                                                            |\n| ----------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------- |\n| `path`            | str / `Path` | The file path or `\"-\"` to write to stdout.                                                                             |\n| `lines`           | iterable     | The JSON-serializable lines.                                                                                           |\n| `append`          | bool         | Append to an existing file. Will open it in `\"a\"` mode and insert a newline before writing lines. Defaults to `False`. |\n| `append_new_line` | bool         | Defines whether a new line should first be written when appending to an existing file. Defaults to `True`.             |\n\n#### <kbd>function</kbd> `srsly.read_jsonl`\n\nRead a JSONL file (newline-delimited JSON) or from JSONL data from standard\ninput and yield contents line by line. Blank lines will always be skipped.\n\n```python\ndata = srsly.read_jsonl(\"/path/to/file.jsonl\")\n```\n\n| Argument   | Type       | Description                                                          |\n| ---------- | ---------- | -------------------------------------------------------------------- |\n| `path`     | str / Path | The file path or `\"-\"` to read from stdin.                           |\n| `skip`     | bool       | Skip broken lines and don't raise `ValueError`. Defaults to `False`. |\n| **YIELDS** | -          | The loaded JSON contents of each line.                               |\n\n#### <kbd>function</kbd> `srsly.is_json_serializable`\n\nCheck if a Python object is JSON-serializable.\n\n```python\nassert srsly.is_json_serializable({\"hello\": \"world\"}) is True\nassert srsly.is_json_serializable(lambda x: x) is False\n```\n\n| Argument    | Type | Description                              |\n| ----------- | ---- | ---------------------------------------- |\n| `obj`       | -    | The object to check.                     |\n| **RETURNS** | bool | Whether the object is JSON-serializable. |\n\n### msgpack\n\n> \ud83d\udce6 The underlying module is exposed via `srsly.msgpack`. However, we normally\n> interact with it via the utility functions only.\n\n#### <kbd>function</kbd> `srsly.msgpack_dumps`\n\nSerialize an object to a msgpack byte string.\n\n```python\ndata = {\"foo\": \"bar\", \"baz\": 123}\nmsg = srsly.msgpack_dumps(data)\n```\n\n| Argument    | Type  | Description            |\n| ----------- | ----- | ---------------------- |\n| `data`      | -     | The data to serialize. |\n| **RETURNS** | bytes | The serialized bytes.  |\n\n#### <kbd>function</kbd> `srsly.msgpack_loads`\n\nDeserialize msgpack bytes to a Python object.\n\n```python\nmsg = b\"\\x82\\xa3foo\\xa3bar\\xa3baz{\"\ndata = srsly.msgpack_loads(msg)\n```\n\n| Argument    | Type  | Description                                                                             |\n| ----------- | ----- | --------------------------------------------------------------------------------------- |\n| `data`      | bytes | The data to deserialize.                                                                |\n| `use_list`  | bool  | Don't use tuples instead of lists. Can make deserialization slower. Defaults to `True`. |\n| **RETURNS** | -     | The deserialized Python object.                                                         |\n\n#### <kbd>function</kbd> `srsly.write_msgpack`\n\nCreate a msgpack file and dump contents.\n\n```python\ndata = {\"foo\": \"bar\", \"baz\": 123}\nsrsly.write_msgpack(\"/path/to/file.msg\", data)\n```\n\n| Argument | Type         | Description            |\n| -------- | ------------ | ---------------------- |\n| `path`   | str / `Path` | The file path.         |\n| `data`   | -            | The data to serialize. |\n\n#### <kbd>function</kbd> `srsly.read_msgpack`\n\nLoad a msgpack file.\n\n```python\ndata = srsly.read_msgpack(\"/path/to/file.msg\")\n```\n\n| Argument    | Type         | Description                                                                             |\n| ----------- | ------------ | --------------------------------------------------------------------------------------- |\n| `path`      | str / `Path` | The file path.                                                                          |\n| `use_list`  | bool         | Don't use tuples instead of lists. Can make deserialization slower. Defaults to `True`. |\n| **RETURNS** | -            | The loaded and deserialized content.                                                    |\n\n### pickle\n\n> \ud83d\udce6 The underlying module is exposed via `srsly.cloudpickle`. However, we\n> normally interact with it via the utility functions only.\n\n#### <kbd>function</kbd> `srsly.pickle_dumps`\n\nSerialize a Python object with pickle.\n\n```python\ndata = {\"foo\": \"bar\", \"baz\": 123}\npickled_data = srsly.pickle_dumps(data)\n```\n\n| Argument    | Type  | Description                                            |\n| ----------- | ----- | ------------------------------------------------------ |\n| `data`      | -     | The object to serialize.                               |\n| `protocol`  | int   | Protocol to use. `-1` for highest. Defaults to `None`. |\n| **RETURNS** | bytes | The serialized object.                                 |\n\n#### <kbd>function</kbd> `srsly.pickle_loads`\n\nDeserialize bytes with pickle.\n\n```python\npickled_data = b\"\\x80\\x04\\x95\\x19\\x00\\x00\\x00\\x00\\x00\\x00\\x00}\\x94(\\x8c\\x03foo\\x94\\x8c\\x03bar\\x94\\x8c\\x03baz\\x94K{u.\"\ndata = srsly.pickle_loads(pickled_data)\n```\n\n| Argument    | Type  | Description                     |\n| ----------- | ----- | ------------------------------- |\n| `data`      | bytes | The data to deserialize.        |\n| **RETURNS** | -     | The deserialized Python object. |\n\n### YAML\n\n> \ud83d\udce6 The underlying module is exposed via `srsly.ruamel_yaml`. However, we\n> normally interact with it via the utility functions only.\n\n#### <kbd>function</kbd> `srsly.yaml_dumps`\n\nSerialize an object to a YAML string. See the\n[`ruamel.yaml` docs](https://yaml.readthedocs.io/en/latest/detail.html?highlight=indentation#indentation-of-block-sequences)\nfor details on the indentation format.\n\n```python\ndata = {\"foo\": \"bar\", \"baz\": 123}\nyaml_string = srsly.yaml_dumps(data)\n```\n\n| Argument          | Type | Description                                |\n| ----------------- | ---- | ------------------------------------------ |\n| `data`            | -    | The JSON-serializable data to output.      |\n| `indent_mapping`  | int  | Mapping indentation. Defaults to `2`.      |\n| `indent_sequence` | int  | Sequence indentation. Defaults to `4`.     |\n| `indent_offset`   | int  | Indentation offset. Defaults to `2`.       |\n| `sort_keys`       | bool | Sort dictionary keys. Defaults to `False`. |\n| **RETURNS**       | str  | The serialized string.                     |\n\n#### <kbd>function</kbd> `srsly.yaml_loads`\n\nDeserialize unicode or a file object to a Python object.\n\n```python\ndata = 'foo: bar\\nbaz: 123'\nobj = srsly.yaml_loads(data)\n```\n\n| Argument    | Type       | Description                     |\n| ----------- | ---------- | ------------------------------- |\n| `data`      | str / file | The data to deserialize.        |\n| **RETURNS** | -          | The deserialized Python object. |\n\n#### <kbd>function</kbd> `srsly.write_yaml`\n\nCreate a YAML file and dump contents or write to standard output.\n\n```python\ndata = {\"foo\": \"bar\", \"baz\": 123}\nsrsly.write_yaml(\"/path/to/file.yml\", data)\n```\n\n| Argument          | Type         | Description                                |\n| ----------------- | ------------ | ------------------------------------------ |\n| `path`            | str / `Path` | The file path or `\"-\"` to write to stdout. |\n| `data`            | -            | The JSON-serializable data to output.      |\n| `indent_mapping`  | int          | Mapping indentation. Defaults to `2`.      |\n| `indent_sequence` | int          | Sequence indentation. Defaults to `4`.     |\n| `indent_offset`   | int          | Indentation offset. Defaults to `2`.       |\n| `sort_keys`       | bool         | Sort dictionary keys. Defaults to `False`. |\n\n#### <kbd>function</kbd> `srsly.read_yaml`\n\nLoad YAML from a file or standard input.\n\n```python\ndata = srsly.read_yaml(\"/path/to/file.yml\")\n```\n\n| Argument    | Type         | Description                                |\n| ----------- | ------------ | ------------------------------------------ |\n| `path`      | str / `Path` | The file path or `\"-\"` to read from stdin. |\n| **RETURNS** | dict / list  | The loaded YAML content.                   |\n\n#### <kbd>function</kbd> `srsly.is_yaml_serializable`\n\nCheck if a Python object is YAML-serializable.\n\n```python\nassert srsly.is_yaml_serializable({\"hello\": \"world\"}) is True\nassert srsly.is_yaml_serializable(lambda x: x) is False\n```\n\n| Argument    | Type | Description                              |\n| ----------- | ---- | ---------------------------------------- |\n| `obj`       | -    | The object to check.                     |\n| **RETURNS** | bool | Whether the object is YAML-serializable. |\n",
      "keywords": "",
      "platform": [],
      "classifiers": [
        "Development Status :: 5 - Production/Stable",
        "Environment :: Console",
        "Intended Audience :: Developers",
        "Intended Audience :: Science/Research",
        "License :: OSI Approved :: MIT License",
        "Operating System :: POSIX :: Linux",
        "Operating System :: MacOS :: MacOS X",
        "Operating System :: Microsoft :: Windows",
        "Programming Language :: Cython",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.6",
        "Programming Language :: Python :: 3.7",
        "Programming Language :: Python :: 3.8",
        "Programming Language :: Python :: 3.9",
        "Programming Language :: Python :: 3.10",
        "Programming Language :: Python :: 3.11",
        "Programming Language :: Python :: 3.12",
        "Topic :: Scientific/Engineering",
        "Environment :: MetaData :: IBM Python Ecosystem"
      ],
      "download_url": "",
      "supported_platform": [],
      "comment": "",
      "provides": [],
      "requires": [],
      "obsoletes": [],
      "project_urls": [],
      "provides_dist": [],
      "obsoletes_dist": [],
      "requires_dist": [
        "catalogue<2.1.0,>=2.0.3"
      ],
      "requires_external": [],
      "requires_python": ">=3.6",
      "description_content_type": "text/markdown",
      "provides_extras": [],
      "dynamic": [
        "license-file"
      ],
      "license_expression": "",
      "license_file": [
        "LICENSE"
      ],
      "+links": [
        {
          "rel": "releasefile",
          "hash_spec": "sha256=181b879cb502058a93b2bc9497ed87167954e23b84da45909cf2c1f3db92f79c",
          "hashes": {
            "sha256": "181b879cb502058a93b2bc9497ed87167954e23b84da45909cf2c1f3db92f79c"
          },
          "href": "https://wheels.developerfirst.ibm.com/ppc64le/linux/+f/181/b879cb502058a/srsly-2.4.8+ppc64le1-cp310-cp310-manylinux_2_31_ppc64le.whl",
          "log": [
            {
              "what": "upload",
              "who": "ppc64le",
              "when": [
                2026,
                7,
                23,
                10,
                27,
                46
              ],
              "dst": "ppc64le/linux"
            }
          ]
        },
        {
          "rel": "releasefile",
          "hash_spec": "sha256=860f8eadf5f846ee71500a6fd0156da816ab95ed77776e78c19aea5dd91d2c1e",
          "hashes": {
            "sha256": "860f8eadf5f846ee71500a6fd0156da816ab95ed77776e78c19aea5dd91d2c1e"
          },
          "href": "https://wheels.developerfirst.ibm.com/ppc64le/linux/+f/860/f8eadf5f846ee/srsly-2.4.8+ppc64le1-cp311-cp311-manylinux_2_31_ppc64le.whl",
          "log": [
            {
              "what": "upload",
              "who": "ppc64le",
              "when": [
                2026,
                7,
                23,
                10,
                27,
                46
              ],
              "dst": "ppc64le/linux"
            }
          ]
        },
        {
          "rel": "releasefile",
          "hash_spec": "sha256=1b32f2c9fd435987e70541f6d9f035b235d3717211e3241b277318b5b92f95e9",
          "hashes": {
            "sha256": "1b32f2c9fd435987e70541f6d9f035b235d3717211e3241b277318b5b92f95e9"
          },
          "href": "https://wheels.developerfirst.ibm.com/ppc64le/linux/+f/1b3/2f2c9fd435987/srsly-2.4.8+ppc64le1-cp312-cp312-manylinux_2_31_ppc64le.whl",
          "log": [
            {
              "what": "upload",
              "who": "ppc64le",
              "when": [
                2026,
                7,
                23,
                10,
                27,
                47
              ],
              "dst": "ppc64le/linux"
            }
          ]
        }
      ]
    }
  },
  "type": "projectconfig"
}
