--- id: py-solc-x version: "2.0.5" license: MIT license_treatment: permissive maintenance: active --- # py-solc-x — Python wrapper and version management tool for the solc Solidity compiler. License: permissive · Maintenance: active · Downloads: 222.5K/mo ## 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 above — 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 pip install py-solc-x uv add py-solc-x 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_current - Install friction: low - Maintenance: active - Downloads: 222.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags solidity compiler python wrapper, solc version management, ethereum solidity compilation, python solc installer, solidity build tool python, multi-version solc management, solc dependency manager, ethereum, solidity, compiler [View on SkillFed](https://skillfed.io/packages/py-solc-x) · [View on PyPI](https://pypi.org/project/py-solc-x/)