Chain Contexts for PyCardano library
Project description
PyCardano Chain Contexts
This library contains the various Chain Contexts to use with the PyCardano library.
Basic Usage
Blockfrost
from pccontext import BlockFrostChainContext
from blockfrost import ApiUrls
chain_context = BlockFrostChainContext(
project_id="your_project_id",
base_url=ApiUrls.mainnet.value
)
Cardano-CLI
from pccontext import CardanoCliChainContext, CardanoCliNetwork
from pathlib import Path
chain_context = CardanoCliChainContext(
binary=Path("cardano-cli"),
socket=Path("node.socket"),
config_file=Path("config.json"),
network=CardanoCliNetwork.MAINNET,
)
Koios
from pccontext import KoiosChainContext
chain_context = KoiosChainContext(api_key="api_key")
Ogmios
from pccontext import OgmiosChainContext
chain_context = OgmiosChainContext(host="localhost", port=1337)
Kupo
from pccontext import OgmiosChainContext, KupoChainContextExtension
ogmios_chain_context = OgmiosChainContext(host="localhost", port=1337)
chain_context = KupoChainContextExtension(wrapped_backend=ogmios_chain_context)
Offline Transfer File
from pathlib import Path
from pccontext import OfflineTransferFileContext
chain_context = OfflineTransferFileContext(offline_transfer_file=Path("offline-transfer.json"))
Yaci Devkit
from pccontext import YaciDevkitChainContext
chain_context = YaciDevkitChainContext(api_url="http://localhost:8080")
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pccontext-0.1.0.tar.gz
(30.7 kB
view details)
Built Distribution
pccontext-0.1.0-py3-none-any.whl
(43.2 kB
view details)
File details
Details for the file pccontext-0.1.0.tar.gz
.
File metadata
- Download URL: pccontext-0.1.0.tar.gz
- Upload date:
- Size: 30.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.1 CPython/3.10.10 Darwin/24.0.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a91c3d08daf049b95ffaa9ec521893cd6864a54c434825d12917c61739a6a197 |
|
MD5 | 6c824d7d5dade178b735b5c1402344a6 |
|
BLAKE2b-256 | 672e327aaf6a9d5133c019e676094fd27b1c7e1281ccabb8378ea25ddd19101e |
File details
Details for the file pccontext-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: pccontext-0.1.0-py3-none-any.whl
- Upload date:
- Size: 43.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.1 CPython/3.10.10 Darwin/24.0.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 160d53e6591fc74d3246fca258b0b92fee3fe383ad934f674c65f94a081b6279 |
|
MD5 | 9595ec36bf0bc24789d8a1fbe29228f1 |
|
BLAKE2b-256 | e9a0a22b2932f0657e2326d11b3a56559d8429aafca2fede5be1625918792a19 |