skillfed

py-solc-x

Python wrapper and version management tool for the solc Solidity compiler.

py-solc-x v2.0.5 222.5K downloads/30d#9,263 on PyPI143
Permissive license MIT Active released

What it is and what it does

py-solc-x is a Python wrapper around the Solidity compiler that handles both installation and invocation of solc. It lets you install and manage multiple versions of the compiler on your system, then call them from Python code to compile Solidity smart contracts. The package abstracts away platform-specific compiler setup—handling downloads and builds for Linux, macOS, and Windows—so you can focus on compilation logic rather than toolchain management.

The package is commonly used in Ethereum development workflows where Python tools need to compile Solidity code as part of a build or test pipeline. It depends on requests and packaging for downloading compiler binaries and version parsing, keeping the dependency footprint minimal. The project is actively maintained and supports Python 3.8, 3.9, 3.10, and 3.11.

Use it for:

  • Compile Solidity smart contracts from within a Python test suite or build script without manual compiler installation.
  • Manage multiple Solidity compiler versions in a single development environment for testing contract compatibility.
  • Automate Solidity compilation as part of a Python-based Ethereum development framework or CI/CD pipeline.
  • Build Python tools for Ethereum that need to compile contracts on-the-fly without requiring users to install solc separately.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Manages installation and version control of the Solidity compiler (solc) for Python, allowing you to work with multiple solc versions.

Yes. Low install friction, active maintenance, no known vulnerabilities, and permissive MIT licensing make this a straightforward choice for Python projects that need Solidity compilation. Install it if you're building Ethereum tooling in Python and need compiler version flexibility.

Install

py-solc-x on PyPI

pip

pip install py-solc-x

uv

uv add py-solc-x

poetry

poetry add py-solc-x

Installing py-solc-x

Before you install

Low friction install with only two lightweight runtime dependencies (requests and packaging). Actively maintained with stable production status.

License in practice

MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.

Quickstart

pip install py-solc-x

from py_solc_x import compile_standard
compile_standard({"language": "Solidity", "sources": {...}})

Compiling from source requires system-level solc build dependencies; prebuilt binaries are available for Linux, macOS, and Windows.

Verify before relying

  • Whether prebuilt solc binaries are automatically downloaded or require manual setup.
  • Performance characteristics when switching between multiple installed solc versions.
  • Specific Solidity versions beyond >=0.4.11 that are actively tested and supported.

Package facts

License MIT (permissive)
Python support supports the current Python release (<4,>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 2 — requests, packaging
Maintenance actively maintained — 247 days since the last release
Last repo commit
First released
Downloads 222,485/month — #9,263 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: py_solc_x-2.0.5-py3-none-any.whl

Keywords: ethereum, solidity, solc

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: MacOSOperating System :: POSIXProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

solidity compiler python wrappersolc version managementethereum solidity compilationpython solc installersolidity build tool pythonmulti-version solc managementsolc dependency manager
ethereumsoliditycompiler

More Build Tools packages