numpyencoder
Python JSON encoder for handling Numpy data types.
Decision gist · record as of 2026-08-14
Yes, if you regularly work with NumPy and need to serialize to JSON. The package is lightweight, has no known vulnerabilities, and uses a permissive license. Maintenance is aging (last release 395 days ago), so verify that it handles your specific NumPy types before relying on it for new projects; for established workflows it is a straightforward, low-risk addition.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction installation with a pure-Python wheel.
- Maintenance is aging—last release was 395 days ago—but the repository remains active and the package has been stable since its 2018 initial release.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you may use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
last release 2025-07-15 (395 days) · last repo commit 2025-07-15 · 35 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 168,629 downloads/mo, #10,442 on PyPI
Alternatives
Verify before relying
import json
import numpy as np
from numpyencoder import NumpyEncoder
numpy_data = np.array([0, 1, 2, 3])
json.dumps(numpy_data, cls=NumpyEncoder)- Which specific NumPy data types are supported (e.g., all scalar types, structured arrays, datetime64)
- Performance characteristics when encoding large arrays or deeply nested NumPy structures
- Compatibility with NumPy versions beyond the current release cycle
What it is and what it does
numpyencoder is a lightweight JSON encoder that extends Python's standard json module to handle NumPy data types. When you try to serialize a NumPy array or scalar using the standard json.dump() or json.dumps(), you normally get a TypeError; this package provides a NumpyEncoder class that you pass as the cls parameter to transparently convert NumPy objects into JSON-serializable Python types.
The package depends on numpy and packaging. It's designed for workflows where you're working with NumPy arrays or calculations and need to write results to JSON files or transmit them over JSON APIs without writing custom conversion logic. The encoder integrates directly into Python's json module, so you use it by simply specifying cls=NumpyEncoder in your json.dump() call.
Use it for
- Save NumPy computation results (arrays, statistics) to JSON configuration or data files
- Serialize machine learning model outputs or intermediate arrays for logging or API responses
- Convert NumPy-based scientific data to JSON for web APIs or inter-process communication
- Export numerical simulation or analysis results to JSON-compatible formats without manual type conversion
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you regularly work with NumPy and need to serialize to JSON.
The package is lightweight, has no known vulnerabilities, and uses a permissive license. Maintenance is aging (last release 395 days ago), so verify that it handles your specific NumPy types before relying on it for new projects; for established workflows it is a straightforward, low-risk addition.
Install
numpyencoder on PyPI
Before you install
Low friction installation with a pure-Python wheel. Maintenance is aging—last release was 395 days ago—but the repository remains active and the package has been stable since its 2018 initial release.
License in practice
MIT license is permissive; you may use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
import json
import numpy as np
from numpyencoder import NumpyEncoder
numpy_data = np.array([0, 1, 2, 3])
json.dumps(numpy_data, cls=NumpyEncoder)
Verify before relying
- Which specific NumPy data types are supported (e.g., all scalar types, structured arrays, datetime64)
- Performance characteristics when encoding large arrays or deeply nested NumPy structures
- Compatibility with NumPy versions beyond the current release cycle
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.6 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesnumpypackaging |
| Maintenance | Aging 395 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 168,629 / month, #10,442 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Operating System :: OS IndependentProgramming Language :: Python :: 3 |
Evidence: numpyencoder-0.3.2-py3-none-any.whl
Tags
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 › “numpy json encoder”
- numpyencoderProvides a custom JSON encoder class that serializes NumPy data types…
- json-numpyProvides lossless JSON encoding and decoding for NumPy arrays and…
- jsonconversionConverts arbitrary Python objects to JSON strings and back, extending…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also json-numpy · javaproperties · pyjson5 · json-encoder · msgpack-numpy · jsonconversion · jsonstreams · orjson · jsonseq · standardjson