$npx skillfedfor your agent

marshmallow-fastoneofschema

fast marshmallow multiplexing schema

With conditionsPyPI Software DevelopmentReleased Sep 2025194.6K downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — marshmallow_fastoneofschema-2025.9.2.1.dev7-py3-none-any.whl
v2025.9.2.1.dev7 · released 2025-09-02 · Python >=3.11 · 1 runtime deps: marshmallow

Yes, if you need polymorphic schema support in marshmallow and want a drop-in replacement for marshmallow-oneofschema. The low install friction, permissive license, and zero known vulnerabilities make it a straightforward choice. However, the aging maintenance status (no updates since initial release on 2025-09-02) and very low repository stars (1) suggest limited community adoption and testing; evaluate whether the performance claims and stability are suitable for your use case before committing to production.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.11 or later.
  • If marshmallow-oneofschema is installed alongside this package, set FASTONEOFSCHEMA_DISABLE_PTH=1 to avoid import redirection.
  • Low install friction with a single runtime dependency on marshmallow.

License · maintenance · safety

permissive license (permissive) — MIT licensed with permissive terms. You can use, modify, and distribute the package freely with minimal restrictions, provided you retain the copyright notice and license text.

last release 2025-09-02 (346 days) · last repo commit 2025-09-02 · 1 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 194,570 downloads/mo, #9,831 on PyPI

Verify before relying

pip install marshmallow-fastoneofschema

from marshmallow_fastoneofschema import OneOfSchema
import marshmallow

class MyUberSchema(OneOfSchema):
    type_schemas = {"Foo": FooSchema, "Bar": BarSchema}

MyUberSchema().dump([Foo(foo="hello"), Bar(bar=123)], many=True)
  • Whether the performance improvements over the upstream marshmallow-oneofschema are measurable in typical workloads.
  • Stability and maturity of the DeepFriedMarshmallow plugin integration for production use.
  • Real-world compatibility with complex nested schema hierarchies beyond the documented examples.
Same gist for agents: .md · .json

What it is and what it does

marshmallow-fastoneofschema is a drop-in replacement for marshmallow-oneofschema that adds polymorphic schema support to marshmallow. It lets you define a single schema that can serialize and deserialize multiple object types by routing each object to the appropriate sub-schema based on its type. During serialization, it inspects the object type, selects the matching schema, and adds a discriminator field (by default named 'type') to the output. During deserialization, it reads the discriminator field to determine which schema to use for reconstruction.

The package is designed as a performance-optimized fork with aggressive instance caching and reduced overhead for batch operations. It includes a .pth hook that redirects imports of the original marshmallow-oneofschema to this fork, allowing it to work as a transparent replacement. It also ships a DeepFriedMarshmallow plugin for JIT inlining of nested OneOfSchema fields. Configuration is available via environment variables (FOO_DISABLE_AGGRESSIVE_MODE, FOO_CONTEXT_ISOLATION) and per-schema class attributes.

Use it for

  • Serialize heterogeneous lists of objects (e.g., different event types) to JSON with automatic type tagging for deserialization.
  • Build REST API responses that contain polymorphic data structures without manual type-checking logic.
  • Deserialize incoming JSON payloads that include a type discriminator into the correct Python object instances.
  • Replace an existing marshmallow-oneofschema installation with a performance-optimized version without code changes.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need polymorphic schema support in marshmallow and want a drop-in replacement for marshmallow-oneofschema.

The low install friction, permissive license, and zero known vulnerabilities make it a straightforward choice. However, the aging maintenance status (no updates since initial release on 2025-09-02) and very low repository stars (1) suggest limited community adoption and testing; evaluate whether the performance claims and stability are suitable for your use case before committing to production.

Install

marshmallow-fastoneofschema on PyPI

Before you install

Low install friction with a single runtime dependency on marshmallow. Maintenance status is aging—the package was first released on 2025-09-02 with no updates since, though the repository remains active and unarchived.

Requires Python 3.11 or later. If marshmallow-oneofschema is installed alongside this package, set FASTONEOFSCHEMA_DISABLE_PTH=1 to avoid import redirection.

License in practice

MIT licensed with permissive terms. You can use, modify, and distribute the package freely with minimal restrictions, provided you retain the copyright notice and license text.

Quickstart

pip install marshmallow-fastoneofschema

from marshmallow_fastoneofschema import OneOfSchema
import marshmallow

class MyUberSchema(OneOfSchema):
    type_schemas = {"Foo": FooSchema, "Bar": BarSchema}

MyUberSchema().dump([Foo(foo="hello"), Bar(bar=123)], many=True)

Verify before relying

  • Whether the performance improvements over the upstream marshmallow-oneofschema are measurable in typical workloads.
  • Stability and maturity of the DeepFriedMarshmallow plugin integration for production use.
  • Real-world compatibility with complex nested schema hierarchies beyond the documented examples.

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.11
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
marshmallow
MaintenanceAging 346 days since the last release
Last repo commit
First released
Downloads194,570 / month, #9,831 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13

Evidence: marshmallow_fastoneofschema-2025.9.2.1.dev7-py3-none-any.whl

Tags

Capabilities
polymorphic schema serializationmarshmallow oneofschematype-based schema multiplexingdiscriminated union serializationmarshmallow schema routing
Topics
serializationpolymorphic-typesschema-routing

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “type-based schema multiplexing”

Give your agent the search over MCP, or paste the wish link into any chat.

More Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.

Install it if you are building CLIs in Python.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.

permissive licensepure Python
323.3Mdownloads / mo

See also DeepFriedMarshmallow · marshmallow-oneofschema · apispec-oneofschema · marshmallow-polyfield · marshmallow-jsonschema · marshmallow-union · marshmallow-mongoengine · marshmallow · flask-marshmallow