scalecodec
Python SCALE Codec Library
Decision gist · record as of 2026-08-14
Yes, if you are building on Substrate or Polkadot. The package is stable, permissively licensed, and has low install friction. Maintenance is aging but the repository is not archived and the package remains in active use. No known vulnerabilities. Not relevant for non-blockchain Python projects.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.6 or later; designed for Substrate/Polkadot ecosystem integration.
- Low install friction with a pure Python wheel.
- Maintenance is aging—last commit was 302 days ago—but the repository remains active and the package is marked Production/Stable.
License · maintenance · safety
permissive license (permissive) — Licensed under Apache Software License (permissive), allowing commercial and private use with minimal restrictions.
last release 2025-10-16 (302 days) · last repo commit 2025-10-16 · 59 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 345,396 downloads/mo, #7,363 on PyPI
Alternatives
Verify before relying
pip install scalecodec
from scalecodec.base import RuntimeConfiguration
from scalecodec.types import U16
config = RuntimeConfiguration()
value = U16(42)
encoded = value.encode()
print(encoded.hex())- Whether the package handles all Substrate runtime types beyond the basic examples shown in the description.
- Performance characteristics when encoding/decoding large or deeply nested data structures.
- Compatibility with the latest Substrate runtime versions and breaking changes.
What it is and what it does
Scalecodec is a Python implementation of the SCALE codec, the serialization format used by Substrate and Polkadot-based blockchains. It provides encoding and decoding for a range of data types—from basic integers and booleans to complex aggregates like vectors and bit sequences—using little-endian fixed-width and compact integer formats to minimize network overhead.
The package is typically used by developers building tools, wallets, or indexers that interact with Substrate chains, where they need to serialize Python objects into SCALE format for on-chain calls or deserialize chain data back into Python types. It depends on more-itertools, base58, and requests, and targets Python 3.6 and later.
Use it for
- Serialize transaction data for submission to Polkadot or Kusama networks.
- Deserialize blockchain state and event data returned from Substrate RPC endpoints.
- Build indexers or data pipelines that read and transform on-chain events.
- Encode function arguments for extrinsic calls in Substrate-based applications.
- Integrate blockchain data into Python-based analytics or monitoring tools.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are building on Substrate or Polkadot.
The package is stable, permissively licensed, and has low install friction. Maintenance is aging but the repository is not archived and the package remains in active use. No known vulnerabilities. Not relevant for non-blockchain Python projects.
Install
scalecodec on PyPI
Before you install
Low install friction with a pure Python wheel. Maintenance is aging—last commit was 302 days ago—but the repository remains active and the package is marked Production/Stable.
Requires Python 3.6 or later; designed for Substrate/Polkadot ecosystem integration.
License in practice
Licensed under Apache Software License (permissive), allowing commercial and private use with minimal restrictions.
Quickstart
pip install scalecodec
from scalecodec.base import RuntimeConfiguration
from scalecodec.types import U16
config = RuntimeConfiguration()
value = U16(42)
encoded = value.encode()
print(encoded.hex())
Verify before relying
- Whether the package handles all Substrate runtime types beyond the basic examples shown in the description.
- Performance characteristics when encoding/decoding large or deeply nested data structures.
- Compatibility with the latest Substrate runtime versions and breaking changes.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release <4,>=3.6 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesmore-itertoolsbase58requests |
| Maintenance | Aging 302 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 345,396 / month, #7,363 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: scalecodec-1.2.12-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 › “scale codec encoding decoding”
- scalecodecEncodes and decodes data using the SCALE codec, a lightweight…
- cyscaleCython-accelerated encoder and decoder for the SCALE codec used by…
- substrate-interfaceInterfaces with Substrate blockchain nodes to query storage, compose…
Give your agent the search over MCP, or paste the wish link into any chat.
More Internet packages
Botocore provides low-level, data-driven access to Amazon Web Services APIs, serving as the foundation for the AWS CLI and boto3 libraries.
Install it if you need programmatic access to AWS services.
Provides an async client for AWS services using botocore and aiohttp, allowing you to call AWS APIs asynchronously within asyncio-based applications.
Install it if you need to call AWS services from async Python code; it is the standard way to do so.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides a platform-independent file locking mechanism to coordinate access to files across processes and threads.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides common Protocol Buffer message definitions used across Google Cloud APIs, enabling Python clients to interact with Google services.
See also cobs · cyscale · substrate-interface · async-substrate-interface · rlp · bech32m · pyasn1 · prophy · eth-rlp · pytoniq-core