Python wrapper around the solc binary
Project description
# py-solc
[![Build Status](https://travis-ci.org/pipermerriam/py-solc.png)](https://travis-ci.org/pipermerriam/py-solc)
[![PyPi version](https://pypip.in/v/py-solc/badge.png)](https://pypi-hypernode.com/pypi/py-solc)
[![PyPi downloads](https://pypip.in/d/py-solc/badge.png)](https://pypi-hypernode.com/pypi/py-solc)
Python wrapper around the `solc` solidity compiler.
# Dependency
This library requires the `solc` executable to be present.
# Quickstart
Installation
```sh
pip install py-solc
```
```python
>>> from solc import compile_source, compile_files
>>> compile_source("contract Foo { function Foo() {} }")
{
'Foo': {
'abi': [{'inputs': [], 'type': 'constructor'}],
'code': '0x60606040525b5b600a8060126000396000f360606040526008565b00',
'code_runtime': '0x60606040526008565b00',
'source': None,
'meta': {
'compilerVersion': '0.3.5-9da08ac3',
'language': 'Solidity',
'languageVersion': '0',
},
},
}
>>> compile_files(["/path/to/Foo.sol", "/path/to/Bar.sol"])
{
'Foo': {
'abi': [{'inputs': [], 'type': 'constructor'}],
'code': '0x60606040525b5b600a8060126000396000f360606040526008565b00',
'code_runtime': '0x60606040526008565b00',
'source': None,
'meta': {
'compilerVersion': '0.3.5-9da08ac3',
'language': 'Solidity',
'languageVersion': '0',
},
},
'Bar': {
'abi': [{'inputs': [], 'type': 'constructor'}],
'code': '0x60606040525b5b600a8060126000396000f360606040526008565b00',
'code_runtime': '0x60606040526008565b00',
'source': None,
'meta': {
'compilerVersion': '0.3.5-9da08ac3',
'language': 'Solidity',
'languageVersion': '0',
},
},
}
```
[![Build Status](https://travis-ci.org/pipermerriam/py-solc.png)](https://travis-ci.org/pipermerriam/py-solc)
[![PyPi version](https://pypip.in/v/py-solc/badge.png)](https://pypi-hypernode.com/pypi/py-solc)
[![PyPi downloads](https://pypip.in/d/py-solc/badge.png)](https://pypi-hypernode.com/pypi/py-solc)
Python wrapper around the `solc` solidity compiler.
# Dependency
This library requires the `solc` executable to be present.
# Quickstart
Installation
```sh
pip install py-solc
```
```python
>>> from solc import compile_source, compile_files
>>> compile_source("contract Foo { function Foo() {} }")
{
'Foo': {
'abi': [{'inputs': [], 'type': 'constructor'}],
'code': '0x60606040525b5b600a8060126000396000f360606040526008565b00',
'code_runtime': '0x60606040526008565b00',
'source': None,
'meta': {
'compilerVersion': '0.3.5-9da08ac3',
'language': 'Solidity',
'languageVersion': '0',
},
},
}
>>> compile_files(["/path/to/Foo.sol", "/path/to/Bar.sol"])
{
'Foo': {
'abi': [{'inputs': [], 'type': 'constructor'}],
'code': '0x60606040525b5b600a8060126000396000f360606040526008565b00',
'code_runtime': '0x60606040526008565b00',
'source': None,
'meta': {
'compilerVersion': '0.3.5-9da08ac3',
'language': 'Solidity',
'languageVersion': '0',
},
},
'Bar': {
'abi': [{'inputs': [], 'type': 'constructor'}],
'code': '0x60606040525b5b600a8060126000396000f360606040526008565b00',
'code_runtime': '0x60606040526008565b00',
'source': None,
'meta': {
'compilerVersion': '0.3.5-9da08ac3',
'language': 'Solidity',
'languageVersion': '0',
},
},
}
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
py-solc-0.1.0.tar.gz
(5.4 kB
view details)
Built Distributions
File details
Details for the file py-solc-0.1.0.tar.gz
.
File metadata
- Download URL: py-solc-0.1.0.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1454d45af75037604681e8b7838cfec690051b6ee95e662f024c3f71e500a657 |
|
MD5 | b984435e3e930575c88eb878a6f596dd |
|
BLAKE2b-256 | 9370e61628661b8e405206b72d3e123aa0f67426a35add4a3cd5c06670698a9c |
File details
Details for the file py_solc-0.1.0-py2-none-any.whl
.
File metadata
- Download URL: py_solc-0.1.0-py2-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93dec5722bc357ca8be539156d84349ebd37285facb58a65dc88d0b95767ce8e |
|
MD5 | b035b2ef059ce577f3e401bd1a70e2a1 |
|
BLAKE2b-256 | d2d43f1b8e32aee17745ee80097cc3352fb8a64d745695d14c988d1ecf30f420 |
File details
Details for the file py-solc-0.1.0.macosx-10.11-x86_64.tar.gz
.
File metadata
- Download URL: py-solc-0.1.0.macosx-10.11-x86_64.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3bb400847544da758a88726418a19277100b45f34ebb8ce541d5ca2c143dc7a4 |
|
MD5 | 58cd6d870f4c0b71e073a9d987ecd686 |
|
BLAKE2b-256 | 4c6b5f4e9ec550b09f1ca377bfa7ff5fd340c11651057f0f317d9ce95a347e7b |