Skip to main content

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.2.8.tar.gz (32.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pccontext-0.2.8-py3-none-any.whl (45.3 kB view details)

Uploaded Python 3

File details

Details for the file pccontext-0.2.8.tar.gz.

File metadata

  • Download URL: pccontext-0.2.8.tar.gz
  • Upload date:
  • Size: 32.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.1 CPython/3.10.10 Darwin/24.3.0

File hashes

Hashes for pccontext-0.2.8.tar.gz
Algorithm Hash digest
SHA256 f418c0af856376107fd00831ec40f29489ce517f04330e2712eb642284e509fb
MD5 7e46445bda13c9fb5db549c35a9f0bb7
BLAKE2b-256 e2d6ed815bd7f1580ff082231d9581d8c9c3639109a46f7407ac1c63313d7988

See more details on using hashes here.

File details

Details for the file pccontext-0.2.8-py3-none-any.whl.

File metadata

  • Download URL: pccontext-0.2.8-py3-none-any.whl
  • Upload date:
  • Size: 45.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.1 CPython/3.10.10 Darwin/24.3.0

File hashes

Hashes for pccontext-0.2.8-py3-none-any.whl
Algorithm Hash digest
SHA256 e37d14de36348d0c5c32a38a0b84206aa3c0de04a43d6cada58ee8ebb5589361
MD5 08b8351c62c240e487cc9062c4ca436b
BLAKE2b-256 52e54c387ec9d812ec8dab41a84ce2af4a178cf13321a7530e3c57e3f745a335

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page