Gnosis libraries for Python Projects
Project description
Gnosis-py includes a set of libraries to work with Gnosis projects. Currently Gnosis Safe is supported.
Quick start
Just run pip install gnosis-py or add it to your requirements.txt
Ethereum utils
gnosis.eth
class EthereumClient (ethereum_node_url: str): Class to connect and do operations with a ethereum node. Uses web3 and raw rpc calls for things not supported in web3. Only http/https urls are suppored for the node url.
gnosis.eth.constants
NULL_ADDRESS (0x000...0)
SENTINEL_ADDRESS (0x000...1)
Maximum an minimum values for R, S and V in ethereum signatures
gnosis.eth.utils
Contains utils for ethereum operations:
get_eth_address_with_key() -> Tuple[str, bytes]: Returns a tuple of a valid public ethereum checksumed address with the private key.
get_eth_address_with_invalid_checksum() -> str: Returns an invalid checksumed ethereum public address.
generate_address_2(from_: Union[str, bytes], salt: Union[str, bytes], init_code: [str, bytes]) -> str: Calculates the address of a new contract created using the new CREATE2 opcode.
Ethereum django utils
Now django-eth is part of this package, available under gnosis.eth.django You can find a set of helpers for working with Ethereum using Django and Django Rest framework.
It includes:
Basic serializers (signature, transaction)
Serializer fields (Ethereum address field, hexadecimal field)
Model fields (Ethereum address, Ethereum big integer field)
Utils for testing
Contributors
Denís Graña (denis@gnosis.pm)
Giacomo Licari (giacomo.licari@gnosis.pm)
Uxío Fuentefría (uxio@gnosis.pm)
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
Built Distribution
Hashes for gnosis_py-1.4.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e844b8ada7139563dc019a255202a277c3ffc88d3d7f1402e13452a1342bdd8 |
|
MD5 | 1fdeb766c8a1c7cc36f363f8a9992f52 |
|
BLAKE2b-256 | 5ef790aff0601b3160e2c2626543729666bffb4fe6133f8e28e54c85bef88d49 |