Registry / http-networking / py-geth

py-geth

JSON →
library6.4.0pypypi✓ verified 82d ago

py-geth is a Python library for running Go-Ethereum (geth) as a subprocess. It provides a convenient interface to manage Ethereum nodes, including downloading, installing, and interacting with geth. The current version is 6.4.0, supporting Python 3.8+. The library is actively maintained and follows the Ethereum release cadence.

pip install py-geth
INSTALL
IMPORT
SIG · PY-GETH
P
py-geth
http-networkingpythonv6.4.0
Install
4.0s avg
Import
Disk
30MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v6.4.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 31.5MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 4.0s · import 0.000s · 31MB
30MB installed
● package 30MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

DevGethProcess
from geth import DevGethProcess
from geth import GethProcess
MainnetGethProcess
from geth import MainnetGethProcess
from geth import GethProcess
install_geth
from geth import install_geth
from geth import GethProcess

Starts a Geth node in developer mode with a pre-funded account and mining enabled.

from geth import DevGethProcess # Start a dev geth instance with default settings geth = DevGethProcess('~/ethereum') geth.start() # Wait until the node is ready geth.wait_for_rpc(timeout=60) print(f'RPC available at {geth.rpc_url}') geth.stop()
geth --version
Debug
Known issues
breakingIn v4+, the package uses an explicit binary download step. Previously, GethProcess would automatically download geth. Now you must call `install_geth()` or provide a pre-installed binary.
fix
Use `from geth import install_geth; install_geth()` before starting a process.
affects: >=4.0.0
gotchaOn macOS, geth binaries are not signed, and macOS Gatekeeper may block execution. This causes process.start() to fail silently.
fix
Manually download and sign the binary, or run `xattr -dr com.apple.quarantine /path/to/geth`.
affects: all
deprecatedThe `GethProcess` constructor argument `python_executable` is deprecated in v5+. Use `geth_executable` to specify the path to the geth binary.
fix
Replace `python_executable='/path/to/geth'` with `geth_executable='/path/to/geth'`.
affects: >=5.0.0
gotchaThe default data directory is relative to the current working directory, which can cause unexpected behavior if not using absolute paths.
fix
Always provide an absolute path for the data directory, e.g., `DevGethProcess('/absolute/path')`.
affects: all
Upgrade
Version history
6.4.0latest on PyPI · released Dec 5, 2025
Audit
Dependencies
web3optionalFor interacting with the Ethereum node via JSON-RPC
Agent activity
13 hits · last 30 days
node
12
Resources
py-geth — pip install py-geth · libregistry