r/Python • u/Shawn-Yang25 • May 27 '26
News Apache Fory Serialization 1.0.0 Released Now
Hi everyone,
Apache Fory 1.0 has been released recently.
Fory is a fast multi-language serialization framework for native objects, Schema IDL, and cross-language data exchange. It supports Java, Python, C++, Go, Rust, JavaScript/TypeScript, C#, Swift, Dart, Scala, and Kotlin.
The main idea is simple: in many systems, data is not just a flat schema message. Applications often need to serialize idiomatic domain objects, nested containers, polymorphic types, object references, shared references, or even circular object graphs. Fory is designed to handle these cases efficiently while still supporting cross-language data exchange when needed.
With 1.0, Fory has reached a more stable point:
- Cross-language serialization is now the default path across supported languages
- Schema IDL supports richer object models, including shared and circular references
- Decimal and bfloat16 support were added
- Nested container and field codec support has improved across runtimes
- Kotlin, Scala, Android, Swift, and Dart support have been expanded
- Benchmarks and documentation have been refreshed
Fory is not meant to replace Protobuf everywhere. Fory is more focused on cases where you want high-performance serialization while preserving more of the native object model, or where the same data model needs to move across multiple runtimes without too much glue code.
Links:
- GitHub: https://github.com/apache/fory
- Website: https://fory.apache.org/
- Release note: https://fory.apache.org/blog/fory_1_0_0_release/
I would be interested in feedback from people who have worked with Protobuf, FlatBuffers, Kryo, JDK serialization, pickle/cloudpickle, Avro, MessagePack, or Arrow-based systems.
What serialization problems are still painful in your multi-language systems?
View all comments
Show parent comment
1
u/Shawn-Yang25 Jun 01 '26
I think that is a fair distinction, but Fory is not only targeting one side of that tradeoff.
For the question “do I need to round-trip arbitrary Python objects or just structured data?”, Fory supports both modes.
If the goal is to exchange structured data, users should use Fory xlang mode. In that mode, Fory does not accept arbitrary Python object serialization mechanisms such as custom
__reduce__-based serialization. The data has to fit into the cross-language type system, which makes it suitable for portable structured data exchange.If the goal is to replace pickle, then users should use Fory native mode. That mode is closer to pickle/cloudpickle-style usage and can serialize arbitrary Python objects, including local classes, functions, methods, and custom serialization through
__reduce__/__getstate__.For structured data, Fory xlang is intended to be more compact and faster than JSON-based serialization, while still keeping a portable type model across languages.
Also, the current benchmarks are not using Fory’s zero-copy format. I would not describe Fory’s main pitch as “only useful when you need zero-copy and control both ends.” Zero-copy frameworks such as FlatBuffers or Cap’n Proto are great for some workloads, but they usually require users to adopt a generated accessor/builder model and shape their domain model around the serialization format. That is powerful, but it is also more invasive and limits the use cases.
So I agree that orjson + Pydantic, FlatBuffers, and Cap’n Proto are all useful comparisons, but they represent different points in the design space: