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.6.tar.gz (32.5 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.6-py3-none-any.whl (44.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pccontext-0.2.6.tar.gz
Algorithm Hash digest
SHA256 2685d5ba4a033c47512f6b777ea9d08c338f7e75da133040d708fae602cf3c5a
MD5 e9a73ac22da25dc079f1b921cba724b9
BLAKE2b-256 c95001b5648a7678912f17eea27e7db2ce6dd39eada656cdb65fc89a67713298

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pccontext-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 f5611a9b54d8050ede47bd5f8dc8d67c44921f57f4c0339fd520943bd391dc40
MD5 1049e81e3dbe30fba28b9033f16bc57b
BLAKE2b-256 1b12581e6fbe4f4c4ab39b23555ee1fce35cfb6b9b81f0f6a68f86e0db8d4e53

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